diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b18e402..6e77381 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,7 +68,7 @@ jobs: run: shell: bash env: - # rslib.config.mts keys the staged `@yuku-parser/binding-*` napi payload + # rslib.config.mts keys the staged `@yuku-core/binding-*` napi payload # off this variable (`linux-*` → `-gnu`, `alpine-*` → `linux-*-musl`). VSCE_TARGET: ${{ matrix.vsce-target }} steps: @@ -88,7 +88,7 @@ jobs: cache-dependency-path: pnpm-lock.yaml # `supportedArchitectures` must be set BEFORE `pnpm install` so pnpm also - # fetches the cross-target optional `@yuku-parser/binding-*` package. + # fetches the cross-target optional `@yuku-core/binding-*` package. # musl is always listed so the alpine-* legs get Yuku's `-musl` binding; # on the glibc Linux legs that is a few extra optional downloads, and the # macOS/Windows legs are unaffected because pnpm still filters by os. diff --git a/packages/vscode/package.json b/packages/vscode/package.json index c268508..9b46314 100644 --- a/packages/vscode/package.json +++ b/packages/vscode/package.json @@ -444,7 +444,7 @@ "vscode-jsonrpc": "^8.2.1", "vscode-languageclient": "^9.0.1", "webpack-license-plugin": "^4.5.1", - "yuku-parser": "^0.12.0" + "yuku-parser": "^0.19.0" }, "engines": { "vscode": "^1.97.0" diff --git a/packages/vscode/rslib.config.mts b/packages/vscode/rslib.config.mts index 4686dc5..038a7c6 100644 --- a/packages/vscode/rslib.config.mts +++ b/packages/vscode/rslib.config.mts @@ -9,9 +9,9 @@ const require = createRequire(import.meta.url); const rootDir = path.dirname(fileURLToPath(import.meta.url)); // The VSIX is platform-targeted for exactly one reason: Rstest's AST test-case -// collection loads the `yuku-parser` napi binding. Everything else in this -// extension is platform neutral (the Rslint Go binary and its napi parser are -// resolved from the project at runtime and never ship in the VSIX). +// collection loads the `yuku-core` napi binding (via `yuku-parser`). Everything +// else in this extension is platform neutral (the Rslint Go binary and its napi +// parser are resolved from the project at runtime and never ship in the VSIX). // On musl Linux (Alpine), set `VSCE_TARGET=alpine-` explicitly. const vsceTarget = process.env.VSCE_TARGET ?? `${process.platform}-${process.arch}`; @@ -21,11 +21,12 @@ const LINUX_LIBC: Record = { linux: 'gnu', alpine: 'musl' }; const [targetOs, targetArch] = vsceTarget.split('-'); const libc = LINUX_LIBC[targetOs]; const yukuBindingSuffix = libc ? `linux-${targetArch}-${libc}` : vsceTarget; -const yukuRequire = createRequire(require.resolve('yuku-parser')); -// Yuku computes this package name at runtime, so Rspack cannot discover it. -const yukuBindingPath = yukuRequire.resolve( - `@yuku-parser/binding-${yukuBindingSuffix}`, +const yukuCoreRequire = createRequire( + createRequire(require.resolve('yuku-parser')).resolve('yuku-core'), ); +// Yuku computes this package name at runtime, so Rspack cannot discover it. +const yukuBindingPackage = `@yuku-core/binding-${yukuBindingSuffix}`; +const yukuBindingPath = yukuCoreRequire.resolve(yukuBindingPackage); /** * Packages that are always resolved from the user's project at runtime, never @@ -69,7 +70,7 @@ const libs: LibConfig[] = [ patterns: [ { from: yukuBindingPath, - to: `@yuku-parser/binding-${yukuBindingSuffix}/yuku-parser.node`, + to: `${yukuBindingPackage}/${path.basename(yukuBindingPath)}`, }, { // The VSIX must carry a LICENSE (`.vscodeignore` keeps it), and diff --git a/packages/vscode/scripts/packageTargets.mjs b/packages/vscode/scripts/packageTargets.mjs index 7f43f9b..adad553 100644 --- a/packages/vscode/scripts/packageTargets.mjs +++ b/packages/vscode/scripts/packageTargets.mjs @@ -1,11 +1,11 @@ // Builds and packages one platform-targeted VSIX per supported target. // // The extension is platform targeted for a single reason: Rstest's AST test -// collection loads the `yuku-parser` napi binding, which `rslib.config.mts` -// stages into `dist/` based on `VSCE_TARGET`. +// collection loads the `yuku-core` napi binding (via `yuku-parser`), which +// `rslib.config.mts` stages into `dist/` based on `VSCE_TARGET`. // // Packaging a target other than the host platform requires the matching -// optional `@yuku-parser/binding-*` package to be installed locally, e.g.: +// optional `@yuku-core/binding-*` package to be installed locally, e.g.: // // pnpm config set --location=project --json supportedArchitectures \ // '{"cpu":["current","arm64"]}' && pnpm install diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d7bfdbe..d18b798 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -96,8 +96,8 @@ importers: specifier: ^4.5.1 version: 4.5.1(webpack@5.111.1) yuku-parser: - specifier: ^0.12.0 - version: 0.12.0 + specifier: ^0.19.0 + version: 0.19.0 packages: @@ -1165,86 +1165,74 @@ packages: '@xtuc/long@4.2.2': resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} - '@yuku-parser/binding-android-arm64@0.12.0': - resolution: {integrity: sha512-TUVnV1+c+wnxPS/mR5ReMTP6V2favLaoYCMi2Mm/nxv02WXFk3sKk2acnhDmQJEWOSr8bee1p1XiI/HoLRAySQ==} + '@yuku-core/binding-android-arm64@0.19.0': + resolution: {integrity: sha512-wdL2XmTiZixAOaHk9Z0JJZ8u9Qm8d333Zjpc6gaxXFX+UR5BlsfxZ7a2+2Rm71pamppsPYGUGFq2oVLbh6DISw==} cpu: [arm64] os: [android] - deprecated: yuku-parser runs on yuku-core since 0.14 - '@yuku-parser/binding-darwin-arm64@0.12.0': - resolution: {integrity: sha512-8kHul5s57muWcymw/f3Oq99UQurJ7oHhSmrc8/aYTC1kCEA8ZGEh2N88BM4fTUnv5cUbM7/eQogwWPkqWG3QaQ==} + '@yuku-core/binding-darwin-arm64@0.19.0': + resolution: {integrity: sha512-7sNJa6XJhyetnTy64jw3NEi4YgUcezHk1G5GH9FSvXAuC8wIlbaOwT9lgq5qo5sspjrZJQlBR1TWflP49uRpMw==} cpu: [arm64] os: [darwin] - deprecated: yuku-parser runs on yuku-core since 0.14 - '@yuku-parser/binding-darwin-x64@0.12.0': - resolution: {integrity: sha512-V+CzqRz1pZRsU6CpqEHzpmLgQ1gpgpvGU9KUTenEgrjO6TRF3QNAKVMDvYMmxq13aqt3CnnEk/X7/5CE8BgGQg==} + '@yuku-core/binding-darwin-x64@0.19.0': + resolution: {integrity: sha512-pTC7dYEc59isdyizc3nsuyFNBu2LU5wMYZ1be6UMr59PY/AJNtO1aBLWV0MgL/z7C1nv/2sX4TNjGgKLoeevJw==} cpu: [x64] os: [darwin] - deprecated: yuku-parser runs on yuku-core since 0.14 - '@yuku-parser/binding-freebsd-x64@0.12.0': - resolution: {integrity: sha512-Kdx8QK9ZbxavZ8tb2H3e55etEOYZMRiyQnIIJjGlwmJ/TW5PPNJwEu6/Pqmj0ViCdiZFyay7Hk3OvamgU9xURQ==} + '@yuku-core/binding-freebsd-x64@0.19.0': + resolution: {integrity: sha512-xrZjF6XOEwyLOiDIfrwDdRCS6ghxcJeirNC1KivQhVcUwlRonaU79S3/Uiyx3lBylPnT8qKJ3/aMT+H52nGTJQ==} cpu: [x64] os: [freebsd] - deprecated: yuku-parser runs on yuku-core since 0.14 - '@yuku-parser/binding-linux-arm-gnu@0.12.0': - resolution: {integrity: sha512-DU+VMCe7dGXtRWDyltUA6qeXzf6NREIzzk/VJhdZXYDKa81SAQJFXsOYVcRzB09l9nwZluUpLPyvup1CxAlQ3g==} + '@yuku-core/binding-linux-arm-gnu@0.19.0': + resolution: {integrity: sha512-0OyIH53C0I1CbADHn9FSdCfX5qbpeLwJhmOVhonFJNYheybOnkSJ50qGMfTJIb8y5zrwqvLs7FVBvz6Fk8maZg==} cpu: [arm] os: [linux] libc: [glibc] - deprecated: yuku-parser runs on yuku-core since 0.14 - '@yuku-parser/binding-linux-arm-musl@0.12.0': - resolution: {integrity: sha512-BtkS2oFmk/IRj2dkaNAJMTyB3oJDD4Xy8nNai00S0AIlvFs757y6Mokb7CZ+44gxlv1zYtQNkUz2IClzhWLUGA==} + '@yuku-core/binding-linux-arm-musl@0.19.0': + resolution: {integrity: sha512-z/iPfkCOCSXE34VXNt0uP1ORSW+4mEa9b5CiJcWZeqZH08g49bFU/jRM2T04f+Wpw5mJ6HIzNBiojxeAbrHjeg==} cpu: [arm] os: [linux] libc: [musl] - deprecated: yuku-parser runs on yuku-core since 0.14 - '@yuku-parser/binding-linux-arm64-gnu@0.12.0': - resolution: {integrity: sha512-l2w9y3199BeIcPr3vQ5VCH6G+R2Lm8cjpORUEOo+ImlfdwGODiRvRX55SsLt7dxXsFYDZSvJfUqGuPRKsz1lBQ==} + '@yuku-core/binding-linux-arm64-gnu@0.19.0': + resolution: {integrity: sha512-jLNTi+gzaRwBJ+gwhCJ+rDb5dmx/8hEBx93UWd7hjMSqPTL1D1wvVSvXVAldV5kALvju7b0/m51EHEhs4+I1fA==} cpu: [arm64] os: [linux] libc: [glibc] - deprecated: yuku-parser runs on yuku-core since 0.14 - '@yuku-parser/binding-linux-arm64-musl@0.12.0': - resolution: {integrity: sha512-+uq2hR8ex4Vkex9d4Ok32GJgHlEv1KPwSRJuoycLtbMa+z96QT6NSGQOS6S06o4CCou0VlEedhtFToL0+5ryRg==} + '@yuku-core/binding-linux-arm64-musl@0.19.0': + resolution: {integrity: sha512-YwyPIdW/rN2Fmv0MTFWi47FaB3F9g+2b+sJISyAw83Yd60RWH4T3Nx6XkAHHVN+uKJNBAd6So7/BVihSiFYvuQ==} cpu: [arm64] os: [linux] libc: [musl] - deprecated: yuku-parser runs on yuku-core since 0.14 - '@yuku-parser/binding-linux-x64-gnu@0.12.0': - resolution: {integrity: sha512-pzcvJ90sJy1SUrZfJdza8s6fUHF7aEIbQTQqFF3NJsGy3EN4FIKIKaxO2hO9KGbm7KcyqFJseNuy4Js8x9PBfw==} + '@yuku-core/binding-linux-x64-gnu@0.19.0': + resolution: {integrity: sha512-/vskaAXVX3ESR43FiTdfiYS7z1b9uoQJwVQ/0RgUHgN2sWoAyCZs+aX4CgU7eKGIHTVfp9VFwv+c+2XchYiEtQ==} cpu: [x64] os: [linux] libc: [glibc] - deprecated: yuku-parser runs on yuku-core since 0.14 - '@yuku-parser/binding-linux-x64-musl@0.12.0': - resolution: {integrity: sha512-C22Sze50kYeJItlJzllGOBbRFwZD/10KzfPW+VU+ZEf6sbW2zYdNG6KftxG/O5hHpyTY+vtaCxTUHDyyDNXn2A==} + '@yuku-core/binding-linux-x64-musl@0.19.0': + resolution: {integrity: sha512-FuXL5igeSKib9Rye02TdH+D6SQezTyGxIATMu1Qsn/QywrzwpGl35OLpS2C1x5vpGLeVE2XgiLd5mVPFHmIglQ==} cpu: [x64] os: [linux] libc: [musl] - deprecated: yuku-parser runs on yuku-core since 0.14 - '@yuku-parser/binding-win32-arm64@0.12.0': - resolution: {integrity: sha512-PEfsEriglnn6Bg4FY+64kroH3J6sb3D6ERU6I1MgUkOZzZ4Of2GozN1qVRhoyEzFH1MpOgohvKI26PAihVJ4VQ==} + '@yuku-core/binding-win32-arm64@0.19.0': + resolution: {integrity: sha512-YuJAe7zEKT1Xa7LuHlhGJpPnYQeVtvo0rZvNjJRqkH0hQGOw4C8QeP30Tg5VKGzZfo2x8CjhjEhKt4TmLwfmdg==} cpu: [arm64] os: [win32] - deprecated: yuku-parser runs on yuku-core since 0.14 - '@yuku-parser/binding-win32-x64@0.12.0': - resolution: {integrity: sha512-UKaOCLIyk/ldbuw3yJz1ZDvctfQZlGhE/tanpMWWuEzKDj5CzmVf4Kvz6BHJU92k6DNEsWdv9isGv5YeyinUKA==} + '@yuku-core/binding-win32-x64@0.19.0': + resolution: {integrity: sha512-o8iY/mXwlRkedp0LNTr4+TEfXTPQwoNZmv6k+1WIAd1ZXEn8xJJTBCtB0osaVvdZo/x/cNmV16UrWrrGpM5Mvw==} cpu: [x64] os: [win32] - deprecated: yuku-parser runs on yuku-core since 0.14 - '@yuku-toolchain/types@0.12.0': - resolution: {integrity: sha512-xhxRslz6/D43Aj2rKnp8s5Tr9RicAXsKnbTLqEvFPWSKsPUnZMvB609vYizL/Khmv899/Z7M2f7l6GJ46pfwTA==} + '@yuku-toolchain/types@0.19.0': + resolution: {integrity: sha512-tFkNbsP4WXX9UMUC5syJGdK9dPMLK0PPaIuXCcCYH75sZ8MrebfBZ2XvCILRTw8AgLivSSCfDa4R67iYBDa4Kg==} acorn@8.18.0: resolution: {integrity: sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==} @@ -2825,8 +2813,13 @@ packages: resolution: {integrity: sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==} engines: {node: '>=18'} - yuku-parser@0.12.0: - resolution: {integrity: sha512-ZZBKBFdlHgTAhvV19gZ6i9CebsTBgZjFFS1GYpuowrK/BbgPeRidDXdD4wcHDrno7mxXiOwRaSLTzfUWXj5eGA==} + yuku-core@0.19.0: + resolution: {integrity: sha512-kYK9e1XdfirNhkipzW0wmMcSWcVF/CWnuugodfVYRCUwvoBefweL9HzB96OiKEhsx78V5WbUxbJqlizMX869Qg==} + engines: {node: '>=14.18.0'} + + yuku-parser@0.19.0: + resolution: {integrity: sha512-XrBh9ZiQK5mJVRxZBAvD6LwRyAYrK3MFtH3+onyuxFL5hFD44EC3QOmIC1FjTj6H2MMwq46/NAI+NZxLZPZgxg==} + engines: {node: '>=14.18.0'} snapshots: @@ -3834,43 +3827,43 @@ snapshots: '@xtuc/long@4.2.2': {} - '@yuku-parser/binding-android-arm64@0.12.0': + '@yuku-core/binding-android-arm64@0.19.0': optional: true - '@yuku-parser/binding-darwin-arm64@0.12.0': + '@yuku-core/binding-darwin-arm64@0.19.0': optional: true - '@yuku-parser/binding-darwin-x64@0.12.0': + '@yuku-core/binding-darwin-x64@0.19.0': optional: true - '@yuku-parser/binding-freebsd-x64@0.12.0': + '@yuku-core/binding-freebsd-x64@0.19.0': optional: true - '@yuku-parser/binding-linux-arm-gnu@0.12.0': + '@yuku-core/binding-linux-arm-gnu@0.19.0': optional: true - '@yuku-parser/binding-linux-arm-musl@0.12.0': + '@yuku-core/binding-linux-arm-musl@0.19.0': optional: true - '@yuku-parser/binding-linux-arm64-gnu@0.12.0': + '@yuku-core/binding-linux-arm64-gnu@0.19.0': optional: true - '@yuku-parser/binding-linux-arm64-musl@0.12.0': + '@yuku-core/binding-linux-arm64-musl@0.19.0': optional: true - '@yuku-parser/binding-linux-x64-gnu@0.12.0': + '@yuku-core/binding-linux-x64-gnu@0.19.0': optional: true - '@yuku-parser/binding-linux-x64-musl@0.12.0': + '@yuku-core/binding-linux-x64-musl@0.19.0': optional: true - '@yuku-parser/binding-win32-arm64@0.12.0': + '@yuku-core/binding-win32-arm64@0.19.0': optional: true - '@yuku-parser/binding-win32-x64@0.12.0': + '@yuku-core/binding-win32-x64@0.19.0': optional: true - '@yuku-toolchain/types@0.12.0': {} + '@yuku-toolchain/types@0.19.0': {} acorn@8.18.0: {} @@ -5473,19 +5466,24 @@ snapshots: yoctocolors-cjs@2.1.3: {} - yuku-parser@0.12.0: + yuku-core@0.19.0: dependencies: - '@yuku-toolchain/types': 0.12.0 + '@yuku-toolchain/types': 0.19.0 optionalDependencies: - '@yuku-parser/binding-android-arm64': 0.12.0 - '@yuku-parser/binding-darwin-arm64': 0.12.0 - '@yuku-parser/binding-darwin-x64': 0.12.0 - '@yuku-parser/binding-freebsd-x64': 0.12.0 - '@yuku-parser/binding-linux-arm-gnu': 0.12.0 - '@yuku-parser/binding-linux-arm-musl': 0.12.0 - '@yuku-parser/binding-linux-arm64-gnu': 0.12.0 - '@yuku-parser/binding-linux-arm64-musl': 0.12.0 - '@yuku-parser/binding-linux-x64-gnu': 0.12.0 - '@yuku-parser/binding-linux-x64-musl': 0.12.0 - '@yuku-parser/binding-win32-arm64': 0.12.0 - '@yuku-parser/binding-win32-x64': 0.12.0 + '@yuku-core/binding-android-arm64': 0.19.0 + '@yuku-core/binding-darwin-arm64': 0.19.0 + '@yuku-core/binding-darwin-x64': 0.19.0 + '@yuku-core/binding-freebsd-x64': 0.19.0 + '@yuku-core/binding-linux-arm-gnu': 0.19.0 + '@yuku-core/binding-linux-arm-musl': 0.19.0 + '@yuku-core/binding-linux-arm64-gnu': 0.19.0 + '@yuku-core/binding-linux-arm64-musl': 0.19.0 + '@yuku-core/binding-linux-x64-gnu': 0.19.0 + '@yuku-core/binding-linux-x64-musl': 0.19.0 + '@yuku-core/binding-win32-arm64': 0.19.0 + '@yuku-core/binding-win32-x64': 0.19.0 + + yuku-parser@0.19.0: + dependencies: + '@yuku-toolchain/types': 0.19.0 + yuku-core: 0.19.0