Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
with:
version: 8

- name: Prepare dependent packages
run: bash scripts/prepare.sh

- name: Install dependencies
run: pnpm install

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
with:
version: 8

- name: Prepare dependent packages
run: bash scripts/prepare.sh

- name: Install Dependencies
run: pnpm install

Expand Down
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.pluto/
dist/
node_modules/
*.d.ts
*.d.ts
components/deducers/python-pyright/libs/
28 changes: 28 additions & 0 deletions components/deducers/python-pyright/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest"
},
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/no-explicit-any": "off"
},
"ignorePatterns": ["*.js", "*.d.ts", "node_modules/", "coverage", "libs"],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"node": {},
"typescript": {
"project": "./tsconfig.dev.json",
"alwaysTryTypes": true
}
}
}
}
2 changes: 2 additions & 0 deletions components/deducers/python-pyright/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/dist/
libs/pyright-internal/
Binary file not shown.
37 changes: 37 additions & 0 deletions components/deducers/python-pyright/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "@plutolang/pyright-deducer",
"version": "0.0.0",
"repository": {
"type": "git",
"url": "git+https://github.com/pluto-lang/pluto.git",
"directory": "components/deducers/pyright"
},
"author": "plutolang",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "bash scripts/prepare-pyright-pkg.sh && tsc",
"watch": "npm run build -- --watch",
"test": "vitest run --coverage --passWithNoTests",
"test:watch": "vitest --coverage --passWithNoTests",
"lint": "eslint .",
"clean": "tsc --build --clean"
},
"dependencies": {
"@plutolang/base": "workspace:^",
"pyright-internal": "file:libs/pyright-internal"
},
"devDependencies": {
"typescript": "^5.2.2",
"@types/node": "^17.0.45",
"@vitest/coverage-v8": "^0.34.6",
"vite": "4",
"vitest": "^0.34.6"
},
"bundleDependencies": [
"pyright-internal"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
if [ ! -d "libs/pyright-internal" ]; then
tar -xvf libs/pyright-internal-1.1.352.tgz -C libs/
mv libs/package libs/pyright-internal
fi
9 changes: 9 additions & 0 deletions components/deducers/python-pyright/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { TestWalker } from "pyright-internal/dist/analyzer/testWalker";

export default class PyrightDeducer {
public async deduce(filePath: string) {
filePath;
const walker = new TestWalker();
walker.visitNode({} as any);
}
}
23 changes: 23 additions & 0 deletions components/deducers/python-pyright/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"strict": true,
"outDir": "dist",
"target": "es2022",
"module": "commonjs",
"lib": ["es2022"],
"moduleResolution": "node",
"declaration": true,
"resolveJsonModule": true,
"sourceMap": true,
"stripInternal": true,
"experimentalDecorators": true,
"pretty": true,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true,
"types": ["node"]
},
"include": ["src"],
"exclude": ["node_modules", "libs", "**/*.test.ts"]
}
Loading