Skip to content

Commit

Permalink
update polyfill node rollup plugin (#2053)
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Dec 21, 2020
1 parent 3787810 commit 2d9a0eb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 24 deletions.
2 changes: 1 addition & 1 deletion esinstall/package.json
Expand Up @@ -53,7 +53,7 @@
"mkdirp": "^1.0.3",
"rimraf": "^3.0.0",
"rollup": "^2.34.0",
"rollup-plugin-node-polyfills": "^0.2.1",
"rollup-plugin-polyfill-node": "^0.4.1",
"validate-npm-package-name": "^3.0.0",
"vm2": "^3.9.2"
}
Expand Down
2 changes: 1 addition & 1 deletion esinstall/src/index.ts
Expand Up @@ -9,7 +9,7 @@ import mkdirp from 'mkdirp';
import path from 'path';
import rimraf from 'rimraf';
import {InputOptions, OutputOptions, Plugin as RollupPlugin, rollup, RollupError} from 'rollup';
import rollupPluginNodePolyfills from 'rollup-plugin-node-polyfills';
import rollupPluginNodePolyfills from 'rollup-plugin-polyfill-node';
import rollupPluginReplace from '@rollup/plugin-replace';
import util from 'util';
import validatePackageName from 'validate-npm-package-name';
Expand Down
4 changes: 0 additions & 4 deletions snowpack/scripts/generate-bundle.js
Expand Up @@ -91,10 +91,6 @@ const config = {
// vm2 & others
{find: /^vm2$/, replacement: require.resolve('../vendor/vm2/index.js')},
{find: /^htmlparser2$/, replacement: require.resolve('../vendor/generated/~htmlparser2.js')},
{
find: /^rollup-plugin-node-polyfills$/,
replacement: 'rollup-plugin-node-polyfills/dist/index.js'
},
],
}),
commonjs({
Expand Down
2 changes: 1 addition & 1 deletion snowpack/scripts/generate-vendor.js
Expand Up @@ -4,7 +4,7 @@ const fs = require('fs');

fs.copyFileSync(require.resolve('source-map/lib/mappings.wasm'), path.join(__dirname, '../lib/mappings.wasm'));
// fs.copyFileSync(path.join(require.resolve('rollup-plugin-node-polyfills/package.json'), '../polyfills'), path.join(__dirname, '../polyfills'));
execa.commandSync(`cp -r ${path.join(require.resolve('rollup-plugin-node-polyfills/package.json'), '../polyfills')} ${path.join(__dirname, '../polyfills')}`);
// execa.commandSync(`cp -r ${path.join(require.resolve('rollup-plugin-node-polyfills/package.json'), '../polyfills')} ${path.join(__dirname, '../polyfills')}`);

/**
* Some packages just don't work with Rollup. As a workaround,
Expand Down
25 changes: 8 additions & 17 deletions yarn.lock
Expand Up @@ -2424,7 +2424,7 @@
magic-string "^0.25.7"
resolve "^1.17.0"

"@rollup/plugin-inject@^4.0.2":
"@rollup/plugin-inject@^4.0.0", "@rollup/plugin-inject@^4.0.2":
version "4.0.2"
resolved "https://registry.yarnpkg.com/@rollup/plugin-inject/-/plugin-inject-4.0.2.tgz#55b21bb244a07675f7fdde577db929c82fc17395"
integrity sha512-TSLMA8waJ7Dmgmoc8JfPnwUwVZgLjjIAM6MqeIFqPO2ODK36JqE0Cf2F54UTgCUuW8da93Mvoj75a6KAVWgylw==
Expand Down Expand Up @@ -9700,7 +9700,7 @@ macos-release@^2.2.0:
resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.4.1.tgz#64033d0ec6a5e6375155a74b1a1eba8e509820ac"
integrity sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg==

magic-string@^0.25.3, magic-string@^0.25.5, magic-string@^0.25.7:
magic-string@^0.25.5, magic-string@^0.25.7:
version "0.25.7"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051"
integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==
Expand Down Expand Up @@ -12583,21 +12583,12 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
hash-base "^3.0.0"
inherits "^2.0.1"

rollup-plugin-inject@^3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz#e4233855bfba6c0c12a312fd6649dff9a13ee9f4"
integrity sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==
dependencies:
estree-walker "^0.6.1"
magic-string "^0.25.3"
rollup-pluginutils "^2.8.1"

rollup-plugin-node-polyfills@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz#53092a2744837164d5b8a28812ba5f3ff61109fd"
integrity sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA==
rollup-plugin-polyfill-node@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/rollup-plugin-polyfill-node/-/rollup-plugin-polyfill-node-0.4.1.tgz#3a1207e725d4b30725b754875a34ee6b4e695f56"
integrity sha512-PxON/asmp3BuBaJPUToUQSq3RA6MpDma0zlK+NuQoBgxImMOPjVeelkdLYh0EWo9ZSJbCqDDkckAAM0wOwvysQ==
dependencies:
rollup-plugin-inject "^3.0.0"
"@rollup/plugin-inject" "^4.0.0"

rollup-plugin-svelte@^7.0.0:
version "7.0.0"
Expand All @@ -12607,7 +12598,7 @@ rollup-plugin-svelte@^7.0.0:
require-relative "^0.8.7"
rollup-pluginutils "^2.8.2"

rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2:
rollup-pluginutils@^2.8.2:
version "2.8.2"
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e"
integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==
Expand Down

1 comment on commit 2d9a0eb

@vercel
Copy link

@vercel vercel bot commented on 2d9a0eb Dec 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.