Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade terser-webpack-plugin major #11302

Merged
merged 3 commits into from Aug 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -39,7 +39,7 @@ matrix:
- os: linux
node_js: "10"
env:
- NODEJS_VERSION=v13.0.0-nightly201910156afed1dc85
- NODEJS_VERSION=v15.0.0-nightly2020082003293aa3a1
- YARN_EXTRA_ARGS="--ignore-engines"
- NO_WATCH_TESTS=1
- JEST="--maxWorkers=2 --cacheDirectory .jest-cache"
Expand Down
15 changes: 11 additions & 4 deletions lib/FileSystemInfo.js
Expand Up @@ -16,10 +16,12 @@ const { join, dirname, relative } = require("./util/fs");
/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */

const resolveContext = createResolver({
resolveToContext: true
resolveToContext: true,
exportsFields: []
});
const resolve = createResolver({
extensions: [".js", ".json", ".node"]
extensions: [".js", ".json", ".node"],
conditionNames: ["require"]
});

let FS_ACCURACY = 2000;
Expand Down Expand Up @@ -389,8 +391,10 @@ class FileSystemInfo {
if (
err.code === "ENOENT" ||
err.code === "UNDECLARED_DEPENDENCY"
)
) {
return callback();
}
err.message += `\nwhile resolving '${path}' in ${context} to a directory`;
return callback(err);
}
resolveResults.set(key, result);
Expand Down Expand Up @@ -425,8 +429,10 @@ class FileSystemInfo {
if (
err.code === "ENOENT" ||
err.code === "UNDECLARED_DEPENDENCY"
)
) {
return callback();
}
err.message += `\nwhile resolving '${path}' in ${context} as file`;
return callback(err);
}
resolveResults.set(key, result);
Expand Down Expand Up @@ -500,6 +506,7 @@ class FileSystemInfo {
break;
}
case RBDT_FILE_DEPENDENCIES: {
// TODO this probably doesn't work correctly with ESM dependencies
/** @type {NodeModule} */
const module = require.cache[path];
if (module && Array.isArray(module.children)) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -26,7 +26,7 @@
"pkg-dir": "^4.2.0",
"schema-utils": "^2.7.0",
"tapable": "^2.0.0-beta.11",
"terser-webpack-plugin": "^3.0.2",
"terser-webpack-plugin": "^4.1.0",
"watchpack": "2.0.0-beta.14",
"webpack-sources": "2.0.0-beta.9"
},
Expand Down