Skip to content

Commit 7b77b55

Browse files
Update all (major) (#1160)
* Update all * revert ava * Change rollup to mjs * Change js to mjs * further fix * require=>import * Fix default --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Shihua Zheng <[email protected]>
1 parent 36ed6a9 commit 7b77b55

6 files changed

+22
-22
lines changed

config/rollup.config.js

-4
This file was deleted.

config/rollup.config.mjs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import MainThreadBuilds from './rollup.main-thread.mjs';
2+
import WorkerThreadBuilds from './rollup.worker-thread.mjs';
3+
4+
export default [...MainThreadBuilds, ...WorkerThreadBuilds];

config/rollup.main-thread.js renamed to config/rollup.main-thread.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import compiler from '@ampproject/rollup-plugin-closure-compiler';
22
import { terser } from 'rollup-plugin-terser';
3-
import { babelPlugin, removeDebugCommandExecutors, removeWorkerWhitespace, replacePlugin } from './rollup.plugins.js';
3+
import { babelPlugin, removeDebugCommandExecutors, removeWorkerWhitespace, replacePlugin } from './rollup.plugins.mjs';
44

55
const ESModules = [
66
{

config/rollup.plugins.js renamed to config/rollup.plugins.mjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import replace from '@rollup/plugin-replace';
33
import MagicString from 'magic-string';
44
import fs from 'fs';
55
import * as path from 'path';
6-
const walk = require('acorn-walk');
6+
import { simple } from 'acorn-walk';
77

88
/**
99
* Invoke Babel on source, with some configuration.
@@ -82,7 +82,7 @@ export function removeDebugCommandExecutors() {
8282
const source = new MagicString(code);
8383
const program = context.parse(code, { ranges: true });
8484

85-
walk.simple(program, {
85+
simple(program, {
8686
ObjectExpression(node) {
8787
const propertyNames = (node.properties && node.properties.map((property) => property.key.name)) || [];
8888
const validPropertyRanges = [];
@@ -122,7 +122,7 @@ export function removeWorkerWhitespace() {
122122
const source = new MagicString(code);
123123
const program = this.parse(code, { ranges: true });
124124

125-
walk.simple(program, {
125+
simple(program, {
126126
TemplateLiteral(node) {
127127
let literalValue = code.substring(node.range[0], node.range[1]);
128128
literalValue = literalValue

config/rollup.worker-thread.js renamed to config/rollup.worker-thread.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import compiler from '@ampproject/rollup-plugin-closure-compiler';
22
import { terser } from 'rollup-plugin-terser';
3-
import { babelPlugin, replacePlugin } from './rollup.plugins.js';
3+
import { babelPlugin, replacePlugin } from './rollup.plugins.mjs';
44

55
// Compile plugins should always be added at the end of the plugin list.
66
const compilePlugins = [

package.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"pretest": "npm-run-all --parallel tsc:*",
2525
"test": "ava -v",
2626
"pre~rollup": "npm-run-all --parallel tsc:worker tsc:main",
27-
"~rollup": "rollup --config config/rollup.config.js",
27+
"~rollup": "rollup --config config/rollup.config.mjs",
2828
"lint:worker": "tslint -c config/tslint.json -p src/worker-thread/",
2929
"lint:main": "tslint -c config/tslint.json -p src/main-thread/",
3030
"lint": "npm-run-all --parallel lint:*",
@@ -43,9 +43,9 @@
4343
"@babel/cli": "7.22.10",
4444
"@babel/core": "7.22.10",
4545
"@babel/preset-env": "7.22.10",
46-
"@rollup/plugin-babel": "5.3.1",
47-
"@rollup/plugin-replace": "4.0.0",
48-
"@types/node": "16.18.41",
46+
"@rollup/plugin-babel": "6.0.3",
47+
"@rollup/plugin-replace": "5.0.2",
48+
"@types/node": "18.17.7",
4949
"@types/sinon": "10.0.16",
5050
"acorn": "8.10.0",
5151
"acorn-walk": "8.2.0",
@@ -56,21 +56,21 @@
5656
"cross-env": "7.0.3",
5757
"esm": "3.2.25",
5858
"husky": "8.0.3",
59-
"jsdom": "19.0.0",
60-
"lint-staged": "13.3.0",
59+
"jsdom": "22.1.0",
60+
"lint-staged": "14.0.1",
6161
"magic-string": "0.30.3",
62-
"np": "7.7.0",
62+
"np": "8.0.4",
6363
"npm-run-all": "4.1.5",
6464
"polka": "0.5.2",
65-
"prettier": "2.8.8",
66-
"rimraf": "3.0.2",
67-
"rollup": "2.79.1",
65+
"prettier": "3.0.2",
66+
"rimraf": "5.0.1",
67+
"rollup": "3.28.1",
6868
"rollup-plugin-analyzer": "4.0.0",
6969
"rollup-plugin-terser": "7.0.2",
70-
"sinon": "13.0.2",
70+
"sinon": "15.2.0",
7171
"sirv": "2.0.3",
7272
"tslint": "6.1.3",
73-
"typescript": "4.9.5"
73+
"typescript": "5.1.6"
7474
},
7575
"lint-staged": {
7676
"*.{js,ts}": [
@@ -123,7 +123,7 @@
123123
]
124124
},
125125
"volta": {
126-
"node": "16.20.2",
126+
"node": "18.17.1",
127127
"yarn": "1.22.19"
128128
},
129129
"publishConfig": {

0 commit comments

Comments
 (0)