Skip to content

Commit e29d9ac

Browse files
authored
feat: update rollup to v4, use esbuild to minify instead of terser (#1631)
* feat: update rollup to v4, use esbuild to minify instead of terser
1 parent b845e61 commit e29d9ac

24 files changed

+1690
-1722
lines changed

.github/workflows/push.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Setup
1212
uses: actions/setup-node@v3
1313
with:
14-
node-version: '18'
14+
node-version: '18.17'
1515
cache: 'yarn'
1616
- name: Install
1717
run: yarn install --frozen-lockfile
@@ -26,7 +26,7 @@ jobs:
2626
- name: Setup
2727
uses: actions/setup-node@v3
2828
with:
29-
node-version: '18'
29+
node-version: '18.17'
3030
cache: 'yarn'
3131
- name: Install
3232
run: yarn install
@@ -90,7 +90,7 @@ jobs:
9090
- name: Setup
9191
uses: actions/setup-node@v3
9292
with:
93-
node-version: '18'
93+
node-version: '18.17'
9494
cache: 'yarn'
9595
- name: Install
9696
run: yarn install
@@ -134,7 +134,7 @@ jobs:
134134
- name: Setup
135135
uses: actions/setup-node@v3
136136
with:
137-
node-version: '18'
137+
node-version: '18.17'
138138
cache: 'yarn'
139139
- name: Install
140140
run: yarn install

bin/app.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import bundler from '../lib/backend/bundler/app.bundler.js'
2+
3+
await bundler.build()

bin/bundle-globals.js

-72
This file was deleted.

bin/globals.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import bundler from '../lib/backend/bundler/globals.bundler.js'
2+
3+
await bundler.build()

bin/watch-dev.js

-36
This file was deleted.

package.json

+29-32
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
"import": "./index.js",
1010
"require": "./index.js"
1111
},
12-
"./bundler": {
13-
"import": "./lib/backend/bundler/config.js"
14-
}
12+
"./bundler": "./lib/backend/bundler/index.js"
1513
},
1614
"scripts": {
1715
"test": "mocha --loader=ts-node/esm ./spec/index.js",
@@ -21,11 +19,11 @@
2119
"lint": "eslint './spec/**/*' './src/**/*' './cy/**/*' './*'",
2220
"cover": "NODE_ENV=test nyc --reporter=lcov --reporter=text-lcov npm test",
2321
"codecov": "NODE_ENV=test nyc --reporter=text-lcov npm test | codecov --pipe",
24-
"bundle": "node bin/watch-dev.js",
25-
"bundle:globals": "node bin/bundle-globals.js",
22+
"bundle": "node bin/app.js",
23+
"bundle:globals": "node bin/globals.js",
2624
"cspell": "cspell src/**/*.ts src/**/*.js src/**/*.tsx src/**/*.jsx",
27-
"check:all": "yarn types && yarn cspell && yarn lint && yarn test && ONCE=true yarn bundle && ONCE=true NODE_ENV=production yarn bundle",
28-
"dev": "yarn build && yarn types && yarn bundle:globals && ONCE=true yarn bundle",
25+
"check:all": "yarn types && yarn cspell && yarn lint && yarn test && yarn bundle && NODE_ENV=production yarn bundle",
26+
"dev": "yarn build && yarn types && yarn bundle:globals && yarn bundle && NODE_ENV=production yarn bundle:globals && NODE_ENV=production yarn bundle",
2927
"release": "semantic-release"
3028
},
3129
"bin": {
@@ -87,23 +85,22 @@
8785
},
8886
"homepage": "https://github.com/SoftwareBrothers/adminjs#readme",
8987
"dependencies": {
90-
"@adminjs/design-system": "^4.0.0",
91-
"@babel/core": "^7.21.0",
92-
"@babel/parser": "^7.21.0",
93-
"@babel/plugin-syntax-import-assertions": "^7.20.0",
94-
"@babel/plugin-transform-runtime": "^7.21.0",
95-
"@babel/preset-env": "^7.20.2",
96-
"@babel/preset-react": "^7.18.6",
97-
"@babel/preset-typescript": "^7.21.0",
98-
"@babel/register": "^7.21.0",
88+
"@adminjs/design-system": "^4.0.3",
89+
"@babel/core": "^7.23.9",
90+
"@babel/parser": "^7.23.9",
91+
"@babel/plugin-syntax-import-assertions": "^7.23.3",
92+
"@babel/plugin-transform-runtime": "^7.23.9",
93+
"@babel/preset-env": "^7.23.9",
94+
"@babel/preset-react": "^7.23.3",
95+
"@babel/preset-typescript": "^7.23.3",
96+
"@babel/register": "^7.23.7",
9997
"@hello-pangea/dnd": "^16.2.0",
10098
"@redux-devtools/extension": "^3.2.5",
101-
"@rollup/plugin-babel": "^6.0.3",
102-
"@rollup/plugin-commonjs": "^24.0.1",
103-
"@rollup/plugin-json": "^6.0.0",
104-
"@rollup/plugin-node-resolve": "^15.0.1",
105-
"@rollup/plugin-replace": "^5.0.2",
106-
"@rollup/plugin-terser": "^0.4.0",
99+
"@rollup/plugin-babel": "^6.0.4",
100+
"@rollup/plugin-commonjs": "^25.0.7",
101+
"@rollup/plugin-json": "^6.1.0",
102+
"@rollup/plugin-node-resolve": "^15.2.3",
103+
"@rollup/plugin-replace": "^5.0.5",
107104
"axios": "^1.3.4",
108105
"commander": "^10.0.0",
109106
"flat": "^5.0.2",
@@ -124,26 +121,28 @@
124121
"react-router": "^6.9.0",
125122
"react-router-dom": "^6.9.0",
126123
"redux": "^4.2.1",
127-
"rollup": "^3.15.0",
128-
"rollup-plugin-polyfill-node": "^0.12.0",
124+
"regenerator-runtime": "^0.14.1",
125+
"rollup": "^4.11.0",
126+
"rollup-plugin-esbuild-minify": "^1.1.1",
127+
"rollup-plugin-polyfill-node": "^0.13.0",
129128
"slash": "^5.0.0",
130129
"uuid": "^9.0.0",
131130
"xss": "^1.0.14"
132131
},
133132
"devDependencies": {
134-
"@babel/cli": "^7.21.0",
133+
"@babel/cli": "^7.23.9",
135134
"@commitlint/cli": "^17.5.0",
136135
"@commitlint/config-conventional": "^17.4.4",
137136
"@semantic-release/git": "^10.0.1",
138137
"@testing-library/react": "^14.0.0",
139-
"@types/babel-core": "^6.25.7",
138+
"@types/babel-core": "^6.25.10",
140139
"@types/chai": "^4.3.4",
141140
"@types/chai-as-promised": "^7.1.5",
142141
"@types/factory-girl": "^5.0.8",
143142
"@types/flat": "^5.0.2",
144143
"@types/lodash": "^4.14.194",
145144
"@types/mocha": "^10.0.1",
146-
"@types/node": "^18.15.11",
145+
"@types/node": "^20.6.0",
147146
"@types/qs": "^6.9.7",
148147
"@types/react": "^18.0.35",
149148
"@types/react-dom": "^18.0.11",
@@ -155,7 +154,7 @@
155154
"chai": "^4.3.7",
156155
"chai-as-promised": "^7.1.1",
157156
"chai-change": "^2.1.2",
158-
"core-js": "^3.29.1",
157+
"core-js": "^3.36.0",
159158
"cspell": "^6.30.2",
160159
"eslint": "^8.36.0",
161160
"eslint-config-airbnb": "^19.0.4",
@@ -166,21 +165,19 @@
166165
"eslint-plugin-react-hooks": "^4.6.0",
167166
"factory-girl": "^5.0.4",
168167
"husky": "^8.0.3",
169-
"istanbul": "^0.4.5",
170168
"jsdom": "^21.1.1",
171169
"jsdom-global": "^3.0.2",
172170
"mocha": "^10.2.0",
173171
"node-esm-import-all": "^1.0.0",
174172
"npm-run-all": "^4.1.5",
175-
"nyc": "^15.1.0",
176173
"semantic-release": "^20.1.3",
177174
"semantic-release-slack-bot": "^4.0.0",
178175
"sinon": "^15.0.2",
179176
"sinon-chai": "^3.7.0",
180-
"typescript": "^5.0.2"
177+
"ts-node": "10.8.1",
178+
"typescript": "^5.3.3"
181179
},
182180
"resolutions": {
183-
"@babel/core": "7.21.0",
184181
"react-redux": "8.0.5",
185182
"redux": "4.2.1"
186183
}

0 commit comments

Comments
 (0)