diff --git a/crates/napi/index.js b/crates/napi/index.js index cf743f9218..7eaa2f8f54 100644 --- a/crates/napi/index.js +++ b/crates/napi/index.js @@ -37,7 +37,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.android-arm64.node') } else { - nativeBinding = require('@ast-grep/napi-android-arm64') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-android-arm64') } } catch (e) { loadError = e @@ -49,7 +49,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.android-arm-eabi.node') } else { - nativeBinding = require('@ast-grep/napi-android-arm-eabi') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-android-arm-eabi') } } catch (e) { loadError = e @@ -69,7 +69,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.win32-x64-msvc.node') } else { - nativeBinding = require('@ast-grep/napi-win32-x64-msvc') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-win32-x64-msvc') } } catch (e) { loadError = e @@ -83,7 +83,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.win32-ia32-msvc.node') } else { - nativeBinding = require('@ast-grep/napi-win32-ia32-msvc') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-win32-ia32-msvc') } } catch (e) { loadError = e @@ -97,7 +97,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.win32-arm64-msvc.node') } else { - nativeBinding = require('@ast-grep/napi-win32-arm64-msvc') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-win32-arm64-msvc') } } catch (e) { loadError = e @@ -113,7 +113,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.darwin-universal.node') } else { - nativeBinding = require('@ast-grep/napi-darwin-universal') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-darwin-universal') } break } catch {} @@ -124,7 +124,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.darwin-x64.node') } else { - nativeBinding = require('@ast-grep/napi-darwin-x64') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-darwin-x64') } } catch (e) { loadError = e @@ -138,7 +138,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.darwin-arm64.node') } else { - nativeBinding = require('@ast-grep/napi-darwin-arm64') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-darwin-arm64') } } catch (e) { loadError = e @@ -157,7 +157,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.freebsd-x64.node') } else { - nativeBinding = require('@ast-grep/napi-freebsd-x64') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-freebsd-x64') } } catch (e) { loadError = e @@ -174,7 +174,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.linux-x64-musl.node') } else { - nativeBinding = require('@ast-grep/napi-linux-x64-musl') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-linux-x64-musl') } } catch (e) { loadError = e @@ -187,7 +187,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.linux-x64-gnu.node') } else { - nativeBinding = require('@ast-grep/napi-linux-x64-gnu') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-linux-x64-gnu') } } catch (e) { loadError = e @@ -203,7 +203,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.linux-arm64-musl.node') } else { - nativeBinding = require('@ast-grep/napi-linux-arm64-musl') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-linux-arm64-musl') } } catch (e) { loadError = e @@ -216,7 +216,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.linux-arm64-gnu.node') } else { - nativeBinding = require('@ast-grep/napi-linux-arm64-gnu') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-linux-arm64-gnu') } } catch (e) { loadError = e @@ -232,7 +232,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.linux-arm-musleabihf.node') } else { - nativeBinding = require('@ast-grep/napi-linux-arm-musleabihf') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-linux-arm-musleabihf') } } catch (e) { loadError = e @@ -245,7 +245,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.linux-arm-gnueabihf.node') } else { - nativeBinding = require('@ast-grep/napi-linux-arm-gnueabihf') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-linux-arm-gnueabihf') } } catch (e) { loadError = e @@ -261,7 +261,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.linux-riscv64-musl.node') } else { - nativeBinding = require('@ast-grep/napi-linux-riscv64-musl') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-linux-riscv64-musl') } } catch (e) { loadError = e @@ -274,7 +274,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.linux-riscv64-gnu.node') } else { - nativeBinding = require('@ast-grep/napi-linux-riscv64-gnu') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-linux-riscv64-gnu') } } catch (e) { loadError = e @@ -289,7 +289,7 @@ switch (platform) { if (localFileExisted) { nativeBinding = require('./ast-grep-napi.linux-s390x-gnu.node') } else { - nativeBinding = require('@ast-grep/napi-linux-s390x-gnu') + nativeBinding = require('@codemod.com/ast-grep-napi-custom-languages-linux-s390x-gnu') } } catch (e) { loadError = e diff --git a/crates/napi/npm/darwin-arm64/package.json b/crates/napi/npm/darwin-arm64/package.json index 85f909571f..8d5ffda5ad 100644 --- a/crates/napi/npm/darwin-arm64/package.json +++ b/crates/napi/npm/darwin-arm64/package.json @@ -1,5 +1,5 @@ { - "name": "@ast-grep/napi-darwin-arm64", + "name": "@codemod.com/ast-grep-napi-darwin-arm64", "version": "0.32.2", "os": [ "darwin" diff --git a/crates/napi/npm/darwin-x64/package.json b/crates/napi/npm/darwin-x64/package.json index 6ee214d629..4319622af7 100644 --- a/crates/napi/npm/darwin-x64/package.json +++ b/crates/napi/npm/darwin-x64/package.json @@ -1,5 +1,5 @@ { - "name": "@ast-grep/napi-darwin-x64", + "name": "@codemod.com/ast-grep-napi-darwin-x64", "version": "0.32.2", "os": [ "darwin" diff --git a/crates/napi/npm/linux-arm64-gnu/package.json b/crates/napi/npm/linux-arm64-gnu/package.json index e0afafcc10..0b3aa68146 100644 --- a/crates/napi/npm/linux-arm64-gnu/package.json +++ b/crates/napi/npm/linux-arm64-gnu/package.json @@ -1,5 +1,5 @@ { - "name": "@ast-grep/napi-linux-arm64-gnu", + "name": "@codemod.com/ast-grep-napi-linux-arm64-gnu", "version": "0.32.2", "os": [ "linux" diff --git a/crates/napi/npm/linux-arm64-musl/package.json b/crates/napi/npm/linux-arm64-musl/package.json index 4f00c6cee3..1f6d730b03 100644 --- a/crates/napi/npm/linux-arm64-musl/package.json +++ b/crates/napi/npm/linux-arm64-musl/package.json @@ -1,5 +1,5 @@ { - "name": "@ast-grep/napi-linux-arm64-musl", + "name": "@codemod.com/ast-grep-napi-linux-arm64-musl", "version": "0.32.2", "os": [ "linux" diff --git a/crates/napi/npm/linux-x64-gnu/package.json b/crates/napi/npm/linux-x64-gnu/package.json index 94b6df20dc..fcdf147ff9 100644 --- a/crates/napi/npm/linux-x64-gnu/package.json +++ b/crates/napi/npm/linux-x64-gnu/package.json @@ -1,5 +1,5 @@ { - "name": "@ast-grep/napi-linux-x64-gnu", + "name": "@codemod.com/ast-grep-napi-linux-x64-gnu", "version": "0.32.2", "os": [ "linux" diff --git a/crates/napi/npm/linux-x64-musl/package.json b/crates/napi/npm/linux-x64-musl/package.json index 2817c2ba9e..34e980b606 100644 --- a/crates/napi/npm/linux-x64-musl/package.json +++ b/crates/napi/npm/linux-x64-musl/package.json @@ -1,5 +1,5 @@ { - "name": "@ast-grep/napi-linux-x64-musl", + "name": "@codemod.com/ast-grep-napi-linux-x64-musl", "version": "0.32.2", "os": [ "linux" diff --git a/crates/napi/npm/win32-arm64-msvc/package.json b/crates/napi/npm/win32-arm64-msvc/package.json index b908fe4d8d..c6a687ddb7 100644 --- a/crates/napi/npm/win32-arm64-msvc/package.json +++ b/crates/napi/npm/win32-arm64-msvc/package.json @@ -1,5 +1,5 @@ { - "name": "@ast-grep/napi-win32-arm64-msvc", + "name": "@codemod.com/ast-grep-napi-win32-arm64-msvc", "version": "0.32.2", "os": [ "win32" diff --git a/crates/napi/npm/win32-ia32-msvc/package.json b/crates/napi/npm/win32-ia32-msvc/package.json index 6efc9a1244..2870895c23 100644 --- a/crates/napi/npm/win32-ia32-msvc/package.json +++ b/crates/napi/npm/win32-ia32-msvc/package.json @@ -1,5 +1,5 @@ { - "name": "@ast-grep/napi-win32-ia32-msvc", + "name": "@codemod.com/ast-grep-napi-win32-ia32-msvc", "version": "0.32.2", "os": [ "win32" diff --git a/crates/napi/npm/win32-x64-msvc/package.json b/crates/napi/npm/win32-x64-msvc/package.json index 7359473e23..a323a4c22c 100644 --- a/crates/napi/npm/win32-x64-msvc/package.json +++ b/crates/napi/npm/win32-x64-msvc/package.json @@ -1,5 +1,5 @@ { - "name": "@ast-grep/napi-win32-x64-msvc", + "name": "@codemod.com/ast-grep-napi-win32-x64-msvc", "version": "0.32.2", "os": [ "win32" diff --git a/crates/napi/package.json b/crates/napi/package.json index 811d0844f6..87ccde4b5d 100644 --- a/crates/napi/package.json +++ b/crates/napi/package.json @@ -1,6 +1,6 @@ { "name": "@codemod.com/ast-grep-napi-custom-languages", - "version": "0.32.2", + "version": "0.32.3", "description": "Search and Rewrite code at large scale using precise AST pattern", "homepage": "https://ast-grep.github.io", "main": "index.js", diff --git a/crates/napi/scripts/constants.ts b/crates/napi/scripts/constants.ts index 05a560063e..c031de20f0 100644 --- a/crates/napi/scripts/constants.ts +++ b/crates/napi/scripts/constants.ts @@ -1,4 +1,4 @@ -import { Lang } from ".."; +import { Lang } from "../types/lang"; export const languageNodeTypesTagVersionOverrides: Partial< Record