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

fix: add v12 support #1083

Closed
wants to merge 3 commits into from
Closed

fix: add v12 support #1083

wants to merge 3 commits into from

Conversation

evenstensberg
Copy link
Member

What kind of change does this PR introduce?
Adds support for v12 if flag is supplied
Did you add tests for your changes?
No
If relevant, did you update the documentation?
No
Summary
nodejs/modules#389

Does this PR introduce a breaking change?
N/A
Other information
N/A

Copy link
Member

@rishabh3112 rishabh3112 left a comment

Choose a reason for hiding this comment

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

Few minor suggestions

bin/utils/convert-argv.js Outdated Show resolved Hide resolved
bin/utils/convert-argv.js Outdated Show resolved Hide resolved
Co-Authored-By: Rishabh Chawla <rishabh31121999@gmail.com>
@webpack-bot
Copy link

@evenstensberg Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@rishabh3112 Please review the new changes.

Co-Authored-By: Rishabh Chawla <rishabh31121999@gmail.com>
Copy link
Contributor

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

I think the code should behave the other way around. Surround import() with try/catch after that handle it

);
process.exit(0);
}
return import(resolvedPath);
Copy link
Contributor

@ematipico ematipico Sep 30, 2019

Choose a reason for hiding this comment

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

This import statement should be moved

@webpack webpack deleted a comment from evenstensberg Sep 30, 2019
Copy link
Member

@rishabh3112 rishabh3112 left a comment

Choose a reason for hiding this comment

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

@evenstensberg left some suggestions :)

if (!process.execArgv.includes("--experimental-modules")) {
// TODO: remove in October
console.error(
'\u001b[1m\u001b[31m You need to supply the --experimental-modules flag in order to run webpack with node v12\u001b[39m\u001b[22m'
Copy link
Member

Choose a reason for hiding this comment

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

Using chalk here would make it more readable.

} catch (err) {
if (err.stack.indexOf("ERR_REQUIRE_ESM") >= 0) {
if (!process.execArgv.includes("--experimental-modules")) {
// TODO: remove in October
Copy link
Member

Choose a reason for hiding this comment

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

Back to Future!? 😅

@ematipico ematipico closed this Feb 6, 2020
@ematipico ematipico reopened this Feb 6, 2020
@webpack-bot
Copy link

@evenstensberg Please review the following output log for errors:

Worker information [...]
Build system information [...]
travis_fold:start:docker_mtu
travis_fold:end:docker_mtu
travis_fold:start:resolvconf
travis_fold:end:resolvconf


Setting environment variables from repository settings
$ export BUNDLESIZE_GITHUB_TOKEN=[secure]
$ export GH_TOKEN=[secure]
$ export nproc=4

Setting environment variables from .travis.yml
$ export JOB_PART=integration


Setting up build cache [...]
 [...]
$ node --version
v8.17.0
$ npm --version
6.13.4
$ nvm --version
0.35.2

$ npm run travis:lint

> webpack-cli@3.3.10 travis:lint /home/travis/build/webpack/webpack-cli
> npm run build && npm run lint


> webpack-cli@3.3.10 build /home/travis/build/webpack/webpack-cli
> tsc


> webpack-cli@3.3.10 lint /home/travis/build/webpack/webpack-cli
> eslint "./bin/*.js" "./bin/**/*.js" "./test/**/*.js" "packages/**/!(node_modules)/*.ts"  "packages/**/!(node_modules)/**/*.ts"


/home/travis/build/webpack/webpack-cli/packages/utils/modify-config-helper.ts
  46:4  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/travis/build/webpack/webpack-cli/packages/webpack-scaffold/index.ts
   51:8   warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
   57:13  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
   90:8   warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
   95:13  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  108:8   warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  114:13  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  127:8   warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  132:13  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

✖ 9 problems (0 errors, 9 warnings)

The command "npm run travis:lint" exited with 0.
$ npm run test:ci

> webpack-cli@3.3.10 test:ci /home/travis/build/webpack/webpack-cli
> nyc jest --maxWorkers=$(nproc) --reporters=default --reporters=jest-junit

PASS test/test-utils.test.js
PASS packages/utils/__tests__/ast-utils.test.ts (7.357s)
PASS packages/webpack-scaffold/__tests__/index.test.ts (5.696s)
PASS packages/utils/__tests__/package-manager.test.ts
PASS packages/utils/__tests__/resolve-packages.test.ts
PASS packages/utils/__tests__/validate-identifier.test.ts
PASS packages/utils/__tests__/recursive-parser.test.ts
PASS packages/migrate/__tests__/migrate.test.ts
PASS packages/migrate/commonsChunkPlugin/__tests__/commonsChunkPlugin.test.ts
PASS test/binCases/help/help-output/help-output.test.js
FAIL test/binCases/output/output-library-many/output-library-many.test.js
  ● output-library-many

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      21 | 	const summary = extractSummary(stdout);
      22 | 
    > 23 | 	expect(code).toBe(0);
         | 	             ^
      24 | 	expect(summary).toEqual(expect.anything());
      25 | 	expect(summary).toContain("index.js");
      26 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/output/output-library-many/output-library-many.test.js:23:15)

PASS packages/utils/__tests__/npm-packages-exists.test.ts
FAIL test/binCases/env/complex/comple.test.js
  ● complex

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      22 | 	const summary = extractSummary(stdout);
      23 | 
    > 24 | 	expect(code).toBe(0);
         | 	             ^
      25 | 	expect(summary).toEqual(expect.anything());
      26 | 	expect(summary).toContain("Environment (--env):");
      27 | 	expect(summary).toContain("baz");

      at Object.<anonymous>.test (test/binCases/env/complex/comple.test.js:24:15)

FAIL test/binCases/output/output-library-single/output-library-single.test.js
  ● output-library-single

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      19 | 	const summary = extractSummary(stdout);
      20 | 
    > 21 | 	expect(code).toBe(0);
         | 	             ^
      22 | 	expect(summary).toEqual(expect.anything());
      23 | 	expect(summary).toContain("index.js");
      24 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/output/output-library-single/output-library-single.test.js:21:15)

FAIL test/binCases/entry/named-entry/named-entry.test.js
  ● named-entry

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      23 | 	const summary = extractSummary(stdout);
      24 | 
    > 25 | 	expect(code).toBe(0);
         | 	             ^
      26 | 	expect(summary).toEqual(expect.anything());
      27 | 	expect(summary).toContain("foo.js"); // named entry from --entry foo=./a.js
      28 | 	expect(summary).toContain("null.js");

      at Object.<anonymous>.test (test/binCases/entry/named-entry/named-entry.test.js:25:15)

FAIL test/binCases/module/module-bind/module-bind.test.js
  ● module-bind

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      20 | 		"post=./post-loader"
      21 | 	]);
    > 22 | 	expect(code).toBe(0);
         | 	             ^
      23 | 
      24 | 	const summary = extractSummary(stdout);
      25 | 

      at Object.<anonymous>.test (test/binCases/module/module-bind/module-bind.test.js:22:15)

