@trickfilm400/rollup-plugin-off-main-thread 2.2.3-fix → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.travis.yml +8 -8
- package/CONTRIBUTING +27 -27
- package/CONTRIBUTORS +11 -11
- package/LICENSE +202 -202
- package/README.md +97 -97
- package/index.js +318 -318
- package/karma.conf.js +46 -46
- package/loader.ejs +76 -76
- package/package.json +42 -39
- package/run_tests.js +105 -105
- package/tests/amd-function-name.test.js +33 -33
- package/tests/asset-in-worker.test.js +33 -33
- package/tests/dynamic-import.test.js +33 -33
- package/tests/fixtures/amd-function-name/a.js +16 -16
- package/tests/fixtures/amd-function-name/build/runner.html +15 -15
- package/tests/fixtures/amd-function-name/config.json +3 -3
- package/tests/fixtures/amd-function-name/entry.js +22 -22
- package/tests/fixtures/assets-in-worker/build/runner.html +15 -15
- package/tests/fixtures/assets-in-worker/entry.js +17 -17
- package/tests/fixtures/assets-in-worker/rollup.config.js +25 -25
- package/tests/fixtures/assets-in-worker/worker.js +18 -18
- package/tests/fixtures/dynamic-import/a.js +16 -16
- package/tests/fixtures/dynamic-import/build/runner.html +15 -15
- package/tests/fixtures/dynamic-import/entry.js +14 -14
- package/tests/fixtures/import-meta/a.js +16 -16
- package/tests/fixtures/import-meta/build/runner.html +15 -15
- package/tests/fixtures/import-meta/entry.js +14 -14
- package/tests/fixtures/import-meta-worker/a.js +12 -12
- package/tests/fixtures/import-meta-worker/build/runner.html +15 -15
- package/tests/fixtures/import-meta-worker/entry.js +22 -22
- package/tests/fixtures/import-worker-url/a.js +16 -16
- package/tests/fixtures/import-worker-url/b.js +16 -16
- package/tests/fixtures/import-worker-url/build/runner.html +15 -15
- package/tests/fixtures/import-worker-url/entry.js +21 -21
- package/tests/fixtures/import-worker-url/worker.js +17 -17
- package/tests/fixtures/import-worker-url-custom-scheme/a.js +16 -16
- package/tests/fixtures/import-worker-url-custom-scheme/b.js +16 -16
- package/tests/fixtures/import-worker-url-custom-scheme/build/runner.html +15 -15
- package/tests/fixtures/import-worker-url-custom-scheme/config.json +3 -3
- package/tests/fixtures/import-worker-url-custom-scheme/entry.js +21 -21
- package/tests/fixtures/import-worker-url-custom-scheme/worker.js +17 -17
- package/tests/fixtures/module-worker/a.js +20 -20
- package/tests/fixtures/module-worker/b.js +20 -20
- package/tests/fixtures/module-worker/build/runner.html +15 -15
- package/tests/fixtures/module-worker/entry.js +17 -17
- package/tests/fixtures/module-worker/rollup.config.js +4 -4
- package/tests/fixtures/module-worker/worker.js +17 -17
- package/tests/fixtures/more-workers/a.js +16 -16
- package/tests/fixtures/more-workers/b.js +16 -16
- package/tests/fixtures/more-workers/build/runner.html +15 -15
- package/tests/fixtures/more-workers/entry.js +34 -34
- package/tests/fixtures/more-workers/worker_a.js +16 -16
- package/tests/fixtures/more-workers/worker_b.js +18 -18
- package/tests/fixtures/public-path/a.js +16 -16
- package/tests/fixtures/public-path/build/runner.html +15 -15
- package/tests/fixtures/public-path/config.json +3 -3
- package/tests/fixtures/public-path/entry.js +14 -14
- package/tests/fixtures/simple-bundle/a.js +16 -16
- package/tests/fixtures/simple-bundle/build/runner.html +15 -15
- package/tests/fixtures/simple-bundle/entry.js +16 -16
- package/tests/fixtures/single-default/a.js +14 -14
- package/tests/fixtures/single-default/build/runner.html +15 -15
- package/tests/fixtures/single-default/entry.js +16 -16
- package/tests/fixtures/url-import-meta-worker/a.js +17 -17
- package/tests/fixtures/url-import-meta-worker/b.js +16 -16
- package/tests/fixtures/url-import-meta-worker/build/runner.html +15 -15
- package/tests/fixtures/url-import-meta-worker/entry.js +20 -20
- package/tests/fixtures/url-import-meta-worker/worker.js +16 -16
- package/tests/fixtures/worker/a.js +17 -17
- package/tests/fixtures/worker/b.js +16 -16
- package/tests/fixtures/worker/build/runner.html +15 -15
- package/tests/fixtures/worker/entry.js +18 -18
- package/tests/fixtures/worker/worker.js +16 -16
- package/tests/import-meta-worker.test.js +37 -37
- package/tests/import-meta.test.js +33 -33
- package/tests/import-worker-url-custom-scheme.test.js +42 -42
- package/tests/import-worker-url.test.js +41 -41
- package/tests/module-worker.test.js +47 -47
- package/tests/more-workers.test.js +33 -33
- package/tests/public-path.test.js +33 -33
- package/tests/simple-bundle.test.js +33 -33
- package/tests/single-default.test.js +33 -33
- package/tests/url-import-meta-worker.test.js +34 -34
- package/tests/worker.test.js +33 -33
- package/.github/workflows/ci.yml +0 -32
- package/CODEOWNERS +0 -1
- package/Dockerfile +0 -20
- package/renovate.json +0 -3
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2018 Google Inc. All Rights Reserved.
|
|
3
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License.
|
|
5
|
-
* You may obtain a copy of the License at
|
|
6
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
-
* See the License for the specific language governing permissions and
|
|
11
|
-
* limitations under the License.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
describe("Worker", function() {
|
|
15
|
-
beforeEach(function() {
|
|
16
|
-
this.ifr = document.createElement("iframe");
|
|
17
|
-
document.body.append(this.ifr);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
afterEach(function() {
|
|
21
|
-
this.ifr.remove();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it("can load multiple workers", function(done) {
|
|
25
|
-
window.addEventListener("message", function l(ev) {
|
|
26
|
-
if (ev.data === "a") {
|
|
27
|
-
window.removeEventListener("message", l);
|
|
28
|
-
done();
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
this.ifr.src = "/base/tests/fixtures/more-workers/build/runner.html";
|
|
32
|
-
});
|
|
33
|
-
});
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2018 Google Inc. All Rights Reserved.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
+
* See the License for the specific language governing permissions and
|
|
11
|
+
* limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
describe("Worker", function() {
|
|
15
|
+
beforeEach(function() {
|
|
16
|
+
this.ifr = document.createElement("iframe");
|
|
17
|
+
document.body.append(this.ifr);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
afterEach(function() {
|
|
21
|
+
this.ifr.remove();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("can load multiple workers", function(done) {
|
|
25
|
+
window.addEventListener("message", function l(ev) {
|
|
26
|
+
if (ev.data === "a") {
|
|
27
|
+
window.removeEventListener("message", l);
|
|
28
|
+
done();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
this.ifr.src = "/base/tests/fixtures/more-workers/build/runner.html";
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2018 Google Inc. All Rights Reserved.
|
|
3
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License.
|
|
5
|
-
* You may obtain a copy of the License at
|
|
6
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
-
* See the License for the specific language governing permissions and
|
|
11
|
-
* limitations under the License.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
describe("Public Path", function() {
|
|
15
|
-
beforeEach(function() {
|
|
16
|
-
this.ifr = document.createElement("iframe");
|
|
17
|
-
document.body.append(this.ifr);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
afterEach(function() {
|
|
21
|
-
this.ifr.remove();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it("loads transpiled modules", function(done) {
|
|
25
|
-
window.addEventListener("message", function l(ev) {
|
|
26
|
-
if (ev.data === "a") {
|
|
27
|
-
window.removeEventListener("message", l);
|
|
28
|
-
done();
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
this.ifr.src = "/base/tests/fixtures/public-path/build/runner.html";
|
|
32
|
-
});
|
|
33
|
-
});
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2018 Google Inc. All Rights Reserved.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
+
* See the License for the specific language governing permissions and
|
|
11
|
+
* limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
describe("Public Path", function() {
|
|
15
|
+
beforeEach(function() {
|
|
16
|
+
this.ifr = document.createElement("iframe");
|
|
17
|
+
document.body.append(this.ifr);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
afterEach(function() {
|
|
21
|
+
this.ifr.remove();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("loads transpiled modules", function(done) {
|
|
25
|
+
window.addEventListener("message", function l(ev) {
|
|
26
|
+
if (ev.data === "a") {
|
|
27
|
+
window.removeEventListener("message", l);
|
|
28
|
+
done();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
this.ifr.src = "/base/tests/fixtures/public-path/build/runner.html";
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2018 Google Inc. All Rights Reserved.
|
|
3
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License.
|
|
5
|
-
* You may obtain a copy of the License at
|
|
6
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
-
* See the License for the specific language governing permissions and
|
|
11
|
-
* limitations under the License.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
describe("Simple bundle", function() {
|
|
15
|
-
beforeEach(function() {
|
|
16
|
-
this.ifr = document.createElement("iframe");
|
|
17
|
-
document.body.append(this.ifr);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
afterEach(function() {
|
|
21
|
-
this.ifr.remove();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it("loads transpiled modules", function(done) {
|
|
25
|
-
window.addEventListener("message", function l(ev) {
|
|
26
|
-
if (ev.data === "a") {
|
|
27
|
-
window.removeEventListener("message", l);
|
|
28
|
-
done();
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
this.ifr.src = "/base/tests/fixtures/simple-bundle/build/runner.html";
|
|
32
|
-
});
|
|
33
|
-
});
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2018 Google Inc. All Rights Reserved.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
+
* See the License for the specific language governing permissions and
|
|
11
|
+
* limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
describe("Simple bundle", function() {
|
|
15
|
+
beforeEach(function() {
|
|
16
|
+
this.ifr = document.createElement("iframe");
|
|
17
|
+
document.body.append(this.ifr);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
afterEach(function() {
|
|
21
|
+
this.ifr.remove();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("loads transpiled modules", function(done) {
|
|
25
|
+
window.addEventListener("message", function l(ev) {
|
|
26
|
+
if (ev.data === "a") {
|
|
27
|
+
window.removeEventListener("message", l);
|
|
28
|
+
done();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
this.ifr.src = "/base/tests/fixtures/simple-bundle/build/runner.html";
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2018 Google Inc. All Rights Reserved.
|
|
3
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License.
|
|
5
|
-
* You may obtain a copy of the License at
|
|
6
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
-
* See the License for the specific language governing permissions and
|
|
11
|
-
* limitations under the License.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
describe("Single default const export", function() {
|
|
15
|
-
beforeEach(function() {
|
|
16
|
-
this.ifr = document.createElement("iframe");
|
|
17
|
-
document.body.append(this.ifr);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
afterEach(function() {
|
|
21
|
-
this.ifr.remove();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it("loads transpiled modules", function(done) {
|
|
25
|
-
window.addEventListener("message", function l(ev) {
|
|
26
|
-
if (ev.data === 4) {
|
|
27
|
-
window.removeEventListener("message", l);
|
|
28
|
-
done();
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
this.ifr.src = "/base/tests/fixtures/single-default/build/runner.html";
|
|
32
|
-
});
|
|
33
|
-
});
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2018 Google Inc. All Rights Reserved.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
+
* See the License for the specific language governing permissions and
|
|
11
|
+
* limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
describe("Single default const export", function() {
|
|
15
|
+
beforeEach(function() {
|
|
16
|
+
this.ifr = document.createElement("iframe");
|
|
17
|
+
document.body.append(this.ifr);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
afterEach(function() {
|
|
21
|
+
this.ifr.remove();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("loads transpiled modules", function(done) {
|
|
25
|
+
window.addEventListener("message", function l(ev) {
|
|
26
|
+
if (ev.data === 4) {
|
|
27
|
+
window.removeEventListener("message", l);
|
|
28
|
+
done();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
this.ifr.src = "/base/tests/fixtures/single-default/build/runner.html";
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2018 Google Inc. All Rights Reserved.
|
|
3
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License.
|
|
5
|
-
* You may obtain a copy of the License at
|
|
6
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
-
* See the License for the specific language governing permissions and
|
|
11
|
-
* limitations under the License.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
describe("Worker", function() {
|
|
15
|
-
beforeEach(function() {
|
|
16
|
-
this.ifr = document.createElement("iframe");
|
|
17
|
-
document.body.append(this.ifr);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
afterEach(function() {
|
|
21
|
-
this.ifr.remove();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it("loads module-relative worker paths", function(done) {
|
|
25
|
-
window.addEventListener("message", function l(ev) {
|
|
26
|
-
if (ev.data === "a") {
|
|
27
|
-
window.removeEventListener("message", l);
|
|
28
|
-
done();
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
this.ifr.src =
|
|
32
|
-
"/base/tests/fixtures/url-import-meta-worker/build/runner.html";
|
|
33
|
-
});
|
|
34
|
-
});
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2018 Google Inc. All Rights Reserved.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
+
* See the License for the specific language governing permissions and
|
|
11
|
+
* limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
describe("Worker", function() {
|
|
15
|
+
beforeEach(function() {
|
|
16
|
+
this.ifr = document.createElement("iframe");
|
|
17
|
+
document.body.append(this.ifr);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
afterEach(function() {
|
|
21
|
+
this.ifr.remove();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("loads module-relative worker paths", function(done) {
|
|
25
|
+
window.addEventListener("message", function l(ev) {
|
|
26
|
+
if (ev.data === "a") {
|
|
27
|
+
window.removeEventListener("message", l);
|
|
28
|
+
done();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
this.ifr.src =
|
|
32
|
+
"/base/tests/fixtures/url-import-meta-worker/build/runner.html";
|
|
33
|
+
});
|
|
34
|
+
});
|
package/tests/worker.test.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2018 Google Inc. All Rights Reserved.
|
|
3
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License.
|
|
5
|
-
* You may obtain a copy of the License at
|
|
6
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
-
* See the License for the specific language governing permissions and
|
|
11
|
-
* limitations under the License.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
describe("Worker", function() {
|
|
15
|
-
beforeEach(function() {
|
|
16
|
-
this.ifr = document.createElement("iframe");
|
|
17
|
-
document.body.append(this.ifr);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
afterEach(function() {
|
|
21
|
-
this.ifr.remove();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it("loads transpiled modules", function(done) {
|
|
25
|
-
window.addEventListener("message", function l(ev) {
|
|
26
|
-
if (ev.data === "a") {
|
|
27
|
-
window.removeEventListener("message", l);
|
|
28
|
-
done();
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
this.ifr.src = "/base/tests/fixtures/worker/build/runner.html";
|
|
32
|
-
});
|
|
33
|
-
});
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2018 Google Inc. All Rights Reserved.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
+
* See the License for the specific language governing permissions and
|
|
11
|
+
* limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
describe("Worker", function() {
|
|
15
|
+
beforeEach(function() {
|
|
16
|
+
this.ifr = document.createElement("iframe");
|
|
17
|
+
document.body.append(this.ifr);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
afterEach(function() {
|
|
21
|
+
this.ifr.remove();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("loads transpiled modules", function(done) {
|
|
25
|
+
window.addEventListener("message", function l(ev) {
|
|
26
|
+
if (ev.data === "a") {
|
|
27
|
+
window.removeEventListener("message", l);
|
|
28
|
+
done();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
this.ifr.src = "/base/tests/fixtures/worker/build/runner.html";
|
|
32
|
+
});
|
|
33
|
+
});
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
release:
|
|
6
|
-
types:
|
|
7
|
-
- published
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
publish:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v4
|
|
14
|
-
- uses: actions/setup-node@v4
|
|
15
|
-
with:
|
|
16
|
-
node-version: 20
|
|
17
|
-
- run: npm ci
|
|
18
|
-
# - run: npm run build
|
|
19
|
-
#- run: npm version prerelease --no-git-tag-version --preid ${{ github.ref_name }}-${{ github.sha }} (using self-versioned package.json from now on)
|
|
20
|
-
#### PUBLISH TO NPM ####
|
|
21
|
-
- uses: JS-DevTools/npm-publish@v3
|
|
22
|
-
with:
|
|
23
|
-
token: ${{ secrets.NPM_TOKEN }}
|
|
24
|
-
access: public
|
|
25
|
-
tag: latest
|
|
26
|
-
#### PUBLISH TO GITHUB NPM ####
|
|
27
|
-
- uses: JS-DevTools/npm-publish@v3
|
|
28
|
-
with:
|
|
29
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
30
|
-
registry: https://npm.pkg.github.com
|
|
31
|
-
access: public
|
|
32
|
-
tag: beta
|
package/CODEOWNERS
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
* @surma
|
package/Dockerfile
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
FROM selenium/node-chrome:latest
|
|
2
|
-
|
|
3
|
-
USER root
|
|
4
|
-
|
|
5
|
-
RUN apt-get update -qqy \
|
|
6
|
-
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \
|
|
7
|
-
&& rm /bin/sh && ln -s /bin/bash /bin/sh \
|
|
8
|
-
&& chown seluser /usr/local
|
|
9
|
-
|
|
10
|
-
ENV NVM_DIR /usr/local/nvm
|
|
11
|
-
RUN mkdir -p $NVM_DIR \
|
|
12
|
-
&& wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.35.2/install.sh | bash \
|
|
13
|
-
&& source $NVM_DIR/nvm.sh \
|
|
14
|
-
&& nvm install v12
|
|
15
|
-
|
|
16
|
-
ENV CHROME_BIN /opt/google/chrome/chrome
|
|
17
|
-
ENV INSIDE_DOCKER=1
|
|
18
|
-
|
|
19
|
-
WORKDIR /usr/src
|
|
20
|
-
ENTRYPOINT source $NVM_DIR/nvm.sh && npm i && npm test
|
package/renovate.json
DELETED