Skip to content

Commit da39a2a

Browse files
authored
Convert repo into a lerna monorepo, add a validation workflow (#978)
1 parent eb71cdd commit da39a2a

File tree

1,639 files changed

+16178
-5723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,639 files changed

+16178
-5723
lines changed

.eslintrc.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"plugin:@typescript-eslint/recommended"
66
],
77
"env": {
8-
"browser": true
8+
"node": true
99
},
1010
"parser": "@typescript-eslint/parser",
1111
"parserOptions": {
@@ -22,7 +22,19 @@
2222
"no-constant-condition": 0,
2323
"no-inner-declarations": 0,
2424
"no-undef": 0,
25-
"simple-import-sort/sort": "error",
25+
"simple-import-sort/sort": [
26+
"error",
27+
{
28+
"groups": [
29+
// Defaults from simple-import-sort, but with local packages between third-party and relative imports.
30+
["^\\u0000"],
31+
["^@?\\w"],
32+
["^[^.]"],
33+
["^pyright"],
34+
["^\\."]
35+
]
36+
}
37+
],
2638
"@typescript-eslint/explicit-function-return-type": 0,
2739
"@typescript-eslint/explicit-module-boundary-types": 0,
2840
"@typescript-eslint/ban-types": 0,

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.json linguist-language=JSON-with-Comments

.github/workflows/codeql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
- name: Initialize CodeQL
2929
uses: github/codeql-action/init@v1
3030

31+
3132
# Override language selection by uncommenting this and choosing your languages
3233
# with:
3334
# languages: go, javascript, csharp, python, cpp, java

.github/workflows/validation.yml

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
name: 'Validation'
2+
3+
env:
4+
NODE_VERSION: '12' # Shipped with VS Code.
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
- main
11+
pull_request:
12+
branches:
13+
- master
14+
- main
15+
16+
jobs:
17+
typecheck:
18+
if: github.repository == 'microsoft/pyright'
19+
runs-on: ubuntu-18.04
20+
name: Typecheck
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
25+
- uses: actions/setup-node@v2-beta
26+
with:
27+
node-version: ${{ env.NODE_VERSION }}
28+
29+
- name: Get npm cache directory
30+
id: npm-cache
31+
run: |
32+
echo "::set-output name=dir::$(npm config get cache)"
33+
- uses: actions/cache@v2
34+
with:
35+
path: ${{ steps.npm-cache.outputs.dir }}
36+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
37+
restore-keys: |
38+
${{ runner.os }}-node-
39+
40+
- run: npm install
41+
42+
- run: npx lerna exec --stream --no-bail -- tsc --noEmit
43+
44+
style:
45+
if: github.repository == 'microsoft/pyright'
46+
runs-on: ubuntu-18.04
47+
name: Style
48+
49+
steps:
50+
- uses: actions/checkout@v2
51+
52+
- uses: actions/setup-node@v2-beta
53+
with:
54+
node-version: ${{ env.NODE_VERSION }}
55+
56+
- name: Get npm cache directory
57+
id: npm-cache
58+
run: |
59+
echo "::set-output name=dir::$(npm config get cache)"
60+
- uses: actions/cache@v2
61+
with:
62+
path: ${{ steps.npm-cache.outputs.dir }}
63+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
64+
restore-keys: |
65+
${{ runner.os }}-node-
66+
67+
- run: npm install
68+
69+
- name: Check diff after npm install
70+
run: git diff --exit-code --name-only
71+
72+
- run: npm run check
73+
74+
test:
75+
strategy:
76+
fail-fast: false
77+
matrix:
78+
os: [macos-10.15, windows-2019, ubuntu-18.04]
79+
80+
name: Test ${{ matrix.os }}
81+
runs-on: ${{ matrix.os }}
82+
needs: typecheck
83+
84+
steps:
85+
- uses: actions/checkout@v2
86+
87+
- uses: actions/setup-node@v2-beta
88+
with:
89+
node-version: ${{ env.NODE_VERSION }}
90+
91+
- name: Get npm cache directory
92+
id: npm-cache
93+
run: |
94+
echo "::set-output name=dir::$(npm config get cache)"
95+
- uses: actions/cache@v2
96+
with:
97+
path: ${{ steps.npm-cache.outputs.dir }}
98+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
99+
restore-keys: |
100+
${{ runner.os }}-node-
101+
102+
- run: npm install
103+
104+
- name: npm test (pyright-internal)
105+
run: npm test
106+
working-directory: packages/pyright-internal
107+
108+
build:
109+
runs-on: ubuntu-18.04
110+
name: Build
111+
needs: typecheck
112+
113+
steps:
114+
- uses: actions/checkout@v2
115+
116+
- uses: actions/setup-node@v2-beta
117+
with:
118+
node-version: ${{ env.NODE_VERSION }}
119+
120+
- name: Get npm cache directory
121+
id: npm-cache
122+
run: |
123+
echo "::set-output name=dir::$(npm config get cache)"
124+
- uses: actions/cache@v2
125+
with:
126+
path: ${{ steps.npm-cache.outputs.dir }}
127+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
128+
restore-keys: |
129+
${{ runner.os }}-node-
130+
131+
- run: npm install
132+
133+
- run: npm publish --dry-run
134+
working-directory: packages/pyright
135+
136+
- run: npm run package
137+
working-directory: packages/vscode-pyright
138+
139+
required:
140+
runs-on: ubuntu-18.04
141+
name: Required
142+
needs:
143+
- typecheck
144+
- style
145+
- test
146+
- build
147+
148+
steps:
149+
- run: echo All required jobs succeeded.

.gitignore

Lines changed: 110 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,119 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
140
# Dependency directories
2-
node_modules
41+
node_modules/
42+
jspm_packages/
43+
44+
# Snowpack dependency directory (https://snowpack.dev/)
45+
web_modules/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
349

450
# Optional npm cache directory
551
.npm
652

7-
# vs cache directory
8-
.vs
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
964

10-
# Output files
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
75+
# parcel-bundler cache (https://parceljs.org/)
76+
.cache
77+
.parcel-cache
78+
79+
# Next.js build output
80+
.next
81+
out
82+
83+
# Nuxt.js build / generate output
84+
.nuxt
1185
dist
12-
server/out/
13-
client/out/
14-
client/server/
15-
client/*.vsix
1686

87+
# Gatsby files
88+
.cache/
89+
# Comment in the public line in if your project uses Gatsby and not Next.js
90+
# https://nextjs.org/blog/next-9-1#public-directory-support
91+
# public
92+
93+
# vuepress build output
94+
.vuepress/dist
95+
96+
# Serverless directories
97+
.serverless/
98+
99+
# FuseBox cache
100+
.fusebox/
101+
102+
# DynamoDB Local files
103+
.dynamodb/
104+
105+
# TernJS port file
106+
.tern-port
107+
108+
# Stores VSCode versions used for testing VSCode extensions
109+
.vscode-test
110+
111+
# yarn v2
112+
.yarn/cache
113+
.yarn/unplugged
114+
.yarn/build-state.yml
115+
.yarn/install-state.gz
116+
.pnp.*
117+
118+
*.vsix
17119
junit.xml
18-
coverage/

.npmignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

.prettierignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
*.json
2-
*.md
1+
**/package-lock.json
32
**/dist/**
43
**/out/**
5-
**/client/server/**
64
**/typeshed-fallback/**
7-
**/.github/**
5+
6+
*.json
7+
*.md
8+
**/.github/ISSUE_TEMPLATE/**

0 commit comments

Comments
 (0)