PASS packages/utils/__tests__/is-local-path.test.ts
FAIL test/binCases/stats/single-config/single-config.test.js
  ● single-config

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      12 | 	const summary = extractSummary(stdout);
      13 | 
    > 14 | 	expect(code).toBe(0);
         | 	             ^
      15 | 	expect(summary).toContain("");
      16 | 	expect(summary).toContain("main.js");
      17 | 	expect(summary).toContain("chunk");

      at Object.<anonymous>.done (test/binCases/stats/single-config/single-config.test.js:14:15)

FAIL test/binCases/entry/non-hyphenated-args/non-hyphenated-args.test.js
  ● non-hyphenated-args

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      18 | 	const summary = extractSummary(stdout);
      19 | 
    > 20 | 	expect(code).toBe(0);
         | 	             ^
      21 | 	expect(summary).toEqual(expect.anything());
      22 | 	expect(summary).toContain("main.js"); // non-hyphenated arg ./a.js should create chunk "main"
      23 | 	expect(summary).toContain("a.js"); // a.js should be in chunk 0

      at Object.<anonymous>.test (test/binCases/entry/non-hyphenated-args/non-hyphenated-args.test.js:20:15)

FAIL test/binCases/entry/multi-file/multi-file.test.js
  ● multi-file

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      21 | 	const summary = extractSummary(stdout);
      22 | 
    > 23 | 	expect(code).toBe(0);
         | 	             ^
      24 | 	expect(summary).toEqual(expect.anything());
      25 | 	expect(summary).toContain("null.js");
      26 | 	expect(summary).toContain("index.js");

      at Object.<anonymous>.test (test/binCases/entry/multi-file/multi-file.test.js:23:15)

FAIL test/binCases/config-name/found-many/found-many.test.js
  ● found-many

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      21 | 	const summary = extractSummary(stdout);
      22 | 
    > 23 | 	expect(code).toBe(0);
         | 	             ^
      24 | 	expect(summary).toEqual(expect.anything());
      25 | 	expect(summary).toContain("./index2.js");
      26 | 	expect(summary).toContain("./index3.js");

      at Object.<anonymous>.test (test/binCases/config-name/found-many/found-many.test.js:23:15)

FAIL test/binCases/configFile/plugins-precedence/plugins-precedence.test.js
  ● plugins-precedence

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      22 | 	const summary = extractSummary(stdout);
      23 | 
    > 24 | 	expect(code).toBe(0);
         | 	             ^
      25 | 	expect(summary).toEqual(expect.anything());
      26 | 	expect(summary).toContain("ok.js");
      27 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/configFile/plugins-precedence/plugins-precedence.test.js:24:15)

FAIL test/binCases/config-type/array/array.test.js
  ● array

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      15 | 	const summary = extractSummary(stdout);
      16 | 
    > 17 | 	expect(code).toBe(0);
         | 	             ^
      18 | 	expect(summary).toEqual(expect.anything());
      19 | 	expect(summary).toContain("Child");
      20 | 	expect(summary).toContain("entry-a.bundle.js");

      at Object.<anonymous>.test (test/binCases/config-type/array/array.test.js:17:15)

FAIL test/binCases/env/string/string.test.js
  ● string

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      21 | 	const summary = extractSummary(stdout);
      22 | 
    > 23 | 	expect(code).toBe(0);
         | 	             ^
      24 | 	expect(summary).toEqual(expect.anything());
      25 | 	expect(summary).toContain("Environment (--env)");
      26 | 	expect(summary).toContain("null.js");

      at Object.<anonymous>.test (test/binCases/env/string/string.test.js:23:15)

FAIL test/binCases/entry/cli-override/cli-override.test.js
  ● cli-override

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      17 | 	const summary = extractSummary(stdout);
      18 | 
    > 19 | 	expect(code).toBe(0);
         | 	             ^
      20 | 	expect(summary).toEqual(expect.anything());
      21 | 	expect(summary).toContain("cliEntry.js");
      22 | 	expect(summary).toContain("index.js");

      at Object.<anonymous>.test (test/binCases/entry/cli-override/cli-override.test.js:19:15)

PASS test/binCases/errors/info-verbosity/info-verbosity.test.js
PASS packages/migrate/loaders/__tests__/loaders.test.ts
FAIL test/binCases/config-name/found-one/found-one.test.js
  ● found-one

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      19 | 	const summary = extractSummary(stdout);
      20 | 
    > 21 | 	expect(code).toBe(0);
         | 	             ^
      22 | 	expect(summary).toEqual(expect.anything());
      23 | 	expect(summary).toContain("./index2.js");
      24 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/config-name/found-one/found-one.test.js:21:15)

FAIL test/binCases/errors/parse/parse.test.js
  ● info-verbosity

    expect(received).toBe(expected) // Object.is equality

    Expected: 2
    Received: 1

       8 | 	const summary = extractSummary(stdout);
       9 | 
    > 10 | 	expect(code).toBe(2);
         | 	             ^
      11 | 	expect(summary).toContain("./index.js");
      12 | 	expect(summary).toContain("[built]");
      13 | 	expect(summary).toContain("[failed]");

      at Object.<anonymous>.test (test/binCases/errors/parse/parse.test.js:10:15)

PASS packages/generators/__tests__/add-generator.test.ts

Please remove deprecated plugins manually. 
See https://webpack.js.org/guides/migrating/ for more information.
Please remove deprecated plugins manually. 
See https://webpack.js.org/guides/migrating/ for more information.
Please remove deprecated plugins manually. 
See https://webpack.js.org/guides/migrating/ for more information.PASS packages/migrate/removeDeprecatedPlugins/__tests__/removeDeprecatedPlugins.test.ts
FAIL test/binCases/errors/v5-schema-validation/validation.test.js
  ● Console

    console.error bin/utils/validate-options.js:352
      Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
       - configuration should be one of these:
         object | [object] | {
           "instanceof": "Promise",
           "description": "A promise that resolves with a configuration object, or an array of configuration objects."
         }
         Details:
          * configuration should be an object.
            -> A webpack configuration object.
          * configuration should be an array:
            [object]
            -> An array of webpack configuration objects.
          * configuration should be an instance of {
              "instanceof": "Promise",
              "description": "A promise that resolves with a configuration object, or an array of configuration objects."
            }
            -> A promise that resolves with a configuration object, or an array of configuration objects.

  ● validation-success

    expect(received).toContain(expected) // indexOf

    Expected substring: "Can't resolve 'hey'"
    Received string:    ""

      13 | test("validation-success", () => {
      14 | 	const { stdout, code } = run(__dirname, ["--config", "./options.js"]);
    > 15 | 	expect(stdout).toContain("Can't resolve 'hey'");
         | 	               ^
      16 | 	expect(code).toBe(2);
      17 | });
      18 | 

      at Object.<anonymous>.test (test/binCases/errors/v5-schema-validation/validation.test.js:15:17)

