Skip to content

Commit

Permalink
Update all (major) (ampproject#1160)
Browse files Browse the repository at this point in the history
* 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 <powerivq@users.noreply.github.com>
  • Loading branch information
renovate[bot] and powerivq authored Aug 22, 2023
1 parent 36ed6a9 commit 7b77b55
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
4 changes: 0 additions & 4 deletions config/rollup.config.js

This file was deleted.

4 changes: 4 additions & 0 deletions config/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import MainThreadBuilds from './rollup.main-thread.mjs';
import WorkerThreadBuilds from './rollup.worker-thread.mjs';

export default [...MainThreadBuilds, ...WorkerThreadBuilds];
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import compiler from '@ampproject/rollup-plugin-closure-compiler';
import { terser } from 'rollup-plugin-terser';
import { babelPlugin, removeDebugCommandExecutors, removeWorkerWhitespace, replacePlugin } from './rollup.plugins.js';
import { babelPlugin, removeDebugCommandExecutors, removeWorkerWhitespace, replacePlugin } from './rollup.plugins.mjs';

const ESModules = [
{
Expand Down
6 changes: 3 additions & 3 deletions config/rollup.plugins.js → config/rollup.plugins.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import replace from '@rollup/plugin-replace';
import MagicString from 'magic-string';
import fs from 'fs';
import * as path from 'path';
const walk = require('acorn-walk');
import { simple } from 'acorn-walk';

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

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

walk.simple(program, {
simple(program, {
TemplateLiteral(node) {
let literalValue = code.substring(node.range[0], node.range[1]);
literalValue = literalValue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import compiler from '@ampproject/rollup-plugin-closure-compiler';
import { terser } from 'rollup-plugin-terser';
import { babelPlugin, replacePlugin } from './rollup.plugins.js';
import { babelPlugin, replacePlugin } from './rollup.plugins.mjs';

// Compile plugins should always be added at the end of the plugin list.
const compilePlugins = [
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"pretest": "npm-run-all --parallel tsc:*",
"test": "ava -v",
"pre~rollup": "npm-run-all --parallel tsc:worker tsc:main",
"~rollup": "rollup --config config/rollup.config.js",
"~rollup": "rollup --config config/rollup.config.mjs",
"lint:worker": "tslint -c config/tslint.json -p src/worker-thread/",
"lint:main": "tslint -c config/tslint.json -p src/main-thread/",
"lint": "npm-run-all --parallel lint:*",
Expand All @@ -43,9 +43,9 @@
"@babel/cli": "7.22.10",
"@babel/core": "7.22.10",
"@babel/preset-env": "7.22.10",
"@rollup/plugin-babel": "5.3.1",
"@rollup/plugin-replace": "4.0.0",
"@types/node": "16.18.41",
"@rollup/plugin-babel": "6.0.3",
"@rollup/plugin-replace": "5.0.2",
"@types/node": "18.17.7",
"@types/sinon": "10.0.16",
"acorn": "8.10.0",
"acorn-walk": "8.2.0",
Expand All @@ -56,21 +56,21 @@
"cross-env": "7.0.3",
"esm": "3.2.25",
"husky": "8.0.3",
"jsdom": "19.0.0",
"lint-staged": "13.3.0",
"jsdom": "22.1.0",
"lint-staged": "14.0.1",
"magic-string": "0.30.3",
"np": "7.7.0",
"np": "8.0.4",
"npm-run-all": "4.1.5",
"polka": "0.5.2",
"prettier": "2.8.8",
"rimraf": "3.0.2",
"rollup": "2.79.1",
"prettier": "3.0.2",
"rimraf": "5.0.1",
"rollup": "3.28.1",
"rollup-plugin-analyzer": "4.0.0",
"rollup-plugin-terser": "7.0.2",
"sinon": "13.0.2",
"sinon": "15.2.0",
"sirv": "2.0.3",
"tslint": "6.1.3",
"typescript": "4.9.5"
"typescript": "5.1.6"
},
"lint-staged": {
"*.{js,ts}": [
Expand Down Expand Up @@ -123,7 +123,7 @@
]
},
"volta": {
"node": "16.20.2",
"node": "18.17.1",
"yarn": "1.22.19"
},
"publishConfig": {
Expand Down

0 comments on commit 7b77b55

Please sign in to comment.