From 959f1120a76c5f3a8747c9fc8a1bd7855a5e92fe Mon Sep 17 00:00:00 2001 From: Kien Hoang Date: Wed, 23 Jul 2025 22:18:37 +0700 Subject: [PATCH 1/6] Fix issues with parsing 3.11 Python syntaxes --- packages/pyright-scip/src/treeVisitor.ts | 26 ++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/packages/pyright-scip/src/treeVisitor.ts b/packages/pyright-scip/src/treeVisitor.ts index 69115d90e..987245661 100644 --- a/packages/pyright-scip/src/treeVisitor.ts +++ b/packages/pyright-scip/src/treeVisitor.ts @@ -377,7 +377,10 @@ export class TreeVisitor extends ParseTreeWalker { continue; } - let decl = parentMethodType.details.declaration!; + let decl = parentMethodType.details.declaration; + if (!decl || !decl.node) { + continue; + } let symbol = this.typeToSymbol(decl.node.name, decl.node, parentMethodType); relationshipMap.set( symbol.value, @@ -1055,6 +1058,9 @@ export class TreeVisitor extends ParseTreeWalker { if (moduleName === 'builtins') { return Symbols.makeModule(this.stdlibPackage, 'builtins'); } else { + if (!pythonPackage) { + return ScipSymbol.local(this.counter.next()); + } return Symbols.makeModule(pythonPackage, moduleName); } } @@ -1128,7 +1134,10 @@ export class TreeVisitor extends ParseTreeWalker { const bound = typeVar.details.boundType! as ClassType; return this.getSymbolOnce(node, () => { - const pythonPackage = this.getPackageInfo(node, bound.details.moduleName)!; + const pythonPackage = this.getPackageInfo(node, bound.details.moduleName); + if (!pythonPackage) { + return ScipSymbol.local(this.counter.next()); + } let symbol = Symbols.makeTerm( Symbols.makeType( Symbols.makeModule(pythonPackage, bound.details.moduleName), @@ -1340,10 +1349,16 @@ export class TreeVisitor extends ParseTreeWalker { return ScipSymbol.local(this.counter.next()); } else { + if (!pythonPackage) { + return ScipSymbol.local(this.counter.next()); + } return Symbols.makeMethod(Symbols.makeModule(pythonPackage, typeObj.details.moduleName), node.value); } } else if (Types.isClass(typeObj)) { - const pythonPackage = this.getPackageInfo(node, typeObj.details.moduleName)!; + const pythonPackage = this.getPackageInfo(node, typeObj.details.moduleName); + if (!pythonPackage) { + return ScipSymbol.local(this.counter.next()); + } return Symbols.makeClass(pythonPackage, typeObj.details.moduleName, node.value); } else if (Types.isClassInstance(typeObj)) { typeObj = typeObj as ClassType; @@ -1352,7 +1367,10 @@ export class TreeVisitor extends ParseTreeWalker { } else if (Types.isTypeVar(typeObj)) { throw 'typevar'; } else if (Types.isModule(typeObj)) { - const pythonPackage = this.getPackageInfo(node, typeObj.moduleName)!; + const pythonPackage = this.getPackageInfo(node, typeObj.moduleName); + if (!pythonPackage) { + return ScipSymbol.local(this.counter.next()); + } return Symbols.makeModuleInit(pythonPackage, typeObj.moduleName); } else if (Types.isOverloadedFunction(typeObj)) { if (!typeObj.overloads) { From 42898f81bf6218191b6007812eef09a180912c4f Mon Sep 17 00:00:00 2001 From: Kien Hoang Date: Wed, 23 Jul 2025 22:41:25 +0700 Subject: [PATCH 2/6] Update package.json to publish to npm --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e4b4890ce..4d34d5a07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "pyright-root", - "private": true, + "name": "@kdetail/scip-python", + "version": "1.0.0", "scripts": { "postinstall": "npm run bootstrap", "bootstrap": "node ./build/skipBootstrap.js || lerna bootstrap", From 64e48fe2e072adf9d653532a35f76c14610c7fed Mon Sep 17 00:00:00 2001 From: Kien Hoang Date: Wed, 23 Jul 2025 23:27:25 +0700 Subject: [PATCH 3/6] Update --- package-lock.json | 9 +- package.json | 12 +- package/LICENSE.txt | 22 +++ package/README.md | 146 ++++++++++++++++++++ package/package.json | 51 +++++++ package/packages/pyright-scip/index.js | 8 ++ packages/pyright-internal/package-lock.json | 1 + packages/pyright/package-lock.json | 1 + packages/vscode-pyright/package-lock.json | 1 + 9 files changed, 247 insertions(+), 4 deletions(-) create mode 100644 package/LICENSE.txt create mode 100644 package/README.md create mode 100644 package/package.json create mode 100644 package/packages/pyright-scip/index.js diff --git a/package-lock.json b/package-lock.json index 3ce3be376..e81e78ee0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,16 @@ { - "name": "pyright-root", + "name": "@kdetail/scip-python", + "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "pyright-root", + "name": "@kdetail/scip-python", + "version": "1.0.0", "hasInstallScript": true, + "bin": { + "scip-python": "packages/pyright-scip/dist/scip-python.js" + }, "devDependencies": { "@types/glob": "^7.2.0", "@types/node": "^17.0.45", diff --git a/package.json b/package.json index 4d34d5a07..39f60aa7d 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,16 @@ { "name": "@kdetail/scip-python", - "version": "1.0.0", + "version": "1.0.2", + "main": "packages/pyright-scip/index.js", + "bin": { + "scip-python": "./packages/pyright-scip/index.js" + }, + "files": [ + "packages/pyright-scip/index.js", + "packages/pyright-scip/dist/" + ], "scripts": { - "postinstall": "npm run bootstrap", + "prepack": "cd packages/pyright-scip && npm run build", "bootstrap": "node ./build/skipBootstrap.js || lerna bootstrap", "clean": "lerna run --no-bail --stream clean", "install:all": "npm install && lerna exec --no-bail npm install", diff --git a/package/LICENSE.txt b/package/LICENSE.txt new file mode 100644 index 000000000..cb01ff546 --- /dev/null +++ b/package/LICENSE.txt @@ -0,0 +1,22 @@ +MIT License + +Pyright - A static type checker for the Python language +Copyright (c) Microsoft Corporation. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE diff --git a/package/README.md b/package/README.md new file mode 100644 index 000000000..eaea187d0 --- /dev/null +++ b/package/README.md @@ -0,0 +1,146 @@ +# scip-python + +Sourcegraph fork of [pyright](https://github.com/microsoft/pyright) focused on generating [SCIP](https://github.com/sourcegraph/scip) for python projects. + +Project is primarily an addition to Pyright. At this time, there are no substantial changes to the `pyright` library. + +## Pre-requisites + +``` +$ # Install scip-python +$ npm install -g @sourcegraph/scip-python +``` + +scip-python requires Node v16 or newer. See the [Dockerfile](https://github.com/sourcegraph/scip-python/blob/scip/Dockerfile.autoindex) for an exact SHA that is tested. + +scip-python uses `pip` to attempt to determine the versions and names of the packages available in your environment. If you do not use pip to install the packages, you can instead use the `--environment` flag to supply a list of packages to use as the environment. This will skip any calls out to pip to determine the state of your env. See [Environment](##-environment) for more information. + + +## Usage + +``` +$ npm install @sourcegraph/scip-python + +$ # NOTE: make sure to activate your virtual environment before running +$ scip-python index . --project-name=$MY_PROJECT + +$ # Make sure to point towards the sourcegraph instance you're interested in uploading to. +$ # more information at https://github.com/sourcegraph/src-cli +$ src code-intel upload +``` + +If you hit an out-of-memory error, increase the memory limit using the environment variable `NODE_OPTIONS="--max-old-space-size=8192"` to increase the heap size limit to 8GB (or higher, if needed). + +### target-only + +To run scip-python over only a particular directory, you can use the `--target-only` flag. Example: + +``` +$ scip-python index . --project-name=$MY_PROJECT --target-only=src/subdir +``` + +### project-namespace + +Additionally, if your project is loaded with some prefix, you can use the `--project-namespace` to put a namespace before all the generated symbols for this project. + +``` +$ scip-python index . --project-name=$MY_PROJECT --project-namespace=implicit.namespace +``` + +Now all symbols will have `implicit.namespace` prepended to their symbol, so that you can use it for cross repository navigation, even if the directory structure in your current project does not explicitly show `implicit/namespace/myproject/__init__.py`. + +## Environment + +The environment file format is a JSON list of `PythonPackage`s. The `PythonPackage` has the following form: + +```json +{ + "name": "PyYAML", + "version": "6.0", + "files": [ + "PyYAML-6.0.dist-info/INSTALLER", + ... + "yaml/__init__.py", + "yaml/composer.py", + "yaml/tokens.py", + ... + ] +}, +``` + +Where: +- `name`: + - The name of the package. Often times this is the same as the module, but is not always the case. + - For example, `PyYAML` is the name of the package, but the module is `yaml` (i.e. `import yaml`). +- `version`: + - The vesion of the package. This is used to generate stable references to external packages. +- `files`: + - A list of all the files that are a member of this package. + - Some packages declare multiple modules, so these should all be included. + +The environment file should be a list of these packages: + +```json +[ + { "name": "PyYAML", "version": "6.0", "files": [...] }, + { "name": "pytorch", "version": "3.0", "files": [..] }, + ... +] +``` + +To use the environment file, you should call scip-python like so: + +``` +$ scip-python index --project-name=$MY_PROJECT --environment=path/to/env.json +``` + +If you're just using pip, this should not be required. We should calculate this from the pip environment. If you experience any bugs, please report them. The goal is that we support standard pip installation without additional configuration. If there is other python tooling that can generate this information, you can file an issue and we'll see if we can support it as well. + +## Sourcegraph Example Configuration + +Using the usage example above may be quite simple to add a CI pipeline (perhaps using the `sourcegraph/scip-python:autoindex`) image +and uploading the corresponding index.scip file to Sourcegraph only for commits that you are intersted in (whether that's only HEAD +or every branch). + +However, if you're interested in using the Auto-Indexing feature, an example configuration skeleton can be found below: + +``` +{ + "index_jobs": [ + { + "indexer": "sourcegraph/scip-python:autoindex", + "local_steps": [ + "pip install . || true", + ], + "indexer_args": [ + "scip-python", "index", ".", + "--project-name", "", + "--project-version", "_" + ], + "steps": [], + "outfile": "", + "root": "" + } + ], + "shared_steps": [] +} +``` + +## To compare upstream from pyright + +You can go to the following [Sourcegraph +link](https://sourcegraph.com/github.com/sourcegraph/scip-python/-/compare/pyright-mirror...scip) +to compare the changes we've made from pyright. + +The changes are almost exclusively in the folder `packages/pyright-scip/` and various `package.json` files +due to adding some additional dependencies. + +In general, we've tried to make very little changes to anything inside of the pyright packages. +The only changes that are inside there at this point are: +- Not bail out of indexing if it's taking a long time +- Not throw away indexed files if memory usage gets high +- Allow parsing of some additional files + +## Contributing + +See [pyright-scip/CONTRIBUTING.md](./packages/pyright-scip/CONTRIBUTING.md). diff --git a/package/package.json b/package/package.json new file mode 100644 index 000000000..eacc038ab --- /dev/null +++ b/package/package.json @@ -0,0 +1,51 @@ +{ + "name": "@kdetail/scip-python", + "version": "1.0.1", + "main": "packages/pyright-scip/index.js", + "bin": { + "scip-python": "./packages/pyright-scip/index.js" + }, + "files": [ + "packages/pyright-scip/index.js", + "packages/pyright-scip/dist/" + ], + "scripts": { + "prepack": "cd packages/pyright-scip && npm run build", + "postinstall": "npm run bootstrap", + "bootstrap": "node ./build/skipBootstrap.js || lerna bootstrap", + "clean": "lerna run --no-bail --stream clean", + "install:all": "npm install && lerna exec --no-bail npm install", + "update:all": "node ./build/updateDeps.js", + "build:extension:dev": "cd packages/vscode-pyright && npm run webpack", + "build:cli:dev": "cd packages/pyright && npm run webpack", + "watch:extension": "cd packages/vscode-pyright && npm run webpack-dev", + "check": "npm run check:syncpack && npm run check:eslint && npm run check:prettier && npm run check:lockindent", + "check:syncpack": "syncpack list-mismatches", + "fix:syncpack": "syncpack fix-mismatches --indent \" \" && npm run install:all", + "check:eslint": "eslint .", + "fix:eslint": "eslint --fix .", + "check:prettier": "prettier -c .", + "fix:prettier": "prettier --write .", + "check:lockindent": "node ./build/checkLockIndent.js" + }, + "devDependencies": { + "@types/glob": "^7.2.0", + "@types/node": "^17.0.45", + "@types/yargs": "^16.0.5", + "@typescript-eslint/eslint-plugin": "^5.54.0", + "@typescript-eslint/parser": "^5.54.0", + "detect-indent": "^6.1.0", + "eslint": "^8.35.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-simple-import-sort": "^7.0.0", + "glob": "^7.2.3", + "jsonc-parser": "^3.2.0", + "lerna": "^6.5.1", + "npm-check-updates": "^16.7.10", + "p-queue": "^6.6.2", + "prettier": "2.8.4", + "syncpack": "^9.8.4", + "typescript": "~4.4.4", + "yargs": "^16.2.0" + } +} diff --git a/package/packages/pyright-scip/index.js b/package/packages/pyright-scip/index.js new file mode 100644 index 000000000..995ef7289 --- /dev/null +++ b/package/packages/pyright-scip/index.js @@ -0,0 +1,8 @@ +#!/usr/bin/env node +/* eslint-disable @typescript-eslint/ban-ts-comment */ +// @ts-nocheck + +// Stash the base directory into a global variable. +global.__rootDirectory = __dirname + '/dist/'; + +require('./dist/scip-python'); diff --git a/packages/pyright-internal/package-lock.json b/packages/pyright-internal/package-lock.json index 2ea1038bf..40486c21b 100644 --- a/packages/pyright-internal/package-lock.json +++ b/packages/pyright-internal/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "pyright-internal", "version": "1.1.301", "license": "MIT", "dependencies": { diff --git a/packages/pyright/package-lock.json b/packages/pyright/package-lock.json index 4092c0c2c..83e166a82 100644 --- a/packages/pyright/package-lock.json +++ b/packages/pyright/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "pyright", "version": "1.1.301", "license": "MIT", "bin": { diff --git a/packages/vscode-pyright/package-lock.json b/packages/vscode-pyright/package-lock.json index 7cfdc584d..e5798cd78 100644 --- a/packages/vscode-pyright/package-lock.json +++ b/packages/vscode-pyright/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "vscode-pyright", "version": "1.1.301", "license": "MIT", "dependencies": { From 302f760853d533967cd938bccae4bd2aab8cc093 Mon Sep 17 00:00:00 2001 From: Kien Hoang Date: Wed, 23 Jul 2025 23:28:22 +0700 Subject: [PATCH 4/6] Update --- package/LICENSE.txt | 22 --- package/README.md | 146 -------------------- package/package.json | 51 ------- package/packages/pyright-scip/index.js | 8 -- packages/pyright-internal/package-lock.json | 1 - packages/pyright/package-lock.json | 1 - packages/vscode-pyright/package-lock.json | 1 - 7 files changed, 230 deletions(-) delete mode 100644 package/LICENSE.txt delete mode 100644 package/README.md delete mode 100644 package/package.json delete mode 100644 package/packages/pyright-scip/index.js diff --git a/package/LICENSE.txt b/package/LICENSE.txt deleted file mode 100644 index cb01ff546..000000000 --- a/package/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Pyright - A static type checker for the Python language -Copyright (c) Microsoft Corporation. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE diff --git a/package/README.md b/package/README.md deleted file mode 100644 index eaea187d0..000000000 --- a/package/README.md +++ /dev/null @@ -1,146 +0,0 @@ -# scip-python - -Sourcegraph fork of [pyright](https://github.com/microsoft/pyright) focused on generating [SCIP](https://github.com/sourcegraph/scip) for python projects. - -Project is primarily an addition to Pyright. At this time, there are no substantial changes to the `pyright` library. - -## Pre-requisites - -``` -$ # Install scip-python -$ npm install -g @sourcegraph/scip-python -``` - -scip-python requires Node v16 or newer. See the [Dockerfile](https://github.com/sourcegraph/scip-python/blob/scip/Dockerfile.autoindex) for an exact SHA that is tested. - -scip-python uses `pip` to attempt to determine the versions and names of the packages available in your environment. If you do not use pip to install the packages, you can instead use the `--environment` flag to supply a list of packages to use as the environment. This will skip any calls out to pip to determine the state of your env. See [Environment](##-environment) for more information. - - -## Usage - -``` -$ npm install @sourcegraph/scip-python - -$ # NOTE: make sure to activate your virtual environment before running -$ scip-python index . --project-name=$MY_PROJECT - -$ # Make sure to point towards the sourcegraph instance you're interested in uploading to. -$ # more information at https://github.com/sourcegraph/src-cli -$ src code-intel upload -``` - -If you hit an out-of-memory error, increase the memory limit using the environment variable `NODE_OPTIONS="--max-old-space-size=8192"` to increase the heap size limit to 8GB (or higher, if needed). - -### target-only - -To run scip-python over only a particular directory, you can use the `--target-only` flag. Example: - -``` -$ scip-python index . --project-name=$MY_PROJECT --target-only=src/subdir -``` - -### project-namespace - -Additionally, if your project is loaded with some prefix, you can use the `--project-namespace` to put a namespace before all the generated symbols for this project. - -``` -$ scip-python index . --project-name=$MY_PROJECT --project-namespace=implicit.namespace -``` - -Now all symbols will have `implicit.namespace` prepended to their symbol, so that you can use it for cross repository navigation, even if the directory structure in your current project does not explicitly show `implicit/namespace/myproject/__init__.py`. - -## Environment - -The environment file format is a JSON list of `PythonPackage`s. The `PythonPackage` has the following form: - -```json -{ - "name": "PyYAML", - "version": "6.0", - "files": [ - "PyYAML-6.0.dist-info/INSTALLER", - ... - "yaml/__init__.py", - "yaml/composer.py", - "yaml/tokens.py", - ... - ] -}, -``` - -Where: -- `name`: - - The name of the package. Often times this is the same as the module, but is not always the case. - - For example, `PyYAML` is the name of the package, but the module is `yaml` (i.e. `import yaml`). -- `version`: - - The vesion of the package. This is used to generate stable references to external packages. -- `files`: - - A list of all the files that are a member of this package. - - Some packages declare multiple modules, so these should all be included. - -The environment file should be a list of these packages: - -```json -[ - { "name": "PyYAML", "version": "6.0", "files": [...] }, - { "name": "pytorch", "version": "3.0", "files": [..] }, - ... -] -``` - -To use the environment file, you should call scip-python like so: - -``` -$ scip-python index --project-name=$MY_PROJECT --environment=path/to/env.json -``` - -If you're just using pip, this should not be required. We should calculate this from the pip environment. If you experience any bugs, please report them. The goal is that we support standard pip installation without additional configuration. If there is other python tooling that can generate this information, you can file an issue and we'll see if we can support it as well. - -## Sourcegraph Example Configuration - -Using the usage example above may be quite simple to add a CI pipeline (perhaps using the `sourcegraph/scip-python:autoindex`) image -and uploading the corresponding index.scip file to Sourcegraph only for commits that you are intersted in (whether that's only HEAD -or every branch). - -However, if you're interested in using the Auto-Indexing feature, an example configuration skeleton can be found below: - -``` -{ - "index_jobs": [ - { - "indexer": "sourcegraph/scip-python:autoindex", - "local_steps": [ - "pip install . || true", - ], - "indexer_args": [ - "scip-python", "index", ".", - "--project-name", "", - "--project-version", "_" - ], - "steps": [], - "outfile": "", - "root": "" - } - ], - "shared_steps": [] -} -``` - -## To compare upstream from pyright - -You can go to the following [Sourcegraph -link](https://sourcegraph.com/github.com/sourcegraph/scip-python/-/compare/pyright-mirror...scip) -to compare the changes we've made from pyright. - -The changes are almost exclusively in the folder `packages/pyright-scip/` and various `package.json` files -due to adding some additional dependencies. - -In general, we've tried to make very little changes to anything inside of the pyright packages. -The only changes that are inside there at this point are: -- Not bail out of indexing if it's taking a long time -- Not throw away indexed files if memory usage gets high -- Allow parsing of some additional files - -## Contributing - -See [pyright-scip/CONTRIBUTING.md](./packages/pyright-scip/CONTRIBUTING.md). diff --git a/package/package.json b/package/package.json deleted file mode 100644 index eacc038ab..000000000 --- a/package/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "@kdetail/scip-python", - "version": "1.0.1", - "main": "packages/pyright-scip/index.js", - "bin": { - "scip-python": "./packages/pyright-scip/index.js" - }, - "files": [ - "packages/pyright-scip/index.js", - "packages/pyright-scip/dist/" - ], - "scripts": { - "prepack": "cd packages/pyright-scip && npm run build", - "postinstall": "npm run bootstrap", - "bootstrap": "node ./build/skipBootstrap.js || lerna bootstrap", - "clean": "lerna run --no-bail --stream clean", - "install:all": "npm install && lerna exec --no-bail npm install", - "update:all": "node ./build/updateDeps.js", - "build:extension:dev": "cd packages/vscode-pyright && npm run webpack", - "build:cli:dev": "cd packages/pyright && npm run webpack", - "watch:extension": "cd packages/vscode-pyright && npm run webpack-dev", - "check": "npm run check:syncpack && npm run check:eslint && npm run check:prettier && npm run check:lockindent", - "check:syncpack": "syncpack list-mismatches", - "fix:syncpack": "syncpack fix-mismatches --indent \" \" && npm run install:all", - "check:eslint": "eslint .", - "fix:eslint": "eslint --fix .", - "check:prettier": "prettier -c .", - "fix:prettier": "prettier --write .", - "check:lockindent": "node ./build/checkLockIndent.js" - }, - "devDependencies": { - "@types/glob": "^7.2.0", - "@types/node": "^17.0.45", - "@types/yargs": "^16.0.5", - "@typescript-eslint/eslint-plugin": "^5.54.0", - "@typescript-eslint/parser": "^5.54.0", - "detect-indent": "^6.1.0", - "eslint": "^8.35.0", - "eslint-config-prettier": "^8.6.0", - "eslint-plugin-simple-import-sort": "^7.0.0", - "glob": "^7.2.3", - "jsonc-parser": "^3.2.0", - "lerna": "^6.5.1", - "npm-check-updates": "^16.7.10", - "p-queue": "^6.6.2", - "prettier": "2.8.4", - "syncpack": "^9.8.4", - "typescript": "~4.4.4", - "yargs": "^16.2.0" - } -} diff --git a/package/packages/pyright-scip/index.js b/package/packages/pyright-scip/index.js deleted file mode 100644 index 995ef7289..000000000 --- a/package/packages/pyright-scip/index.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node -/* eslint-disable @typescript-eslint/ban-ts-comment */ -// @ts-nocheck - -// Stash the base directory into a global variable. -global.__rootDirectory = __dirname + '/dist/'; - -require('./dist/scip-python'); diff --git a/packages/pyright-internal/package-lock.json b/packages/pyright-internal/package-lock.json index 40486c21b..2ea1038bf 100644 --- a/packages/pyright-internal/package-lock.json +++ b/packages/pyright-internal/package-lock.json @@ -5,7 +5,6 @@ "requires": true, "packages": { "": { - "name": "pyright-internal", "version": "1.1.301", "license": "MIT", "dependencies": { diff --git a/packages/pyright/package-lock.json b/packages/pyright/package-lock.json index 83e166a82..4092c0c2c 100644 --- a/packages/pyright/package-lock.json +++ b/packages/pyright/package-lock.json @@ -5,7 +5,6 @@ "requires": true, "packages": { "": { - "name": "pyright", "version": "1.1.301", "license": "MIT", "bin": { diff --git a/packages/vscode-pyright/package-lock.json b/packages/vscode-pyright/package-lock.json index e5798cd78..7cfdc584d 100644 --- a/packages/vscode-pyright/package-lock.json +++ b/packages/vscode-pyright/package-lock.json @@ -5,7 +5,6 @@ "requires": true, "packages": { "": { - "name": "vscode-pyright", "version": "1.1.301", "license": "MIT", "dependencies": { From ffafae98f92ef22e1f62ac50a78ad6ade8c30a6d Mon Sep 17 00:00:00 2001 From: Kien Hoang Date: Thu, 24 Jul 2025 00:19:42 +0700 Subject: [PATCH 5/6] Update --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 39f60aa7d..c198983a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@kdetail/scip-python", - "version": "1.0.2", + "name": "@detail-dev/scip-python", + "version": "1.0.0", "main": "packages/pyright-scip/index.js", "bin": { "scip-python": "./packages/pyright-scip/index.js" From a56343c24938ef729e91a83926c616093eba21e2 Mon Sep 17 00:00:00 2001 From: kdetail Date: Thu, 24 Jul 2025 00:20:42 +0700 Subject: [PATCH 6/6] Update package-lock.json --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index e81e78ee0..6ea2053d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@kdetail/scip-python", + "name": "@detail-dev/scip-python", "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "@kdetail/scip-python", + "name": "@detail-dev/scip-python", "version": "1.0.0", "hasInstallScript": true, "bin": {