FAIL test/binCases/errors/clean-webpack-options/clean-webpack-options.test.js
  ● clean-webpack-options

    expect(received).toContain(expected) // indexOf

    Expected substring: "Invalid configuration object."
    Received string:    "/home/travis/build/webpack/webpack-cli/bin/utils/convert-argv.js:126
    							return import(resolvedPath);
    							       ^^^^^^·
    SyntaxError: Unexpected token import

      17 | 	}
      18 | 
    > 19 | 	require("v8-compile-cache");
         | 	                            ^
      20 | 
      21 | 	const ErrorHelpers = require("./utils/errorHelpers");
      22 | 

      at NativeCompileCache._moduleCompile (node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
      at Module._compile (node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at yargs.parse (bin/cli.js:19:370)
      at Object.parse (node_modules/yargs/yargs.js:567:18)
      at bin/cli.js:17:29
      at Object.<anonymous> (bin/cli.js:27:838)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at Object.<anonymous> (node_modules/nyc/bin/wrap.js:27:4)
      "
      at Object.<anonymous>.test (test/binCases/errors/clean-webpack-options/clean-webpack-options.test.js:14:17)

FAIL test/binCases/config-location/set-explicitly/set-explicitly.test.js
  ● set-explicitly

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      16 | 		"async-node"
      17 | 	]);
    > 18 | 	expect(code).toBe(0);
         | 	             ^
      19 | 	expect(stdout).toEqual(expect.anything());
      20 | 	expect(stdout).toContain("./index.js");
      21 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/config-location/set-explicitly/set-explicitly.test.js:18:15)

FAIL test/binCases/config-type/invalid-array/invalid-array.test.js
  ● invalid-array

    expect(received).toContain(expected) // indexOf

    Expected substring: "Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema."
    Received string:    "/home/travis/build/webpack/webpack-cli/bin/utils/convert-argv.js:126
    							return import(resolvedPath);
    							       ^^^^^^·
    SyntaxError: Unexpected token import

      17 | 	}
      18 | 
    > 19 | 	require("v8-compile-cache");
         | 	                            ^
      20 | 
      21 | 	const ErrorHelpers = require("./utils/errorHelpers");
      22 | 

      at NativeCompileCache._moduleCompile (node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
      at Module._compile (node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at yargs.parse (bin/cli.js:19:370)
      at Object.parse (node_modules/yargs/yargs.js:567:18)
      at bin/cli.js:17:29
      at Object.<anonymous> (bin/cli.js:27:838)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at Object.<anonymous> (node_modules/nyc/bin/wrap.js:27:4)
      "
      at Object.<anonymous>.test (test/binCases/config-type/invalid-array/invalid-array.test.js:17:17)

FAIL test/binCases/config-type/invalid-type/invalid-type.test.js
  ● invalid-type

    expect(received).toContain(expected) // indexOf

    Expected substring: "Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema."
    Received string:    "/home/travis/build/webpack/webpack-cli/bin/utils/convert-argv.js:126
    							return import(resolvedPath);
    							       ^^^^^^·
    SyntaxError: Unexpected token import

      17 | 	}
      18 | 
    > 19 | 	require("v8-compile-cache");
         | 	                            ^
      20 | 
      21 | 	const ErrorHelpers = require("./utils/errorHelpers");
      22 | 

      at NativeCompileCache._moduleCompile (node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
      at Module._compile (node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at yargs.parse (bin/cli.js:19:370)
      at Object.parse (node_modules/yargs/yargs.js:567:18)
      at bin/cli.js:17:29
      at Object.<anonymous> (bin/cli.js:27:838)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at Object.<anonymous> (node_modules/nyc/bin/wrap.js:27:4)
      "
      at Object.<anonymous>.test (test/binCases/config-type/invalid-type/invalid-type.test.js:17:17)

FAIL test/binCases/config-location/webpackfile-config/packages/foo/webpackfile-config.test.js
  ● find-recursively

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      12 | 		"async-node"
      13 | 	]);
    > 14 | 	expect(code).toBe(0);
         | 	             ^
      15 | 	expect(stdout).toEqual(expect.anything());
      16 | 	expect(stdout).toContain("/index1.js");
      17 | 	expect(stdout).not.toContain("/index2.js");

      at Object.<anonymous>.test (test/binCases/config-location/webpackfile-config/packages/foo/webpackfile-config.test.js:14:15)

PASS packages/generators/__tests__/loader-generator.test.ts
FAIL test/binCases/stats/custom-preset/custom-preset.test.js
  ● custom-preset

    expect(received).toHaveLength(expected)

    Expected length: 0
    Received length: 2218
    Received string: "/home/travis/build/webpack/webpack-cli/bin/utils/convert-argv.js:126
    							return import(resolvedPath);
    							       ^^^^^^·
    SyntaxError: Unexpected token import

      17 | 	}
      18 | 
    > 19 | 	require("v8-compile-cache");
         | 	                            ^
      20 | 
      21 | 	const ErrorHelpers = require("./utils/errorHelpers");
      22 | 

      at NativeCompileCache._moduleCompile (node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
      at Module._compile (node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at yargs.parse (bin/cli.js:19:370)
      at Object.parse (node_modules/yargs/yargs.js:567:18)
      at bin/cli.js:17:29
      at Object.<anonymous> (bin/cli.js:27:838)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at Object.<anonymous> (node_modules/nyc/bin/wrap.js:27:4)
      "
      at Object.<anonymous>.test (test/binCases/stats/custom-preset/custom-preset.test.js:20:17)

FAIL test/binCases/config-type/function-promise/function-promise.test.js
  ● function-promise

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      15 | 	const summary = extractSummary(stdout);
      16 | 
    > 17 | 	expect(code).toBe(0);
         | 	             ^
      18 | 	expect(summary).toEqual(expect.anything());
      19 | 	expect(summary).toContain("entry.bundle.js");
      20 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/config-type/function-promise/function-promise.test.js:17:15)

FAIL test/binCases/output/output-argument/output-argument.test.js
  ● output-argument

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      14 | 	const summary = extractSummary(stdout);
      15 | 
    > 16 | 	expect(code).toBe(0);
         | 	             ^
      17 | 	expect(summary).toEqual(expect.anything());
      18 | 	expect(summary).toContain("bundle.js");
      19 | 	expect(summary).toContain("index.js");

      at Object.<anonymous>.test (test/binCases/output/output-argument/output-argument.test.js:16:15)

FAIL test/binCases/config-type/function/function.test.js
  ● function

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      15 | 	const summary = extractSummary(stdout);
      16 | 
    > 17 | 	expect(code).toBe(0);
         | 	             ^
      18 | 	expect(summary).toEqual(expect.anything());
      19 | 	expect(summary).toContain("entry.bundle.js");
      20 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/config-type/function/function.test.js:17:15)

FAIL test/binCases/config-type/object/object.test.js
  ● object

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      15 | 	const summary = extractSummary(stdout);
      16 | 
    > 17 | 	expect(code).toBe(0);
         | 	             ^
      18 | 	expect(summary).toEqual(expect.anything());
      19 | 	expect(summary).toContain("entry.bundle.js");
      20 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/config-type/object/object.test.js:17:15)

