Skip to content

Commit ca2b1b4

Browse files
committed
feat: 升级基建
1 parent e4c5a66 commit ca2b1b4

9 files changed

Lines changed: 7562 additions & 6182 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
uses: pnpm/action-setup@v4
2222
with:
2323
version: 8
24-
- name: use Node.js 18
24+
- name: use Node.js 22
2525
uses: actions/setup-node@v4
2626
with:
27-
node-version: '18'
27+
node-version: '22'
2828
cache: 'pnpm'
2929
- name: Install dependencies
3030
run: pnpm install --frozen-lockfile

.github/workflows/coveralls.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
uses: pnpm/action-setup@v4
1111
with:
1212
version: 8
13-
- name: Use Node.js 18.x
13+
- name: Use Node.js 22.x
1414
uses: actions/setup-node@v4
1515
with:
16-
node-version: 18.x
16+
node-version: 22.x
1717
cache: 'pnpm'
1818

1919
- name: Install dependencies

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: 设置 Node.js
3838
uses: actions/setup-node@v4
3939
with:
40-
node-version: 18
40+
node-version: 22
4141
cache: pnpm
4242
cache-dependency-path: docs/pnpm-lock.yaml
4343

jest.config.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
module.exports = {
2-
preset: 'ts-jest',
1+
export default {
2+
preset: 'ts-jest/presets/default-esm',
3+
extensionsToTreatAsEsm: ['.ts'],
4+
transform: {
5+
'^.+\\.ts$': ['ts-jest', {
6+
useESM: true,
7+
}],
8+
},
39
setupFilesAfterEnv: ['./scripts/testSetup.js'],
410
testRegex: '\\.test\\.tsx?$',
511
collectCoverage: false,

package.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "jsvm2",
33
"version": "1.2.5",
44
"description": "Javascript Interpreter implemented by Javascript",
5+
"type": "module",
56
"main": "lib/index.js",
67
"module": "lib/es.es6.js",
78
"types": "lib/index.d.ts",
@@ -24,6 +25,7 @@
2425
"@babel/cli": "^7.16.0",
2526
"@babel/core": "^7.16.0",
2627
"@babel/generator": "^7.16.0",
28+
"@babel/helper-hoist-variables": "^7.24.7",
2729
"@babel/parser": "^7.16.4",
2830
"@babel/plugin-external-helpers": "^7.16.0",
2931
"@babel/plugin-proposal-class-properties": "^7.16.0",
@@ -42,26 +44,26 @@
4244
"@babel/types": "^7.16.0",
4345
"@commitlint/cli": "^15.0.0",
4446
"@commitlint/config-conventional": "^15.0.0",
45-
"@rollup/plugin-alias": "^3.1.8",
46-
"@rollup/plugin-babel": "^5.3.0",
47+
"@rollup/plugin-alias": "^5.1.1",
48+
"@rollup/plugin-babel": "^6.0.4",
4749
"@rollup/plugin-buble": "^0.21.3",
48-
"@rollup/plugin-commonjs": "^21.0.1",
49-
"@rollup/plugin-json": "^4.1.0",
50-
"@rollup/plugin-node-resolve": "^13.0.6",
51-
"@rollup/plugin-replace": "^3.0.0",
52-
"@rollup/plugin-typescript": "^8.3.0",
53-
"@rollup/plugin-url": "^6.1.0",
50+
"@rollup/plugin-commonjs": "^28.0.6",
51+
"@rollup/plugin-json": "^6.1.0",
52+
"@rollup/plugin-node-resolve": "^16.0.1",
53+
"@rollup/plugin-replace": "^6.0.2",
54+
"@rollup/plugin-typescript": "^12.1.4",
55+
"@rollup/plugin-url": "^8.0.2",
5456
"@types/babel-generator": "^6.25.3",
5557
"@types/babel-traverse": "^6.25.7",
5658
"@types/babel-types": "^7.0.11",
5759
"@types/benchmark": "^2.1.1",
5860
"@types/jest": "^27.0.3",
59-
"@types/node": "^16.11.11",
61+
"@types/node": "^22.18.6",
6062
"@types/sinon": "^10.0.6",
6163
"@typescript-eslint/eslint-plugin": "^5.5.0",
6264
"@typescript-eslint/parser": "^5.5.0",
6365
"babel-eslint": "^10.0.1",
64-
"babel-jest": "^27.4.2",
66+
"babel-jest": "^29.7.0",
6567
"babel-plugin-import": "^1.8.0",
6668
"babel-plugin-syntax-jsx": "^6.18.0",
6769
"babel-plugin-transform-class-properties": "^6.24.1",
@@ -85,26 +87,26 @@
8587
"eslint-plugin-promise": "^5.2.0",
8688
"eslint-plugin-standard": "^5.0.0",
8789
"husky": "^7.0.4",
88-
"jest": "^27.4.3",
90+
"jest": "^29.7.0",
8991
"lint-staged": "^12.1.2",
9092
"prettier": "^2.5.0",
91-
"rollup": "^2.60.2",
93+
"rollup": "^4.52.3",
9294
"rollup-plugin-auto-external": "^2.0.0",
9395
"rollup-plugin-peer-deps-external": "^2.2.2",
9496
"rollup-plugin-postcss": "^4.0.2",
9597
"rollup-plugin-typescript2": "^0.31.1",
9698
"terser": "^5.12.0",
97-
"ts-jest": "^27.0.7",
99+
"ts-jest": "^29.4.4",
98100
"ts-node": "^10.4.0",
99-
"typescript": "^5.0.3"
101+
"tslib": "^2.8.1",
102+
"typescript": "^5.9.2"
100103
},
101-
"dependencies": {},
102104
"publishConfig": {
103105
"access": "public",
104106
"registry": "https://registry.npmjs.org/"
105107
},
106108
"engines": {
107-
"node": ">=10"
109+
"node": ">=18"
108110
},
109111
"files": [
110112
"lib"

0 commit comments

Comments
 (0)