Skip to content

Commit a1b8463

Browse files
authored
core: Update and remove some dependencies (#227)
1 parent 64a5198 commit a1b8463

File tree

8 files changed

+260
-196
lines changed

8 files changed

+260
-196
lines changed

.changeset/dull-pens-switch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@crackle/core': patch
3+
---
4+
5+
Replace `builtin-modules` dependency with native `builtinModules` from `node:module`

.changeset/long-bottles-bake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@crackle/core': patch
3+
---
4+
5+
Update various dependencies

.changeset/new-swans-nail.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@crackle/core': patch
3+
---
4+
5+
Remove polyfill for `structuredClone`

packages/core/package.json

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,12 @@
131131
"@babel/plugin-syntax-typescript": "^7.23.3",
132132
"@crackle/babel-plugin-remove-exports": "^0.3.0",
133133
"@crackle/router": "workspace:^",
134-
"@ungap/structured-clone": "^1.2.0",
135134
"@vanilla-extract/css": "^1.17.1",
136135
"@vanilla-extract/integration": "^8.0.0",
137136
"@vanilla-extract/vite-plugin": "^5.0.0",
138-
"@vitejs/plugin-react-swc": "^3.5.0",
137+
"@vitejs/plugin-react-swc": "^3.8.0",
139138
"@vocab/webpack": "^1.2.5",
140-
"builtin-modules": "^4.0.0",
141-
"c12": "^1.6.1",
139+
"c12": "^2.0.4",
142140
"consola": "^3.2.3",
143141
"dedent": "^1.5.1",
144142
"defu": "^6.1.4",
@@ -149,22 +147,22 @@
149147
"fast-glob": "^3.3.2",
150148
"fs-extra": "^11.1.1",
151149
"glob-to-regexp": "^0.4.1",
152-
"memoize": "^10.0.0",
153-
"mlly": "^1.4.2",
150+
"memoize": "^10.1.0",
151+
"mlly": "^1.7.4",
154152
"pretty-ms": "^7.0.1",
155153
"react": "^18.2.0",
156154
"react-dom": "^18.2.0",
157155
"resolve-from": "^5.0.0",
158-
"rollup": "^4.21.0",
156+
"rollup": "^4.35.0",
159157
"rollup-plugin-dts": "^6.1.0",
160-
"rollup-plugin-node-externals": "^7.1.3",
158+
"rollup-plugin-node-externals": "^8.0.0",
161159
"semver": "^7.5.4",
162160
"serialize-javascript": "^6.0.0",
163161
"serve-handler": "^6.1.5",
164-
"sort-package-json": "^2.0.0",
165-
"tsx": "^4.16.5",
166-
"type-fest": "^4.0.0",
167-
"used-styles": "^2.4.3",
162+
"sort-package-json": "^3.0.0",
163+
"tsx": "^4.19.3",
164+
"type-fest": "^4.37.0",
165+
"used-styles": "^3.0.0",
168166
"vite": "^6.0.0"
169167
},
170168
"devDependencies": {

packages/core/src/entries/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const build = async (inlineConfig?: PartialConfig) => {
3232
'@vanilla-extract/css',
3333
depGraph,
3434
);
35-
const { default: builtinModules } = await import('builtin-modules');
35+
const { builtinModules } = await import('node:module');
3636

3737
const commonBuildConfig: ViteConfig = {
3838
...commonViteConfig(config),

packages/core/src/entries/start.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const start = async (
4242

4343
const { createServer: createViteServer } = await import('vite');
4444

45-
const { default: builtinModules } = await import('builtin-modules');
45+
const { builtinModules } = await import('node:module');
4646

4747
const vite = await createViteServer({
4848
...commonViteConfig(config),

packages/core/src/utils/setup-package-json.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import fs from 'fs';
33
import path from 'path';
44
import { isDeepStrictEqual } from 'util';
55

6-
// @ts-ignore no declaration file
7-
import structuredClonePolyfill from '@ungap/structured-clone';
86
import fse from 'fs-extra';
97

108
import { distDir, sideEffectsDir } from '../constants';
@@ -29,8 +27,6 @@ interface ExportObject {
2927
}
3028
type Exports = Record<string, ExportString | ExportObject>;
3129

32-
const structuredClone = global.structuredClone ?? structuredClonePolyfill;
33-
3430
const sort = <T>(items: Iterable<T>, key?: keyof T) =>
3531
Array.from(items).sort((a, b) => {
3632
const aValue = key ? a[key] : a;

0 commit comments

Comments
 (0)