FAIL test/binCases/config-type/promise/promise.test.js
  ● promise

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      15 | 	const summary = extractSummary(stdout);
      16 | 
    > 17 | 	expect(code).toBe(0);
         | 	             ^
      18 | 	expect(summary).toEqual(expect.anything());
      19 | 	expect(summary).toContain("entry.bundle.js");
      20 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/config-type/promise/promise.test.js:17:15)

FAIL test/binCases/config-location/find-recursively/packages/foo/find-recursively.test.js
  ● find-recursively

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      12 | 		"async-node"
      13 | 	]);
    > 14 | 	expect(code).toBe(0);
         | 	             ^
      15 | 	expect(stdout).toEqual(expect.anything());
      16 | 	expect(stdout).toContain("/index2.js");
      17 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/config-location/find-recursively/packages/foo/find-recursively.test.js:14:15)

PASS packages/migrate/uglifyJsPlugin/__tests__/uglifyJsPlugin.test.ts
FAIL test/binCases/mode/none/none.test.js
  ● none

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

       6 | 	const { code, stdout, stderr } = run(__dirname, ["./index.js", "--mode", "none"]);
       7 | 
    >  8 | 	expect(code).toBe(0);
         | 	             ^
       9 | 
      10 | 	const summary = extractSummary(stdout);
      11 | 

      at Object.<anonymous>.test (test/binCases/mode/none/none.test.js:8:15)

FAIL test/binCases/config-location/set-implicitly/set-implicitly.test.js
  ● set-implicitly

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      12 | 		"async-node"
      13 | 	]);
    > 14 | 	expect(code).toBe(0);
         | 	             ^
      15 | 	expect(stdout).toEqual(expect.anything());
      16 | 	expect(stdout).toContain("./index2.js");
      17 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/config-location/set-implicitly/set-implicitly.test.js:14:15)

PASS packages/migrate/loaderOptionsPlugin/__tests__/loaderOptionsPlugin.test.ts
PASS packages/utils/__tests__/npm-exists.test.ts
FAIL test/binCases/no-options/production/production.test.js
  ● production

    expect(received).toBe(expected) // Object.is equality

    Expected: 2
    Received: 1

       5 | test("production", () => {
       6 | 	const { code, stdout, stderr } = run(__dirname, ["--mode", "production"]);
    >  7 | 	expect(code).toBe(2);
         | 	             ^
       8 | 	expect(stdout).toEqual(expect.anything());
       9 | 	expect(stderr).toContain("Insufficient number of arguments or no entry found.");
      10 | 	expect(stderr).toContain("Alternatively, run 'webpack(-cli) --help' for usage info.");

      at Object.<anonymous>.test (test/binCases/no-options/production/production.test.js:7:15)

FAIL test/binCases/stats/build-delimiter/build-delimiter.test.js
  ● build-delimiter

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      15 | 	const summary = extractSummary(stdout);
      16 | 
    > 17 | 	expect(code).toBe(0);
         | 	             ^
      18 | 	expect(summary).toContain("success");
      19 | 	expect(stderr).toHaveLength(0);
      20 | });

      at Object.<anonymous>.test (test/binCases/stats/build-delimiter/build-delimiter.test.js:17:15)

FAIL test/binCases/config-name/not-found/not-found.test.js
  ● not-found

    expect(received).toContain(expected) // indexOf

    Expected substring: "Configuration with name 'foo' was not found."
    Received string:    "/home/travis/build/webpack/webpack-cli/bin/utils/convert-argv.js:126
    							return import(resolvedPath);
    							       ^^^^^^·
    SyntaxError: Unexpected token import

      17 | 	}
      18 | 
    > 19 | 	require("v8-compile-cache");
         | 	                            ^
      20 | 
      21 | 	const ErrorHelpers = require("./utils/errorHelpers");
      22 | 

      at NativeCompileCache._moduleCompile (node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
      at Module._compile (node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at yargs.parse (bin/cli.js:19:370)
      at Object.parse (node_modules/yargs/yargs.js:567:18)
      at bin/cli.js:17:29
      at Object.<anonymous> (bin/cli.js:27:838)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at Object.<anonymous> (node_modules/nyc/bin/wrap.js:27:4)
      "
      at Object.<anonymous>.test (test/binCases/config-name/not-found/not-found.test.js:12:17)

FAIL test/binCases/config-location/not-found/not-found.test.js
  ● not-found

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      14 | 		"production"
      15 | 	]);
    > 16 | 	expect(code).toBe(0);
         | 	             ^
      17 | 	expect(stdout).toContain("./src/index.js");
      18 | 	expect(stderr).toHaveLength(0);
      19 | });

      at Object.<anonymous>.test (test/binCases/config-location/not-found/not-found.test.js:16:15)

PASS packages/migrate/removeJsonLoader/__tests__/removeJsonLoader.test.ts
PASS packages/migrate/moduleConcatenationPlugin/__tests__/moduleConcatenationPlugin.test.ts
FAIL test/binCases/no-options/none/none.test.js
  ● none

    expect(received).toBe(expected) // Object.is equality

    Expected: 2
    Received: 1

       5 | test("none", () => {
       6 | 	const { code, stdout, stderr } = run(__dirname);
    >  7 | 	expect(code).toBe(2);
         | 	             ^
       8 | 	expect(stdout).toEqual(expect.anything());
       9 | 	expect(stderr).toContain("Insufficient number of arguments or no entry found.");
      10 | 	expect(stderr).toContain("Alternatively, run 'webpack(-cli) --help' for usage info.");

      at Object.<anonymous>.test (test/binCases/no-options/none/none.test.js:7:15)

FAIL test/binCases/errors/issue-5576/issue-5576.test.js
  ● info-verbosity

    expect(received).toBe(expected) // Object.is equality

    Expected: 2
    Received: 1

       8 | 	const summary = extractSummary(stdout);
       9 | 
    > 10 | 	expect(code).toBe(2);
         | 	             ^
      11 | 	expect(summary).toContain("bundle.js");
      12 | 
      13 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/errors/issue-5576/issue-5576.test.js:10:15)

PASS packages/migrate/noEmitOnErrorsPlugin/__tests__/noEmitOnErrorsPlugin.test.ts
FAIL test/binCases/configFile/profile/profile.test.js
  ● profile

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

       8 | 	const summary = extractSummary(stdout);
       9 | 
    > 10 | 	expect(code).toBe(0);
         | 	             ^
      11 | 	expect(summary).toEqual(expect.anything());
      12 | 	expect(summary).toContain("factory:");
      13 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/configFile/profile/profile.test.js:10:15)

