chore: update dependencies (#6026)

* chore: update dependencies

* chore: remove empty line

* chore: update swc version

* Revert "chore: update swc version"

This reverts commit 47c62bbe56.

* fix: update lock

* chore: update lock

* fix: bump @swc/core and swc plugins version

* chore: update changelog

* chore: update changelog

* fix: update lock
This commit is contained in:
ClarkXia 2023-03-21 17:00:31 +08:00 committed by GitHub
parent baacf8d0e9
commit ee4141d5c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 3615 additions and 4484 deletions

View File

@ -0,0 +1,5 @@
---
'@ice/webpack-config': patch
---
fix: compile config of coreJs

View File

@ -0,0 +1,5 @@
---
'@ice/runtime': patch
---
chore: update ts defination for latest react-router

View File

@ -0,0 +1,5 @@
---
'@ice/bundles': patch
---
chore: update dependencies @swc/core(1.3.19 -> 1.3.41), cacache(16.0.7 -> 17.0.4), webpack(5.75.0 -> 5.76.2), core-js(3.26 -> 3.29)

View File

@ -15,13 +15,13 @@
"main": "./esm/index.js", "main": "./esm/index.js",
"type": "module", "type": "module",
"dependencies": { "dependencies": {
"@swc/core": "1.3.19", "@swc/core": "1.3.41",
"@ice/swc-plugin-remove-export": "0.1.2", "@ice/swc-plugin-remove-export": "0.1.3-0",
"@ice/swc-plugin-keep-export": "0.1.4", "@ice/swc-plugin-keep-export": "0.1.5-0",
"@ice/swc-plugin-node-transform": "0.1.0-5", "@ice/swc-plugin-node-transform": "0.1.1-1",
"ansi-html-community": "^0.0.8", "ansi-html-community": "^0.0.8",
"html-entities": "^2.3.2", "html-entities": "^2.3.2",
"core-js": "3.26.0", "core-js": "3.29.1",
"caniuse-lite": "^1.0.30001431", "caniuse-lite": "^1.0.30001431",
"chokidar": "3.5.3", "chokidar": "3.5.3",
"esbuild": "^0.16.5", "esbuild": "^0.16.5",
@ -35,11 +35,10 @@
"error-stack-parser": "^2.0.6" "error-stack-parser": "^2.0.6"
}, },
"devDependencies": { "devDependencies": {
"@types/cacache": "^15.0.1",
"@types/less": "^3.0.3", "@types/less": "^3.0.3",
"@types/lodash": "^4.14.181", "@types/lodash": "^4.14.181",
"@types/webpack-bundle-analyzer": "^4.4.1", "@types/webpack-bundle-analyzer": "^4.4.1",
"cacache": "16.0.7", "cacache": "17.0.4",
"copy-webpack-plugin": "10.2.4", "copy-webpack-plugin": "10.2.4",
"css-loader": "6.7.1", "css-loader": "6.7.1",
"css-minimizer-webpack-plugin": "3.4.1", "css-minimizer-webpack-plugin": "3.4.1",
@ -66,7 +65,7 @@
"terser-webpack-plugin": "5.3.5", "terser-webpack-plugin": "5.3.5",
"typescript": "^4.6.4", "typescript": "^4.6.4",
"trusted-cert": "1.1.3", "trusted-cert": "1.1.3",
"webpack": "5.75.0", "webpack": "5.76.2",
"webpack-bundle-analyzer": "4.5.0", "webpack-bundle-analyzer": "4.5.0",
"webpack-dev-server": "4.11.1", "webpack-dev-server": "4.11.1",
"unplugin": "0.9.5", "unplugin": "0.9.5",

View File

@ -49,7 +49,6 @@
"chalk": "^4.0.0", "chalk": "^4.0.0",
"commander": "^9.0.0", "commander": "^9.0.0",
"consola": "^2.15.3", "consola": "^2.15.3",
"core-js": "3.26.0",
"cross-spawn": "^7.0.3", "cross-spawn": "^7.0.3",
"detect-port": "^1.3.0", "detect-port": "^1.3.0",
"dotenv": "^16.0.0", "dotenv": "^16.0.0",
@ -78,15 +77,15 @@
"@types/less": "^3.0.3", "@types/less": "^3.0.3",
"@types/micromatch": "^4.0.2", "@types/micromatch": "^4.0.2",
"@types/multer": "^1.4.7", "@types/multer": "^1.4.7",
"@types/sass": "^1.43.1", "sass": "^1.50.0",
"@types/temp": "^0.9.1", "@types/temp": "^0.9.1",
"chokidar": "^3.5.3", "chokidar": "^3.5.3",
"esbuild": "^0.16.5", "esbuild": "^0.16.5",
"jest": "^29.0.2", "jest": "^29.0.2",
"react": "^18.2.0", "react": "^18.2.0",
"react-router": "^6.3.0", "react-router": "^6.8.2",
"unplugin": "^0.9.0", "unplugin": "^0.9.0",
"webpack": "^5.73.0", "webpack": "^5.76.2",
"webpack-dev-server": "^4.7.4" "webpack-dev-server": "^4.7.4"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -84,6 +84,8 @@ class Runner {
try { try {
return await promise; return await promise;
} catch (err) {
console.log('errr==>', id);
} finally { } finally {
mod.evaluated = true; mod.evaluated = true;
} }

View File

@ -268,6 +268,11 @@ class ServerRunner extends Runner {
const bundlePath = await runtimeMeta.bundle(id); const bundlePath = await runtimeMeta.bundle(id);
return { externalize: bundlePath }; return { externalize: bundlePath };
} }
if (id.includes('runtimeModule')) {
console.log('code ===>', await transformJsxRuntime(code));
}
return { return {
code: await transformJsxRuntime(code), code: await transformJsxRuntime(code),
}; };

View File

@ -11,4 +11,4 @@ export function getCache(rootDir: string, id: string) {
export function setCache(rootDir: string, id: string, data: any) { export function setCache(rootDir: string, id: string, data: any) {
const cachePath = path.join(rootDir, CACHE_PATH); const cachePath = path.join(rootDir, CACHE_PATH);
return cacache.put(cachePath, id, JSON.stringify(data)); return cacache.put(cachePath, id, JSON.stringify(data));
} }

View File

@ -21,7 +21,7 @@
"@ice/bundles": "^0.1.0" "@ice/bundles": "^0.1.0"
}, },
"devDependencies": { "devDependencies": {
"webpack": "^5.73.0" "webpack": "^5.76.2"
}, },
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"

View File

@ -78,7 +78,6 @@ describe('JSX Plus Plugin', () => {
const transformer = fakeConfig['transforms'][0]; const transformer = fakeConfig['transforms'][0];
const ret = transformer('<div x-if={false} />', '/foo/bar/a.tsx'); const ret = transformer('<div x-if={false} />', '/foo/bar/a.tsx');
expect(ret.code).toBe(`import { createCondition as __create_condition__ } from "babel-runtime-jsx-plus"; expect(ret.code).toBe(`import { createCondition as __create_condition__ } from "babel-runtime-jsx-plus";
__create_condition__([[() => false, () => <div />]]);`); __create_condition__([[() => false, () => <div />]]);`);
}); });
}); });

