Skip to content

Commit

Permalink
Update to webpack-asset-relocator-loader 0.5.6 (#442)
Browse files Browse the repository at this point in the history
* Update to webpack-asset-relocator-loader 0.5.6, filterAssetBase

* update coverage tests
  • Loading branch information
guybedford authored and styfle committed Jun 25, 2019
1 parent dd5aefd commit d782c12
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@google-cloud/firestore": "^2.2.0",
"@sentry/node": "^4.3.0",
"@tensorflow/tfjs-node": "^0.3.0",
"@zeit/webpack-asset-relocator-loader": "0.5.5",
"@zeit/webpack-asset-relocator-loader": "0.5.6",
"analytics-node": "^3.3.0",
"apollo-server-express": "^2.2.2",
"arg": "^4.1.0",
Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ require('@zeit/ncc')('/path/to/input', {
cache: "./custom/cache/path" | false,
// externals to leave as requires of the build
externals: ["externalpackage"],
// directory outside of which never to emit assets
filterAssetBase: process.cwd(), // default
minify: false, // default
sourceMap: false, // default
sourceMapBasePrefix: '../' // default treats sources as output-relative
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ module.exports = (
sourceMapBasePrefix = '../',
watch = false,
v8cache = false,
filterAssetBase = process.cwd(),
quiet = false,
debugLog = false
} = {}
Expand Down Expand Up @@ -154,6 +155,7 @@ module.exports = (
}, {
loader: eval('__dirname + "/loaders/relocate-loader.js"'),
options: {
filterAssetBase,
existingAssetNames,
escapeNonAnalyzableRequires: true,
wrapperCompatibility: true,
Expand Down
2 changes: 2 additions & 0 deletions test/integration/npm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const npm = require('npm');
const install = require('npm/lib/install');
const rimraf = require('rimraf');

npm.load((err) => {
if (err) {
Expand All @@ -13,4 +14,5 @@ npm.load((err) => {
}
const args = [`[email protected]`];
install('./asdf', args, () => {});
rimraf.sync('./asdf');
});
1 change: 1 addition & 0 deletions test/unit/externals/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports =
/******/ }
/******/
/******/
/******/ __webpack_require__.ab = __dirname + "/";
/******/
/******/ // the startup function
/******/ function startup() {
Expand Down
1 change: 1 addition & 0 deletions test/unit/externals/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports =
/******/ }
/******/
/******/
/******/ __webpack_require__.ab = __dirname + "/";
/******/
/******/ // the startup function
/******/ function startup() {
Expand Down
1 change: 1 addition & 0 deletions test/unit/runtime-notfound/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports =
/******/ }
/******/
/******/
/******/ __webpack_require__.ab = __dirname + "/";
/******/
/******/ // the startup function
/******/ function startup() {
Expand Down
1 change: 1 addition & 0 deletions test/unit/runtime-notfound/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports =
/******/ }
/******/
/******/
/******/ __webpack_require__.ab = __dirname + "/";
/******/
/******/ // the startup function
/******/ function startup() {
Expand Down
1 change: 1 addition & 0 deletions test/unit/shebang/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports =
/******/ }
/******/
/******/
/******/ __webpack_require__.ab = __dirname + "/";
/******/
/******/ // the startup function
/******/ function startup() {
Expand Down
1 change: 1 addition & 0 deletions test/unit/shebang/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports =
/******/ }
/******/
/******/
/******/ __webpack_require__.ab = __dirname + "/";
/******/
/******/ // the startup function
/******/ function startup() {
Expand Down
1 change: 1 addition & 0 deletions test/unit/ts-decl/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports =
/******/ }
/******/
/******/
/******/ __webpack_require__.ab = __dirname + "/";
/******/
/******/ // the startup function
/******/ function startup() {
Expand Down
1 change: 1 addition & 0 deletions test/unit/ts-decl/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports =
/******/ }
/******/
/******/
/******/ __webpack_require__.ab = __dirname + "/";
/******/
/******/ // the startup function
/******/ function startup() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports =
/******/ }
/******/
/******/
/******/ __webpack_require__.ab = __dirname + "/";
/******/
/******/ // the startup function
/******/ function startup() {
Expand Down
1 change: 1 addition & 0 deletions test/unit/tsconfig-paths-conflicting-external/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports =
/******/ }
/******/
/******/
/******/ __webpack_require__.ab = __dirname + "/";
/******/
/******/ // the startup function
/******/ function startup() {
Expand Down
1 change: 1 addition & 0 deletions test/unit/tsconfig-paths/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports =
/******/ }
/******/
/******/
/******/ __webpack_require__.ab = __dirname + "/";
/******/
/******/ // the startup function
/******/ function startup() {
Expand Down
1 change: 1 addition & 0 deletions test/unit/tsconfig-paths/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports =
/******/ }
/******/
/******/
/******/ __webpack_require__.ab = __dirname + "/";
/******/
/******/ // the startup function
/******/ function startup() {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1328,10 +1328,10 @@
resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d"
integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==

"@zeit/[email protected].5":
version "0.5.5"
resolved "https://registry.yarnpkg.com/@zeit/webpack-asset-relocator-loader/-/webpack-asset-relocator-loader-0.5.5.tgz#c50543e479feb642c68356f0216759325544b507"
integrity sha512-QrAytM+XznVV1q3E1nkg95ASYka2kz/OEoDTZ/GeDRWihYmk8iyqqI4XpzystIYOc4vi7jXkHmuQutscs6PgAw==
"@zeit/[email protected].6":
version "0.5.6"
resolved "https://registry.yarnpkg.com/@zeit/webpack-asset-relocator-loader/-/webpack-asset-relocator-loader-0.5.6.tgz#adfa4d3b0cc740aee57950e29efbaf2d40dc15c7"
integrity sha512-fK1zeOB67cob8eBkhgN+OKU5HsEe/XmKq1As6SVzmy1BxyWVpdUIIDeQtRHZM6veG/j7/a5XOeP/VpOOz1ingw==
dependencies:
sourcemap-codec "^1.4.4"

Expand Down

0 comments on commit d782c12

Please sign in to comment.