PASS packages/migrate/namedModulesPlugin/__tests__/namedModulesPlugin.test.ts
FAIL test/binCases/entry/display-entrypoints/display-entrypoints.test.js
  ● display-entrypoints

    expect(received).toHaveLength(expected)

    Expected length: 0
    Received length: 2218
    Received string: "/home/travis/build/webpack/webpack-cli/bin/utils/convert-argv.js:126
    							return import(resolvedPath);
    							       ^^^^^^·
    SyntaxError: Unexpected token import

      17 | 	}
      18 | 
    > 19 | 	require("v8-compile-cache");
         | 	                            ^
      20 | 
      21 | 	const ErrorHelpers = require("./utils/errorHelpers");
      22 | 

      at NativeCompileCache._moduleCompile (node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
      at Module._compile (node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at yargs.parse (bin/cli.js:19:370)
      at Object.parse (node_modules/yargs/yargs.js:567:18)
      at bin/cli.js:17:29
      at Object.<anonymous> (bin/cli.js:27:838)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at Object.<anonymous> (node_modules/nyc/bin/wrap.js:27:4)
      "
      at Object.<anonymous>.test (test/binCases/entry/display-entrypoints/display-entrypoints.test.js:11:17)

FAIL test/binCases/stats/multi-config/multi-config.test.js
  ● multi-config

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

       8 | 	const summary = extractSummary(stdout);
       9 | 
    > 10 | 	expect(code).toBe(0);
         | 	             ^
      11 | 	expect(summary).toEqual(expect.anything());
      12 | 	expect(stderr).toHaveLength(0);
      13 | });

      at Object.<anonymous>.test (test/binCases/stats/multi-config/multi-config.test.js:10:15)

PASS packages/migrate/bannerPlugin/__tests__/bannerPlugin.test.ts
FAIL test/binCases/silent/silent-output/silent.test.js
  ● silent

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

       8 | 	const summary = extractSummary(stdout);
       9 | 
    > 10 | 	expect(code).toBe(0);
         | 	             ^
      11 | 	expect(summary).toHaveLength(0);
      12 | 	expect(stderr).toHaveLength(0);
      13 | });

      at Object.<anonymous>.test (test/binCases/silent/silent-output/silent.test.js:10:15)

FAIL test/binCases/config-location/webpack-babel-config/webpack-babel-config.test.js
  ● webpack-babel-config

    expect(received).toContain(expected) // indexOf

    Expected substring: "es6.js"
    Received string:    ""

       5 | test("webpack-babel-config", () => {
       6 | 	const { stdout, stderr } = run(__dirname, ["--target", "async-node", "-r", "esm", "@babel/register"]);
    >  7 | 	expect(stdout).toContain("es6.js");
         | 	               ^
       8 | 	expect(stderr).toHaveLength(0);
       9 | });
      10 | 

      at Object.<anonymous>.test (test/binCases/config-location/webpack-babel-config/webpack-babel-config.test.js:7:17)

PASS packages/migrate/outputPath/__tests__/outputPath.test.ts
PASS packages/migrate/extractTextPlugin/__tests__/extractTextPlugin.test.ts
FAIL test/binCases/stats/none/none.test.js
  ● none

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

       6 | 	const { code, stdout, stderr } = run(__dirname);
       7 | 
    >  8 | 	expect(code).toBe(0);
         | 	             ^
       9 | 	expect(stdout).toHaveLength(0);
      10 | 	expect(stderr).toHaveLength(0);
      11 | });

      at Object.<anonymous>.test (test/binCases/stats/none/none.test.js:8:15)

PASS packages/migrate/resolve/__tests__/resolve.test.ts

Summary of all failing tests
FAIL test/binCases/output/output-library-many/output-library-many.test.js
  ● output-library-many

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      21 | 	const summary = extractSummary(stdout);
      22 | 
    > 23 | 	expect(code).toBe(0);
         | 	             ^
      24 | 	expect(summary).toEqual(expect.anything());
      25 | 	expect(summary).toContain("index.js");
      26 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/output/output-library-many/output-library-many.test.js:23:15)

FAIL test/binCases/env/complex/comple.test.js
  ● complex

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      22 | 	const summary = extractSummary(stdout);
      23 | 
    > 24 | 	expect(code).toBe(0);
         | 	             ^
      25 | 	expect(summary).toEqual(expect.anything());
      26 | 	expect(summary).toContain("Environment (--env):");
      27 | 	expect(summary).toContain("baz");

      at Object.<anonymous>.test (test/binCases/env/complex/comple.test.js:24:15)

FAIL test/binCases/output/output-library-single/output-library-single.test.js
  ● output-library-single

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      19 | 	const summary = extractSummary(stdout);
      20 | 
    > 21 | 	expect(code).toBe(0);
         | 	             ^
      22 | 	expect(summary).toEqual(expect.anything());
      23 | 	expect(summary).toContain("index.js");
      24 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/output/output-library-single/output-library-single.test.js:21:15)

FAIL test/binCases/entry/named-entry/named-entry.test.js
  ● named-entry

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      23 | 	const summary = extractSummary(stdout);
      24 | 
    > 25 | 	expect(code).toBe(0);
         | 	             ^
      26 | 	expect(summary).toEqual(expect.anything());
      27 | 	expect(summary).toContain("foo.js"); // named entry from --entry foo=./a.js
      28 | 	expect(summary).toContain("null.js");

      at Object.<anonymous>.test (test/binCases/entry/named-entry/named-entry.test.js:25:15)

FAIL test/binCases/module/module-bind/module-bind.test.js
  ● module-bind

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      20 | 		"post=./post-loader"
      21 | 	]);
    > 22 | 	expect(code).toBe(0);
         | 	             ^
      23 | 
      24 | 	const summary = extractSummary(stdout);
      25 | 

      at Object.<anonymous>.test (test/binCases/module/module-bind/module-bind.test.js:22:15)

FAIL test/binCases/stats/single-config/single-config.test.js
  ● single-config

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      12 | 	const summary = extractSummary(stdout);
      13 | 
    > 14 | 	expect(code).toBe(0);
         | 	             ^
      15 | 	expect(summary).toContain("");
      16 | 	expect(summary).toContain("main.js");
      17 | 	expect(summary).toContain("chunk");

      at Object.<anonymous>.done (test/binCases/stats/single-config/single-config.test.js:14:15)

FAIL test/binCases/entry/non-hyphenated-args/non-hyphenated-args.test.js
  ● non-hyphenated-args

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      18 | 	const summary = extractSummary(stdout);
      19 | 
    > 20 | 	expect(code).toBe(0);
         | 	             ^
      21 | 	expect(summary).toEqual(expect.anything());
      22 | 	expect(summary).toContain("main.js"); // non-hyphenated arg ./a.js should create chunk "main"
      23 | 	expect(summary).toContain("a.js"); // a.js should be in chunk 0

      at Object.<anonymous>.test (test/binCases/entry/non-hyphenated-args/non-hyphenated-args.test.js:20:15)

FAIL test/binCases/entry/multi-file/multi-file.test.js
  ● multi-file

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      21 | 	const summary = extractSummary(stdout);
      22 | 
    > 23 | 	expect(code).toBe(0);
         | 	             ^
      24 | 	expect(summary).toEqual(expect.anything());
      25 | 	expect(summary).toContain("null.js");
      26 | 	expect(summary).toContain("index.js");

      at Object.<anonymous>.test (test/binCases/entry/multi-file/multi-file.test.js:23:15)