View File

@ -31,7 +31,7 @@
}, },
"devDependencies": { "devDependencies": {
"@ice/app": "^3.1.1", "@ice/app": "^3.1.1",
"webpack": "^5.73.0" "webpack": "^5.76.2"
}, },
"repository": { "repository": {
"type": "http", "type": "http",

View File

@ -28,7 +28,7 @@
"@ice/app": "^3.1.3", "@ice/app": "^3.1.3",
"build-scripts": "^2.1.0", "build-scripts": "^2.1.0",
"esbuild": "^0.16.5", "esbuild": "^0.16.5",
"webpack": "^5.73.0", "webpack": "^5.76.2",
"webpack-dev-server": "^4.9.2" "webpack-dev-server": "^4.9.2"
}, },
"repository": { "repository": {

View File

@ -31,7 +31,7 @@
}, },
"devDependencies": { "devDependencies": {
"@ice/app": "^3.1.3", "@ice/app": "^3.1.3",
"webpack": "^5.73.0" "webpack": "^5.76.2"
}, },
"repository": { "repository": {
"type": "http", "type": "http",

View File

@ -46,7 +46,7 @@
"fs-extra": "^10.0.0", "fs-extra": "^10.0.0",
"history": "^5.3.0", "history": "^5.3.0",
"htmlparser2": "^8.0.1", "htmlparser2": "^8.0.1",
"react-router-dom": "^6.2.2" "react-router-dom": "^6.8.2"
}, },
"peerDependencies": { "peerDependencies": {
"react": "^18.1.0", "react": "^18.1.0",

View File

@ -1,4 +1,5 @@
import React from 'react'; import React from 'react';
import type { RouteObject } from 'react-router-dom';
import { RouteComponent } from './types.js'; import { RouteComponent } from './types.js';
import type { RouteItem, RouteModules, RouteWrapperConfig, RouteMatch, RequestContext, RoutesConfig, RoutesData, RenderMode } from './types.js'; import type { RouteItem, RouteModules, RouteWrapperConfig, RouteMatch, RequestContext, RoutesConfig, RoutesData, RenderMode } from './types.js';
import RouteWrapper from './RouteWrapper.js'; import RouteWrapper from './RouteWrapper.js';
@ -148,7 +149,7 @@ export function createRouteElements(
</RouteWrapper> </RouteWrapper>
); );
const route: RouteItem = { const route: RouteObject = {
path, path,
element, element,
index, index,

View File

@ -2,7 +2,7 @@ import type { IncomingMessage, ServerResponse } from 'http';
import type { Action, InitialEntry, Location } from 'history'; import type { Action, InitialEntry, Location } from 'history';
import type { ComponentType, ReactNode, PropsWithChildren } from 'react'; import type { ComponentType, ReactNode, PropsWithChildren } from 'react';
import type { HydrationOptions, Root } from 'react-dom/client'; import type { HydrationOptions, Root } from 'react-dom/client';
import type { Navigator, Params } from 'react-router-dom'; import type { Navigator, Params, RouteObject } from 'react-router-dom';
type UseConfig = () => RouteConfig<Record<string, any>>; type UseConfig = () => RouteConfig<Record<string, any>>;
type UseData = () => RouteData; type UseData = () => RouteData;
@ -218,7 +218,7 @@ export interface AppRouterProps {
action: Action; action: Action;
location: Location; location: Location;
navigator: Navigator; navigator: Navigator;
routes: RouteItem[]; routes: RouteObject[];
static?: boolean; static?: boolean;
basename?: string; basename?: string;
} }
@ -249,4 +249,4 @@ export interface RouteMatch {
export type RenderMode = 'SSR' | 'SSG' | 'CSR'; export type RenderMode = 'SSR' | 'SSG' | 'CSR';
export type DistType = Array<'html' | 'javascript'>; export type DistType = Array<'html' | 'javascript'>;

View File

@ -26,7 +26,7 @@
"devDependencies": { "devDependencies": {
"esbuild": "^0.16.5", "esbuild": "^0.16.5",
"postcss": "^8.4.18", "postcss": "^8.4.18",
"webpack": "^5.73.0", "webpack": "^5.76.2",
"webpack-dev-server": "^4.7.4" "webpack-dev-server": "^4.7.4"
}, },
"scripts": { "scripts": {

View File

@ -222,7 +222,7 @@ function getJsxTransformOptions({
loose: false, loose: false,
...(polyfill ? { ...(polyfill ? {
mode: polyfill, mode: polyfill,
coreJs: '3.26', coreJs: '3.29',
} : {}), } : {}),
}; };
const supportBrowsers = getSupportedBrowsers(rootDir, mode === 'development'); const supportBrowsers = getSupportedBrowsers(rootDir, mode === 'development');

View File

@ -16,7 +16,7 @@
}, },
"devDependencies": { "devDependencies": {
"@ice/webpack-config": "^1.0.0", "@ice/webpack-config": "^1.0.0",
"webpack": "^5.73.0" "webpack": "^5.76.2"
}, },
"scripts": { "scripts": {
"watch": "tsc -w", "watch": "tsc -w",

File diff suppressed because it is too large Load Diff

View File

@ -36,7 +36,7 @@
"glob": "^7.2.3", "glob": "^7.2.3",
"gray-matter": "^4.0.3", "gray-matter": "^4.0.3",
"typescript": "^4.9.5", "typescript": "^4.9.5",
"webpack": "^5.75.0" "webpack": "^5.76.2"
}, },
"browserslist": { "browserslist": {
"production": [ "production": [