I was using this plugin in rollup and it worked fine in windows, but crashes in rollup without outputting any files or errors on linux (centos). I ran your package test suite and it seems to fail 7 out of 8 tests even on a clean node docker image:
Cloning into 'b'...
remote: Enumerating objects: 128, done.
remote: Total 128 (delta 0), reused 0 (delta 0), pack-reused 128
Receiving objects: 100% (128/128), 67.12 KiB | 0 bytes/s, done.
Resolving deltas: 100% (69/69), done.
Checking connectivity... done.
yarn install v1.9.4
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
warning Your current version of Yarn is out of date. The latest version is "1.10.1", while you're on "1.9.4".
info To upgrade, run the following command:
$ curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
$ yarn test
yarn run v1.9.4
$ jest
console.warn node_modules/rollup/dist/rollup.js:22152
Generated an empty bundle
console.warn node_modules/rollup/dist/rollup.js:22152
Generated an empty bundle
FAIL test/test.js (35.993s)
✕ minify (5045ms)
✕ minify via terser options (5002ms)
✕ minify with sourcemaps (5002ms)
✕ allow to disable source maps (5008ms)
✓ does not allow to pass sourceMap (13ms)
✕ throw error on terser fail (5002ms)
✕ works with code splitting (5003ms)
✕ allow to pass not string values to worker (5003ms)
● minify
Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
4 | const { terser } = require("../");
5 |
> 6 | test("minify", async () => {
| ^
7 | const bundle = await rollup({
8 | input: "test/fixtures/unminified.js",
9 | plugins: [terser()]
at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:85:20)
at Object.test (test/test.js:6:1)
● minify via terser options
Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
16 | });
17 |
> 18 | test("minify via terser options", async () => {
| ^
19 | const bundle = await rollup({
20 | input: "test/fixtures/empty.js",
21 | plugins: [terser({ output: { comments: "all" } })]
at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:85:20)
at Object.test (test/test.js:18:1)
● minify with sourcemaps
Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
29 | });
30 |
> 31 | test("minify with sourcemaps", async () => {
| ^
32 | const bundle = await rollup({
33 | input: "test/fixtures/sourcemap.js",
34 | plugins: [terser()]
at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:85:20)
at Object.test (test/test.js:31:1)
● allow to disable source maps
Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
38 | });
39 |
> 40 | test("allow to disable source maps", async () => {
| ^
41 | const bundle = await rollup({
42 | input: "test/fixtures/sourcemap.js",
43 | plugins: [terser({ sourcemap: false })]
at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:85:20)
at Object.test (test/test.js:40:1)
● throw error on terser fail
Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
58 | });
59 |
> 60 | test("throw error on terser fail", async () => {
| ^
61 | try {
62 | const bundle = await rollup({
63 | input: "test/fixtures/failed.js",
at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:85:20)
at Object.test (test/test.js:60:1)
● works with code splitting
Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
76 | });
77 |
> 78 | test("works with code splitting", async () => {
| ^
79 | const bundle = await rollup({
80 | input: ["test/fixtures/chunk-1.js", "test/fixtures/chunk-2.js"],
81 | experimentalCodeSplitting: true,
at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:85:20)
at Object.test (test/test.js:78:1)
● allow to pass not string values to worker
Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
91 | });
92 |
> 93 | test("allow to pass not string values to worker", async () => {
| ^
94 | const bundle = await rollup({
95 | input: "test/fixtures/unminified.js",
96 | plugins: [terser({ mangle: { properties: { regex: /^_/ } } })]
at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:85:20)
at Object.test (test/test.js:93:1)
Test Suites: 1 failed, 1 total
Tests: 7 failed, 1 passed, 8 total
Snapshots: 0 total
Time: 36.447s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
> [email protected] test /b
> jest
console.warn node_modules/rollup/dist/rollup.js:22152
Generated an empty bundle
console.warn node_modules/rollup/dist/rollup.js:22152
Generated an empty bundle
FAIL test/test.js (35.482s)
✕ minify (5027ms)
✕ minify via terser options (5003ms)
✕ minify with sourcemaps (5002ms)
✕ allow to disable source maps (5006ms)
✓ does not allow to pass sourceMap (2ms)
✕ throw error on terser fail (5002ms)
✕ works with code splitting (5004ms)
✕ allow to pass not string values to worker (5005ms)
● minify
Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
4 | const { terser } = require("../");
5 |
> 6 | test("minify", async () => {
| ^
7 | const bundle = await rollup({
8 | input: "test/fixtures/unminified.js",
9 | plugins: [terser()]
at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:85:20)
at Object.test (test/test.js:6:1)
● minify via terser options
Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
16 | });
17 |
> 18 | test("minify via terser options", async () => {
| ^
19 | const bundle = await rollup({
20 | input: "test/fixtures/empty.js",
21 | plugins: [terser({ output: { comments: "all" } })]
at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:85:20)
at Object.test (test/test.js:18:1)
● minify with sourcemaps
Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
29 | });
30 |
> 31 | test("minify with sourcemaps", async () => {
| ^
32 | const bundle = await rollup({
33 | input: "test/fixtures/sourcemap.js",
34 | plugins: [terser()]
at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:85:20)
at Object.test (test/test.js:31:1)
● allow to disable source maps
Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
38 | });
39 |
> 40 | test("allow to disable source maps", async () => {
| ^
41 | const bundle = await rollup({
42 | input: "test/fixtures/sourcemap.js",
43 | plugins: [terser({ sourcemap: false })]
at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:85:20)
at Object.test (test/test.js:40:1)
● throw error on terser fail
Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
58 | });
59 |
> 60 | test("throw error on terser fail", async () => {
| ^
61 | try {
62 | const bundle = await rollup({
63 | input: "test/fixtures/failed.js",
at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:85:20)
at Object.test (test/test.js:60:1)
● works with code splitting
Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
76 | });
77 |
> 78 | test("works with code splitting", async () => {
| ^
79 | const bundle = await rollup({
80 | input: ["test/fixtures/chunk-1.js", "test/fixtures/chunk-2.js"],
81 | experimentalCodeSplitting: true,
at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:85:20)
at Object.test (test/test.js:78:1)
● allow to pass not string values to worker
Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.
91 | });
92 |
> 93 | test("allow to pass not string values to worker", async () => {
| ^
94 | const bundle = await rollup({
95 | input: "test/fixtures/unminified.js",
96 | plugins: [terser({ mangle: { properties: { regex: /^_/ } } })]
at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:85:20)
at Object.test (test/test.js:93:1)
Test Suites: 1 failed, 1 total
Tests: 7 failed, 1 passed, 8 total
Snapshots: 0 total
Time: 35.934s, estimated 36s
Ran all test suites.
npm ERR! Test failed. See above for more details.