FAIL test/binCases/config-name/found-many/found-many.test.js
  ● found-many

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      21 | 	const summary = extractSummary(stdout);
      22 | 
    > 23 | 	expect(code).toBe(0);
         | 	             ^
      24 | 	expect(summary).toEqual(expect.anything());
      25 | 	expect(summary).toContain("./index2.js");
      26 | 	expect(summary).toContain("./index3.js");

      at Object.<anonymous>.test (test/binCases/config-name/found-many/found-many.test.js:23:15)

FAIL test/binCases/configFile/plugins-precedence/plugins-precedence.test.js
  ● plugins-precedence

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      22 | 	const summary = extractSummary(stdout);
      23 | 
    > 24 | 	expect(code).toBe(0);
         | 	             ^
      25 | 	expect(summary).toEqual(expect.anything());
      26 | 	expect(summary).toContain("ok.js");
      27 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/configFile/plugins-precedence/plugins-precedence.test.js:24:15)

FAIL test/binCases/config-type/array/array.test.js
  ● array

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      15 | 	const summary = extractSummary(stdout);
      16 | 
    > 17 | 	expect(code).toBe(0);
         | 	             ^
      18 | 	expect(summary).toEqual(expect.anything());
      19 | 	expect(summary).toContain("Child");
      20 | 	expect(summary).toContain("entry-a.bundle.js");

      at Object.<anonymous>.test (test/binCases/config-type/array/array.test.js:17:15)

FAIL test/binCases/env/string/string.test.js
  ● string

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      21 | 	const summary = extractSummary(stdout);
      22 | 
    > 23 | 	expect(code).toBe(0);
         | 	             ^
      24 | 	expect(summary).toEqual(expect.anything());
      25 | 	expect(summary).toContain("Environment (--env)");
      26 | 	expect(summary).toContain("null.js");

      at Object.<anonymous>.test (test/binCases/env/string/string.test.js:23:15)

FAIL test/binCases/entry/cli-override/cli-override.test.js
  ● cli-override

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      17 | 	const summary = extractSummary(stdout);
      18 | 
    > 19 | 	expect(code).toBe(0);
         | 	             ^
      20 | 	expect(summary).toEqual(expect.anything());
      21 | 	expect(summary).toContain("cliEntry.js");
      22 | 	expect(summary).toContain("index.js");

      at Object.<anonymous>.test (test/binCases/entry/cli-override/cli-override.test.js:19:15)

FAIL test/binCases/config-name/found-one/found-one.test.js
  ● found-one

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      19 | 	const summary = extractSummary(stdout);
      20 | 
    > 21 | 	expect(code).toBe(0);
         | 	             ^
      22 | 	expect(summary).toEqual(expect.anything());
      23 | 	expect(summary).toContain("./index2.js");
      24 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/config-name/found-one/found-one.test.js:21:15)

FAIL test/binCases/errors/parse/parse.test.js
  ● info-verbosity

    expect(received).toBe(expected) // Object.is equality

    Expected: 2
    Received: 1

       8 | 	const summary = extractSummary(stdout);
       9 | 
    > 10 | 	expect(code).toBe(2);
         | 	             ^
      11 | 	expect(summary).toContain("./index.js");
      12 | 	expect(summary).toContain("[built]");
      13 | 	expect(summary).toContain("[failed]");

      at Object.<anonymous>.test (test/binCases/errors/parse/parse.test.js:10:15)

FAIL test/binCases/errors/v5-schema-validation/validation.test.js
  ● validation-success

    expect(received).toContain(expected) // indexOf

    Expected substring: "Can't resolve 'hey'"
    Received string:    ""

      13 | test("validation-success", () => {
      14 | 	const { stdout, code } = run(__dirname, ["--config", "./options.js"]);
    > 15 | 	expect(stdout).toContain("Can't resolve 'hey'");
         | 	               ^
      16 | 	expect(code).toBe(2);
      17 | });
      18 | 

      at Object.<anonymous>.test (test/binCases/errors/v5-schema-validation/validation.test.js:15:17)

FAIL test/binCases/errors/clean-webpack-options/clean-webpack-options.test.js
  ● clean-webpack-options

    expect(received).toContain(expected) // indexOf

    Expected substring: "Invalid configuration object."
    Received string:    "/home/travis/build/webpack/webpack-cli/bin/utils/convert-argv.js:126
    							return import(resolvedPath);
    							       ^^^^^^·
    SyntaxError: Unexpected token import

      17 | 	}
      18 | 
    > 19 | 	require("v8-compile-cache");
         | 	                            ^
      20 | 
      21 | 	const ErrorHelpers = require("./utils/errorHelpers");
      22 | 

      at NativeCompileCache._moduleCompile (node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
      at Module._compile (node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at yargs.parse (bin/cli.js:19:370)
      at Object.parse (node_modules/yargs/yargs.js:567:18)
      at bin/cli.js:17:29
      at Object.<anonymous> (bin/cli.js:27:838)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at Object.<anonymous> (node_modules/nyc/bin/wrap.js:27:4)
      "
      at Object.<anonymous>.test (test/binCases/errors/clean-webpack-options/clean-webpack-options.test.js:14:17)

FAIL test/binCases/config-location/set-explicitly/set-explicitly.test.js
  ● set-explicitly

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      16 | 		"async-node"
      17 | 	]);
    > 18 | 	expect(code).toBe(0);
         | 	             ^
      19 | 	expect(stdout).toEqual(expect.anything());
      20 | 	expect(stdout).toContain("./index.js");
      21 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/config-location/set-explicitly/set-explicitly.test.js:18:15)

