Skip to content

Commit 94fbcbd

Browse files
authored
Remove unused deps (#4707)
1 parent eb9c8ab commit 94fbcbd

File tree

5 files changed

+1
-122
lines changed

5 files changed

+1
-122
lines changed

babel.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ module.exports = function (api) {
3030
]
3131
],
3232
plugins: [
33-
'@babel/plugin-proposal-object-rest-spread',
3433
'@babel/plugin-transform-react-jsx',
35-
'babel-plugin-transform-async-to-promises',
3634
['babel-plugin-transform-rename-properties', { rename }]
3735
],
3836
include: ['**/src/**/*.js', '**/test/**/*.js'],

karma.conf.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -111,33 +111,6 @@ function createEsbuildPlugin() {
111111
};
112112
});
113113

114-
// Transpile node_modules that are es2015+ to es5 for IE11
115-
build.onLoad({ filter: /kolorist/ }, async args => {
116-
const contents = await fs.readFile(args.path, 'utf-8');
117-
118-
const tmp = await babel.transformAsync(contents, {
119-
filename: args.path,
120-
presets: [
121-
[
122-
'@babel/preset-env',
123-
{
124-
loose: true,
125-
modules: false,
126-
targets: {
127-
browsers: ['last 2 versions', 'IE >= 11']
128-
}
129-
}
130-
]
131-
]
132-
});
133-
134-
return {
135-
contents: tmp.code,
136-
resolveDir: path.dirname(args.path),
137-
loader: 'js'
138-
};
139-
});
140-
141114
// Apply babel pass whenever we load a .js file
142115
build.onLoad({ filter: /\.[mc]?js$/ }, async args => {
143116
const contents = await fs.readFile(args.path, 'utf-8');

package-lock.json

Lines changed: 0 additions & 74 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
},
114114
"types": "src/index.d.ts",
115115
"scripts": {
116-
"prepare": "husky && run-s build && npm-merge-driver-install",
116+
"prepare": "husky && run-s build",
117117
"build": "npm-run-all --parallel build:*",
118118
"build:core": "microbundle build --raw --no-generateTypes -f cjs,esm,umd",
119119
"build:core-min": "microbundle build --raw --no-generateTypes -f cjs,esm,umd,iife src/cjs.js -o dist/preact.min.js",
@@ -207,7 +207,6 @@
207207
"@actions/github": "^6.0.0",
208208
"@actions/glob": "^0.5.0",
209209
"@babel/core": "^7.26.0",
210-
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
211210
"@babel/plugin-transform-react-jsx": "^7.25.9",
212211
"@babel/plugin-transform-react-jsx-source": "^7.25.9",
213212
"@babel/preset-env": "^7.26.0",
@@ -218,11 +217,8 @@
218217
"@types/node": "^14.14.10",
219218
"@types/sinon": "^9.0.11",
220219
"babel-plugin-istanbul": "^7.0.0",
221-
"babel-plugin-transform-async-to-promises": "^0.8.18",
222220
"babel-plugin-transform-rename-properties": "0.1.0",
223221
"chai": "^4.1.2",
224-
"check-export-map": "^1.3.1",
225-
"core-js": "^3.38.1",
226222
"coveralls": "^3.1.1",
227223
"cross-env": "^7.0.3",
228224
"errorstacks": "^2.4.1",
@@ -240,7 +236,6 @@
240236
"kolorist": "^1.8.0",
241237
"microbundle": "^0.15.1",
242238
"mocha": "^11.0.0",
243-
"npm-merge-driver-install": "^3.0.0",
244239
"npm-run-all2": "^7.0.0",
245240
"oxlint": "^0.14.0",
246241
"preact-render-to-string": "^6.5.0",

test/polyfills.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
// ES2015 APIs used by developer tools integration
2-
import 'core-js/es/map';
3-
import 'core-js/es/promise';
4-
import 'core-js/es/array/fill';
5-
import 'core-js/es/array/from';
6-
import 'core-js/es/array/find';
7-
import 'core-js/es/array/includes';
8-
import 'core-js/es/string/includes';
9-
import 'core-js/es/object/assign';
10-
import 'core-js/es/string/starts-with';
11-
import 'core-js/es/string/code-point-at';
12-
import 'core-js/es/string/from-code-point';
13-
import 'core-js/es/string/repeat';
141
import * as kl from 'kolorist';
152

163
// Something that's loaded before this file polyfills Symbol object.

0 commit comments

Comments
 (0)