From c45d31e405cebe24708ffb70b3f8edf751a34765 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 4 Jul 2024 15:57:34 +0800 Subject: [PATCH 1/4] release: 1.0.0-alpha.1 --- crates/node_binding/binding.d.ts | 15 --------------- crates/node_binding/package.json | 2 +- npm/darwin-arm64/package.json | 2 +- npm/darwin-x64/package.json | 2 +- npm/linux-x64-gnu/package.json | 2 +- npm/win32-x64-msvc/package.json | 2 +- package.json | 2 +- packages/create-rspack/package.json | 2 +- packages/rspack-cli/package.json | 2 +- packages/rspack-dev-server/package.json | 2 +- packages/rspack-lite-tapable/package.json | 2 +- packages/rspack-plugin-minify/package.json | 2 +- .../rspack-plugin-preact-refresh/package.json | 2 +- packages/rspack-plugin-react-refresh/package.json | 2 +- packages/rspack-test-tools/package.json | 2 +- packages/rspack/package.json | 2 +- tests/plugin-test/copy-plugin/build/main.js | 2 +- 17 files changed, 16 insertions(+), 31 deletions(-) diff --git a/crates/node_binding/binding.d.ts b/crates/node_binding/binding.d.ts index 479324e8060..37f4eaa61f2 100644 --- a/crates/node_binding/binding.d.ts +++ b/crates/node_binding/binding.d.ts @@ -676,13 +676,6 @@ export interface JsTap { stage: number } -export interface NodeFS { - writeFile: (...args: any[]) => any - removeFile: (...args: any[]) => any - mkdir: (...args: any[]) => any - mkdirp: (...args: any[]) => any -} - export interface PathWithInfo { path: string info: JsAssetInfo @@ -1571,11 +1564,3 @@ export interface RegisterJsTaps { registerJavascriptModulesChunkHashTaps: (stages: Array) => Array<{ function: ((arg: JsChunk) => Buffer); stage: number; }> } -export interface ThreadsafeNodeFS { - writeFile: (name: string, content: Buffer) => Promise | void - removeFile: (name: string) => Promise | void - mkdir: (name: string) => Promise | void - mkdirp: (name: string) => Promise | string | void - removeDirAll: (name: string) => Promise | string | void -} - diff --git a/crates/node_binding/package.json b/crates/node_binding/package.json index 8d2e0676ab9..c83aeea5898 100644 --- a/crates/node_binding/package.json +++ b/crates/node_binding/package.json @@ -1,6 +1,6 @@ { "name": "@rspack/binding", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "license": "MIT", "description": "Node binding for rspack", "main": "binding.js", diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json index 25e980a0327..14c4f99d92a 100644 --- a/npm/darwin-arm64/package.json +++ b/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@rspack/binding-darwin-arm64", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "license": "MIT", "description": "Node binding for rspack", "main": "rspack.darwin-arm64.node", diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json index c306ef62c23..36ac3a55bf0 100644 --- a/npm/darwin-x64/package.json +++ b/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@rspack/binding-darwin-x64", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "license": "MIT", "description": "Node binding for rspack", "main": "rspack.darwin-x64.node", diff --git a/npm/linux-x64-gnu/package.json b/npm/linux-x64-gnu/package.json index abffdd91c12..7a5549b3b98 100644 --- a/npm/linux-x64-gnu/package.json +++ b/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@rspack/binding-linux-x64-gnu", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "license": "MIT", "description": "Node binding for rspack", "main": "rspack.linux-x64-gnu.node", diff --git a/npm/win32-x64-msvc/package.json b/npm/win32-x64-msvc/package.json index 4fc58e1eb3b..2692e42f504 100644 --- a/npm/win32-x64-msvc/package.json +++ b/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@rspack/binding-win32-x64-msvc", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "license": "MIT", "description": "Node binding for rspack", "main": "rspack.win32-x64-msvc.node", diff --git a/package.json b/package.json index 771f154f041..66ca3d39a97 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "monorepo", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "license": "MIT", "description": "The fast Rust-based web bundler with webpack-compatible API", "private": true, diff --git a/packages/create-rspack/package.json b/packages/create-rspack/package.json index df9c376b293..1fbf4f2279a 100644 --- a/packages/create-rspack/package.json +++ b/packages/create-rspack/package.json @@ -1,6 +1,6 @@ { "name": "create-rspack", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "license": "MIT", "main": "index.js", "bin": { diff --git a/packages/rspack-cli/package.json b/packages/rspack-cli/package.json index aad65cea318..e45e56decfb 100644 --- a/packages/rspack-cli/package.json +++ b/packages/rspack-cli/package.json @@ -1,6 +1,6 @@ { "name": "@rspack/cli", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "license": "MIT", "description": "CLI for rspack", "publishConfig": { diff --git a/packages/rspack-dev-server/package.json b/packages/rspack-dev-server/package.json index 9d810474da6..b0609a70e55 100644 --- a/packages/rspack-dev-server/package.json +++ b/packages/rspack-dev-server/package.json @@ -1,6 +1,6 @@ { "name": "@rspack/dev-server", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "license": "MIT", "description": "Development server for rspack", "main": "./dist/index.js", diff --git a/packages/rspack-lite-tapable/package.json b/packages/rspack-lite-tapable/package.json index 470bdb6653e..d8dff5ec279 100644 --- a/packages/rspack-lite-tapable/package.json +++ b/packages/rspack-lite-tapable/package.json @@ -1,6 +1,6 @@ { "name": "@rspack/lite-tapable", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "license": "MIT", "description": "Lite weight tapable for Rspack", "main": "./dist/index.js", diff --git a/packages/rspack-plugin-minify/package.json b/packages/rspack-plugin-minify/package.json index 348280fc362..037c30f036b 100644 --- a/packages/rspack-plugin-minify/package.json +++ b/packages/rspack-plugin-minify/package.json @@ -1,6 +1,6 @@ { "name": "@rspack/plugin-minify", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "license": "MIT", "description": "Minify plugin for rspack", "main": "src/index.js", diff --git a/packages/rspack-plugin-preact-refresh/package.json b/packages/rspack-plugin-preact-refresh/package.json index 5b231290ff5..585f4e94998 100644 --- a/packages/rspack-plugin-preact-refresh/package.json +++ b/packages/rspack-plugin-preact-refresh/package.json @@ -1,6 +1,6 @@ { "name": "@rspack/plugin-preact-refresh", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "license": "MIT", "description": "Preact refresh plugin for rspack", "main": "dist/index.js", diff --git a/packages/rspack-plugin-react-refresh/package.json b/packages/rspack-plugin-react-refresh/package.json index 8f0c1380c13..7a3649404db 100644 --- a/packages/rspack-plugin-react-refresh/package.json +++ b/packages/rspack-plugin-react-refresh/package.json @@ -1,6 +1,6 @@ { "name": "@rspack/plugin-react-refresh", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "license": "MIT", "description": "React refresh plugin for rspack", "main": "dist/index.js", diff --git a/packages/rspack-test-tools/package.json b/packages/rspack-test-tools/package.json index f2b13968a80..6d1fbb41017 100644 --- a/packages/rspack-test-tools/package.json +++ b/packages/rspack-test-tools/package.json @@ -1,6 +1,6 @@ { "name": "@rspack/test-tools", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "license": "MIT", "description": "Test tools for rspack", "main": "dist/index.js", diff --git a/packages/rspack/package.json b/packages/rspack/package.json index 24ee4552cc2..e5412d3ffa2 100644 --- a/packages/rspack/package.json +++ b/packages/rspack/package.json @@ -1,6 +1,6 @@ { "name": "@rspack/core", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "webpackVersion": "5.75.0", "license": "MIT", "description": "The fast Rust-based web bundler with webpack-compatible API", diff --git a/tests/plugin-test/copy-plugin/build/main.js b/tests/plugin-test/copy-plugin/build/main.js index 95eed6f09a5..3104eb78b91 100644 --- a/tests/plugin-test/copy-plugin/build/main.js +++ b/tests/plugin-test/copy-plugin/build/main.js @@ -1 +1 @@ -(()=>{"use strict";var r={},t={};function e(i){var o=t[i];if(void 0!==o)return o.exports;var n=t[i]={exports:{}};return r[i](n,n.exports,e),n.exports}e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(r){if("object"==typeof window)return window}}(),e.rv=function(){return"1.0.0-alpha.0"},(()=>{e.g.importScripts&&(r=e.g.location+"");var r,t=e.g.document;if(!r&&t&&(t.currentScript&&(r=t.currentScript.src),!r)){var i=t.getElementsByTagName("script");if(i.length){for(var o=i.length-1;o>-1&&(!r||!/^http(s?):/.test(r));)r=i[o--].src}}if(!r)throw Error("Automatic publicPath is not supported in this browser");r=r.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=r})(),e.ruid="bundler=rspack@1.0.0-alpha.0";e.p})(); \ No newline at end of file +(()=>{"use strict";var r={},t={};function e(i){var o=t[i];if(void 0!==o)return o.exports;var n=t[i]={exports:{}};return r[i](n,n.exports,e),n.exports}e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(r){if("object"==typeof window)return window}}(),e.rv=function(){return"1.0.0-alpha.1"},(()=>{e.g.importScripts&&(r=e.g.location+"");var r,t=e.g.document;if(!r&&t&&(t.currentScript&&(r=t.currentScript.src),!r)){var i=t.getElementsByTagName("script");if(i.length){for(var o=i.length-1;o>-1&&(!r||!/^http(s?):/.test(r));)r=i[o--].src}}if(!r)throw Error("Automatic publicPath is not supported in this browser");r=r.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=r})(),e.ruid="bundler=rspack@1.0.0-alpha.1";e.p})(); \ No newline at end of file From 1b7873e0cd82f71ba69d7ecf23f89424da310b83 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 4 Jul 2024 15:59:08 +0800 Subject: [PATCH 2/4] fix: binding --- crates/node_binding/binding.d.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/crates/node_binding/binding.d.ts b/crates/node_binding/binding.d.ts index 37f4eaa61f2..0d6f9695cf7 100644 --- a/crates/node_binding/binding.d.ts +++ b/crates/node_binding/binding.d.ts @@ -676,6 +676,13 @@ export interface JsTap { stage: number } +export interface NodeFS { + writeFile: (...args: any[]) => any + removeFile: (...args: any[]) => any + mkdir: (...args: any[]) => any + mkdirp: (...args: any[]) => any +} + export interface PathWithInfo { path: string info: JsAssetInfo @@ -1564,3 +1571,10 @@ export interface RegisterJsTaps { registerJavascriptModulesChunkHashTaps: (stages: Array) => Array<{ function: ((arg: JsChunk) => Buffer); stage: number; }> } +export interface ThreadsafeNodeFS { + writeFile: (name: string, content: Buffer) => Promise | void + removeFile: (name: string) => Promise | void + mkdir: (name: string) => Promise | void + mkdirp: (name: string) => Promise | string | void + removeDirAll: (name: string) => Promise | string | void +} From 10f7fc1984e4805c0483201630bc91dcdf6623be Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 4 Jul 2024 16:01:07 +0800 Subject: [PATCH 3/4] fix: binding --- crates/node_binding/binding.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/node_binding/binding.d.ts b/crates/node_binding/binding.d.ts index 0d6f9695cf7..bda8abdcfd9 100644 --- a/crates/node_binding/binding.d.ts +++ b/crates/node_binding/binding.d.ts @@ -1577,4 +1577,4 @@ export interface ThreadsafeNodeFS { mkdir: (name: string) => Promise | void mkdirp: (name: string) => Promise | string | void removeDirAll: (name: string) => Promise | string | void -} +} \ No newline at end of file From 3edc851b43d583adf91ae6b59f41ccccf296a2ab Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 4 Jul 2024 16:01:31 +0800 Subject: [PATCH 4/4] fix: binding --- crates/node_binding/binding.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/node_binding/binding.d.ts b/crates/node_binding/binding.d.ts index bda8abdcfd9..479324e8060 100644 --- a/crates/node_binding/binding.d.ts +++ b/crates/node_binding/binding.d.ts @@ -1577,4 +1577,5 @@ export interface ThreadsafeNodeFS { mkdir: (name: string) => Promise | void mkdirp: (name: string) => Promise | string | void removeDirAll: (name: string) => Promise | string | void -} \ No newline at end of file +} +