FAIL test/binCases/config-type/invalid-array/invalid-array.test.js
  ● invalid-array

    expect(received).toContain(expected) // indexOf

    Expected substring: "Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema."
    Received string:    "/home/travis/build/webpack/webpack-cli/bin/utils/convert-argv.js:126
    							return import(resolvedPath);
    							       ^^^^^^·
    SyntaxError: Unexpected token import

      17 | 	}
      18 | 
    > 19 | 	require("v8-compile-cache");
         | 	                            ^
      20 | 
      21 | 	const ErrorHelpers = require("./utils/errorHelpers");
      22 | 

      at NativeCompileCache._moduleCompile (node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
      at Module._compile (node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at yargs.parse (bin/cli.js:19:370)
      at Object.parse (node_modules/yargs/yargs.js:567:18)
      at bin/cli.js:17:29
      at Object.<anonymous> (bin/cli.js:27:838)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at Object.<anonymous> (node_modules/nyc/bin/wrap.js:27:4)
      "
      at Object.<anonymous>.test (test/binCases/config-type/invalid-array/invalid-array.test.js:17:17)

FAIL test/binCases/config-type/invalid-type/invalid-type.test.js
  ● invalid-type

    expect(received).toContain(expected) // indexOf

    Expected substring: "Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema."
    Received string:    "/home/travis/build/webpack/webpack-cli/bin/utils/convert-argv.js:126
    							return import(resolvedPath);
    							       ^^^^^^·
    SyntaxError: Unexpected token import

      17 | 	}
      18 | 
    > 19 | 	require("v8-compile-cache");
         | 	                            ^
      20 | 
      21 | 	const ErrorHelpers = require("./utils/errorHelpers");
      22 | 

      at NativeCompileCache._moduleCompile (node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
      at Module._compile (node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at yargs.parse (bin/cli.js:19:370)
      at Object.parse (node_modules/yargs/yargs.js:567:18)
      at bin/cli.js:17:29
      at Object.<anonymous> (bin/cli.js:27:838)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at Object.<anonymous> (node_modules/nyc/bin/wrap.js:27:4)
      "
      at Object.<anonymous>.test (test/binCases/config-type/invalid-type/invalid-type.test.js:17:17)

FAIL test/binCases/config-location/webpackfile-config/packages/foo/webpackfile-config.test.js
  ● find-recursively

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      12 | 		"async-node"
      13 | 	]);
    > 14 | 	expect(code).toBe(0);
         | 	             ^
      15 | 	expect(stdout).toEqual(expect.anything());
      16 | 	expect(stdout).toContain("/index1.js");
      17 | 	expect(stdout).not.toContain("/index2.js");

      at Object.<anonymous>.test (test/binCases/config-location/webpackfile-config/packages/foo/webpackfile-config.test.js:14:15)

FAIL test/binCases/stats/custom-preset/custom-preset.test.js
  ● custom-preset

    expect(received).toHaveLength(expected)

    Expected length: 0
    Received length: 2218
    Received string: "/home/travis/build/webpack/webpack-cli/bin/utils/convert-argv.js:126
    							return import(resolvedPath);
    							       ^^^^^^·
    SyntaxError: Unexpected token import

      17 | 	}
      18 | 
    > 19 | 	require("v8-compile-cache");
         | 	                            ^
      20 | 
      21 | 	const ErrorHelpers = require("./utils/errorHelpers");
      22 | 

      at NativeCompileCache._moduleCompile (node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
      at Module._compile (node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at yargs.parse (bin/cli.js:19:370)
      at Object.parse (node_modules/yargs/yargs.js:567:18)
      at bin/cli.js:17:29
      at Object.<anonymous> (bin/cli.js:27:838)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at Object.<anonymous> (node_modules/nyc/bin/wrap.js:27:4)
      "
      at Object.<anonymous>.test (test/binCases/stats/custom-preset/custom-preset.test.js:20:17)

FAIL test/binCases/config-type/function-promise/function-promise.test.js
  ● function-promise

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      15 | 	const summary = extractSummary(stdout);
      16 | 
    > 17 | 	expect(code).toBe(0);
         | 	             ^
      18 | 	expect(summary).toEqual(expect.anything());
      19 | 	expect(summary).toContain("entry.bundle.js");
      20 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/config-type/function-promise/function-promise.test.js:17:15)

FAIL test/binCases/output/output-argument/output-argument.test.js
  ● output-argument

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      14 | 	const summary = extractSummary(stdout);
      15 | 
    > 16 | 	expect(code).toBe(0);
         | 	             ^
      17 | 	expect(summary).toEqual(expect.anything());
      18 | 	expect(summary).toContain("bundle.js");
      19 | 	expect(summary).toContain("index.js");

      at Object.<anonymous>.test (test/binCases/output/output-argument/output-argument.test.js:16:15)

FAIL test/binCases/config-type/function/function.test.js
  ● function

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      15 | 	const summary = extractSummary(stdout);
      16 | 
    > 17 | 	expect(code).toBe(0);
         | 	             ^
      18 | 	expect(summary).toEqual(expect.anything());
      19 | 	expect(summary).toContain("entry.bundle.js");
      20 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/config-type/function/function.test.js:17:15)

FAIL test/binCases/config-type/object/object.test.js
  ● object

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      15 | 	const summary = extractSummary(stdout);
      16 | 
    > 17 | 	expect(code).toBe(0);
         | 	             ^
      18 | 	expect(summary).toEqual(expect.anything());
      19 | 	expect(summary).toContain("entry.bundle.js");
      20 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/config-type/object/object.test.js:17:15)

FAIL test/binCases/config-type/promise/promise.test.js
  ● promise

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      15 | 	const summary = extractSummary(stdout);
      16 | 
    > 17 | 	expect(code).toBe(0);
         | 	             ^
      18 | 	expect(summary).toEqual(expect.anything());
      19 | 	expect(summary).toContain("entry.bundle.js");
      20 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/config-type/promise/promise.test.js:17:15)

FAIL test/binCases/config-location/find-recursively/packages/foo/find-recursively.test.js
  ● find-recursively

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      12 | 		"async-node"
      13 | 	]);
    > 14 | 	expect(code).toBe(0);
         | 	             ^
      15 | 	expect(stdout).toEqual(expect.anything());
      16 | 	expect(stdout).toContain("/index2.js");
      17 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/config-location/find-recursively/packages/foo/find-recursively.test.js:14:15)

FAIL test/binCases/mode/none/none.test.js
  ● none

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

       6 | 	const { code, stdout, stderr } = run(__dirname, ["./index.js", "--mode", "none"]);
       7 | 
    >  8 | 	expect(code).toBe(0);
         | 	             ^
       9 | 
      10 | 	const summary = extractSummary(stdout);
      11 | 

      at Object.<anonymous>.test (test/binCases/mode/none/none.test.js:8:15)

FAIL test/binCases/config-location/set-implicitly/set-implicitly.test.js
  ● set-implicitly

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      12 | 		"async-node"
      13 | 	]);
    > 14 | 	expect(code).toBe(0);
         | 	             ^
      15 | 	expect(stdout).toEqual(expect.anything());
      16 | 	expect(stdout).toContain("./index2.js");
      17 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/config-location/set-implicitly/set-implicitly.test.js:14:15)

FAIL test/binCases/no-options/production/production.test.js
  ● production

    expect(received).toBe(expected) // Object.is equality

    Expected: 2
    Received: 1

       5 | test("production", () => {
       6 | 	const { code, stdout, stderr } = run(__dirname, ["--mode", "production"]);
    >  7 | 	expect(code).toBe(2);
         | 	             ^
       8 | 	expect(stdout).toEqual(expect.anything());
       9 | 	expect(stderr).toContain("Insufficient number of arguments or no entry found.");
      10 | 	expect(stderr).toContain("Alternatively, run 'webpack(-cli) --help' for usage info.");

      at Object.<anonymous>.test (test/binCases/no-options/production/production.test.js:7:15)

FAIL test/binCases/stats/build-delimiter/build-delimiter.test.js
  ● build-delimiter

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      15 | 	const summary = extractSummary(stdout);
      16 | 
    > 17 | 	expect(code).toBe(0);
         | 	             ^
      18 | 	expect(summary).toContain("success");
      19 | 	expect(stderr).toHaveLength(0);
      20 | });

      at Object.<anonymous>.test (test/binCases/stats/build-delimiter/build-delimiter.test.js:17:15)

