From b075982eaa6d11838a676d9129703f4d1070d7e8 Mon Sep 17 00:00:00 2001 From: ottomated <31470743+ottomated@users.noreply.github.com> Date: Thu, 24 Oct 2024 20:04:09 +0000 Subject: [PATCH] fix(types): Change @oxc/types package name (#6874) Closes #6862. Possible options: - `oxc-types` - `@oxc-project/types` - `@oxc-ast/types` - `oxc-ast-types` --- .github/workflows/release_types.yml | 6 +++--- crates/oxc/src/napi/parse.rs | 2 +- crates/oxc_wasm/package.json | 2 +- crates/oxc_wasm/src/lib.rs | 4 ++-- napi/parser/index.d.ts | 2 +- npm/oxc-parser/package.json | 4 ++-- npm/oxc-types/package.json | 2 +- pnpm-lock.yaml | 8 ++++---- wasm/parser/package.json | 2 +- wasm/parser/src/lib.rs | 4 ++-- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release_types.yml b/.github/workflows/release_types.yml index 5ba137eae5050..796d5a3eb15d8 100644 --- a/.github/workflows/release_types.yml +++ b/.github/workflows/release_types.yml @@ -1,4 +1,4 @@ -name: Release @oxc/types +name: Release @oxc-project/types on: workflow_dispatch: @@ -27,7 +27,7 @@ jobs: id: version with: static-checking: localIsNew - file-url: https://unpkg.com/@oxc/types/package.json + file-url: https://unpkg.com/@oxc-project/types/package.json file-name: npm/oxc-types/package.json - name: Set version name @@ -38,7 +38,7 @@ jobs: build: needs: check if: needs.check.outputs.version_changed == 'true' - name: Release @oxc/types + name: Release @oxc-project/types runs-on: ubuntu-latest permissions: id-token: write # for `pnpm publish --provenance` diff --git a/crates/oxc/src/napi/parse.rs b/crates/oxc/src/napi/parse.rs index 9a3fc3044736c..6ab5d3ce8e3df 100644 --- a/crates/oxc/src/napi/parse.rs +++ b/crates/oxc/src/napi/parse.rs @@ -21,7 +21,7 @@ pub struct ParserOptions { #[napi(object)] pub struct ParseResult { - #[napi(ts_type = "import(\"@oxc/types\").Program")] + #[napi(ts_type = "import(\"@oxc-project/types\").Program")] pub program: String, pub comments: Vec, pub errors: Vec, diff --git a/crates/oxc_wasm/package.json b/crates/oxc_wasm/package.json index 1df1e71d9a79b..9f0966b7a1623 100644 --- a/crates/oxc_wasm/package.json +++ b/crates/oxc_wasm/package.json @@ -13,7 +13,7 @@ "oxc_wasm.d.ts" ], "devDependencies": { - "@oxc/types": "workspace:^" + "@oxc-project/types": "workspace:^" }, "main": "oxc_wasm.js", "types": "oxc_wasm.d.ts", diff --git a/crates/oxc_wasm/src/lib.rs b/crates/oxc_wasm/src/lib.rs index e63257ac9af3b..10097dbe2eaca 100644 --- a/crates/oxc_wasm/src/lib.rs +++ b/crates/oxc_wasm/src/lib.rs @@ -34,8 +34,8 @@ use crate::options::{OxcOptions, OxcRunOptions}; #[wasm_bindgen::prelude::wasm_bindgen(typescript_custom_section)] const TS_APPEND_CONTENT: &'static str = r#" -import type { Program, Span } from "@oxc/types"; -export * from "@oxc/types"; +import type { Program, Span } from "@oxc-project/types"; +export * from "@oxc-project/types"; "#; #[wasm_bindgen(getter_with_clone)] diff --git a/napi/parser/index.d.ts b/napi/parser/index.d.ts index 790372d240cf3..77423644b5bbe 100644 --- a/napi/parser/index.d.ts +++ b/napi/parser/index.d.ts @@ -91,7 +91,7 @@ export declare function moduleLexerSync(sourceText: string, options?: ParserOpti export declare function parseAsync(sourceText: string, options?: ParserOptions | undefined | null): Promise export interface ParseResult { - program: import("@oxc/types").Program + program: import("@oxc-project/types").Program comments: Array errors: Array } diff --git a/npm/oxc-parser/package.json b/npm/oxc-parser/package.json index 0de44788cf50b..bb76fe7a2a938 100644 --- a/npm/oxc-parser/package.json +++ b/npm/oxc-parser/package.json @@ -24,6 +24,6 @@ "bindings.js" ], "devDependencies": { - "@oxc/types": "workspace:^" + "@oxc-project/types": "workspace:^" } -} \ No newline at end of file +} diff --git a/npm/oxc-types/package.json b/npm/oxc-types/package.json index 05ca8ba3e1eac..0feffc60f7d19 100644 --- a/npm/oxc-types/package.json +++ b/npm/oxc-types/package.json @@ -1,5 +1,5 @@ { - "name": "@oxc/types", + "name": "@oxc-project/types", "version": "0.32.0", "description": "Types for Oxc AST nodes", "keywords": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ba34384b77550..5c90fa94031fb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,7 +60,7 @@ importers: npm/oxc-parser: devDependencies: - '@oxc/types': + '@oxc-project/types': specifier: workspace:^ version: link:../oxc-types @@ -70,7 +70,7 @@ importers: npm/oxc-wasm: devDependencies: - '@oxc/types': + '@oxc-project/types': specifier: workspace:^ version: link:../oxc-types @@ -78,7 +78,7 @@ importers: npm/parser-wasm: devDependencies: - '@oxc/types': + '@oxc-project/types': specifier: workspace:^ version: link:../oxc-types @@ -96,7 +96,7 @@ importers: wasm/parser: devDependencies: - '@oxc/types': + '@oxc-project/types': specifier: workspace:^ version: link:../../npm/oxc-types diff --git a/wasm/parser/package.json b/wasm/parser/package.json index fe3a50a5a0c06..0d53340d39581 100644 --- a/wasm/parser/package.json +++ b/wasm/parser/package.json @@ -27,7 +27,7 @@ "web" ], "devDependencies": { - "@oxc/types": "workspace:^" + "@oxc-project/types": "workspace:^" }, "scripts": { "build": "pnpm run build-node && pnpm run build-web && pnpm run copy-files && pnpm run clean-files", diff --git a/wasm/parser/src/lib.rs b/wasm/parser/src/lib.rs index 0a850cb3e5852..7a26a4706b244 100644 --- a/wasm/parser/src/lib.rs +++ b/wasm/parser/src/lib.rs @@ -9,8 +9,8 @@ use wasm_bindgen::prelude::*; #[wasm_bindgen::prelude::wasm_bindgen(typescript_custom_section)] const TS_APPEND_CONTENT: &'static str = r#" -import type { Program } from "@oxc/types"; -export * from "@oxc/types"; +import type { Program } from "@oxc-project/types"; +export * from "@oxc-project/types"; "#; #[derive(Debug, Default, Clone, Deserialize, Tsify)]