FAIL test/binCases/config-name/not-found/not-found.test.js
  ● not-found

    expect(received).toContain(expected) // indexOf

    Expected substring: "Configuration with name 'foo' was not found."
    Received string:    "/home/travis/build/webpack/webpack-cli/bin/utils/convert-argv.js:126
    							return import(resolvedPath);
    							       ^^^^^^·
    SyntaxError: Unexpected token import

      17 | 	}
      18 | 
    > 19 | 	require("v8-compile-cache");
         | 	                            ^
      20 | 
      21 | 	const ErrorHelpers = require("./utils/errorHelpers");
      22 | 

      at NativeCompileCache._moduleCompile (node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
      at Module._compile (node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at yargs.parse (bin/cli.js:19:370)
      at Object.parse (node_modules/yargs/yargs.js:567:18)
      at bin/cli.js:17:29
      at Object.<anonymous> (bin/cli.js:27:838)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at Object.<anonymous> (node_modules/nyc/bin/wrap.js:27:4)
      "
      at Object.<anonymous>.test (test/binCases/config-name/not-found/not-found.test.js:12:17)

FAIL test/binCases/config-location/not-found/not-found.test.js
  ● not-found

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

      14 | 		"production"
      15 | 	]);
    > 16 | 	expect(code).toBe(0);
         | 	             ^
      17 | 	expect(stdout).toContain("./src/index.js");
      18 | 	expect(stderr).toHaveLength(0);
      19 | });

      at Object.<anonymous>.test (test/binCases/config-location/not-found/not-found.test.js:16:15)

FAIL test/binCases/no-options/none/none.test.js
  ● none

    expect(received).toBe(expected) // Object.is equality

    Expected: 2
    Received: 1

       5 | test("none", () => {
       6 | 	const { code, stdout, stderr } = run(__dirname);
    >  7 | 	expect(code).toBe(2);
         | 	             ^
       8 | 	expect(stdout).toEqual(expect.anything());
       9 | 	expect(stderr).toContain("Insufficient number of arguments or no entry found.");
      10 | 	expect(stderr).toContain("Alternatively, run 'webpack(-cli) --help' for usage info.");

      at Object.<anonymous>.test (test/binCases/no-options/none/none.test.js:7:15)

FAIL test/binCases/errors/issue-5576/issue-5576.test.js
  ● info-verbosity

    expect(received).toBe(expected) // Object.is equality

    Expected: 2
    Received: 1

       8 | 	const summary = extractSummary(stdout);
       9 | 
    > 10 | 	expect(code).toBe(2);
         | 	             ^
      11 | 	expect(summary).toContain("bundle.js");
      12 | 
      13 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/errors/issue-5576/issue-5576.test.js:10:15)

FAIL test/binCases/configFile/profile/profile.test.js
  ● profile

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

       8 | 	const summary = extractSummary(stdout);
       9 | 
    > 10 | 	expect(code).toBe(0);
         | 	             ^
      11 | 	expect(summary).toEqual(expect.anything());
      12 | 	expect(summary).toContain("factory:");
      13 | 	expect(stderr).toHaveLength(0);

      at Object.<anonymous>.test (test/binCases/configFile/profile/profile.test.js:10:15)

FAIL test/binCases/entry/display-entrypoints/display-entrypoints.test.js
  ● display-entrypoints

    expect(received).toHaveLength(expected)

    Expected length: 0
    Received length: 2218
    Received string: "/home/travis/build/webpack/webpack-cli/bin/utils/convert-argv.js:126
    							return import(resolvedPath);
    							       ^^^^^^·
    SyntaxError: Unexpected token import

      17 | 	}
      18 | 
    > 19 | 	require("v8-compile-cache");
         | 	                            ^
      20 | 
      21 | 	const ErrorHelpers = require("./utils/errorHelpers");
      22 | 

      at NativeCompileCache._moduleCompile (node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
      at Module._compile (node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at yargs.parse (bin/cli.js:19:370)
      at Object.parse (node_modules/yargs/yargs.js:567:18)
      at bin/cli.js:17:29
      at Object.<anonymous> (bin/cli.js:27:838)
      at Module.replacementCompile (node_modules/append-transform/index.js:58:13)
      at Object.<anonymous> (node_modules/append-transform/index.js:62:4)
      at Object.<anonymous> (node_modules/nyc/bin/wrap.js:27:4)
      "
      at Object.<anonymous>.test (test/binCases/entry/display-entrypoints/display-entrypoints.test.js:11:17)

FAIL test/binCases/stats/multi-config/multi-config.test.js
  ● multi-config

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

       8 | 	const summary = extractSummary(stdout);
       9 | 
    > 10 | 	expect(code).toBe(0);
         | 	             ^
      11 | 	expect(summary).toEqual(expect.anything());
      12 | 	expect(stderr).toHaveLength(0);
      13 | });

      at Object.<anonymous>.test (test/binCases/stats/multi-config/multi-config.test.js:10:15)

FAIL test/binCases/silent/silent-output/silent.test.js
  ● silent

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

       8 | 	const summary = extractSummary(stdout);
       9 | 
    > 10 | 	expect(code).toBe(0);
         | 	             ^
      11 | 	expect(summary).toHaveLength(0);
      12 | 	expect(stderr).toHaveLength(0);
      13 | });

      at Object.<anonymous>.test (test/binCases/silent/silent-output/silent.test.js:10:15)

FAIL test/binCases/config-location/webpack-babel-config/webpack-babel-config.test.js
  ● webpack-babel-config

    expect(received).toContain(expected) // indexOf

    Expected substring: "es6.js"
    Received string:    ""

       5 | test("webpack-babel-config", () => {
       6 | 	const { stdout, stderr } = run(__dirname, ["--target", "async-node", "-r", "esm", "@babel/register"]);
    >  7 | 	expect(stdout).toContain("es6.js");
         | 	               ^
       8 | 	expect(stderr).toHaveLength(0);
       9 | });
      10 | 

      at Object.<anonymous>.test (test/binCases/config-location/webpack-babel-config/webpack-babel-config.test.js:7:17)

FAIL test/binCases/stats/none/none.test.js
  ● none

    expect(received).toBe(expected) // Object.is equality

    Expected: 0
    Received: 1

       6 | 	const { code, stdout, stderr } = run(__dirname);
       7 | 
    >  8 | 	expect(code).toBe(0);
         | 	             ^
       9 | 	expect(stdout).toHaveLength(0);
      10 | 	expect(stderr).toHaveLength(0);
      11 | });

      at Object.<anonymous>.test (test/binCases/stats/none/none.test.js:8:15)


Test Suites: 42 failed, 8 skipped, 28 passed, 70 of 78 total
Tests:       42 failed, 8 skipped, 152 passed, 202 total
Snapshots:   95 passed, 95 total
Time:        36.417s
Ran all test suites.

The command "npm run test:ci" exited with 1.
store build cache [...]

Done. Your build exited with 1.

See complete report here.

@snitin315
Copy link
Member

I have to close this as it has been stale long enough, feel free to reopen with updates.

@snitin315 snitin315 closed this Jul 18, 2020
@alexander-akait alexander-akait deleted the feat/node-v12 branch December 25, 2020 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants