Skip to content

Commit

Permalink
Create stand-alone PR to fix VSCode extension build (#4275)
Browse files Browse the repository at this point in the history
Summary:
This ports over a subset of the changes from [this PR](#4238) that just fix some build issues with the VSCode extension. This works to build the extension locally, which should in theory also work with the Github Action publish step, but I can't fully verify that since it requires the marketplace PAT to run. However, we **should not** do a publish after this PR merges because the current tagged version is 2.0.0 and we should wait for the other PR to land before we publish, especially since we're not going to publish 2.0.0 and instead are planning on publishing version 1.3.0.

Pull Request resolved: #4275

Reviewed By: josephsavona

Differential Revision: D45661618

Pulled By: captbaritone

fbshipit-source-id: 321f49060ea15608bbb85c85a68de52cdf37b97d
  • Loading branch information
ernieturner-cb authored and facebook-github-bot committed May 22, 2023
1 parent 39ebc1c commit 5dd6914
Show file tree
Hide file tree
Showing 9 changed files with 2,300 additions and 752 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-scripts
- name: ESLint
run: yarn run lint
run: yarn --ignore-engines run lint
- name: Prettier
run: yarn run prettier-check
run: yarn --ignore-engines run prettier-check
- name: Typecheck
run: yarn run typecheck
run: yarn --ignore-engines run typecheck

js-tests:
name: JS Tests (Node ${{ matrix.node-version }})
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-scripts
- name: ESLint
run: yarn run lint
run: yarn --ignore-engines run lint
- name: Prettier
run: yarn run prettier-check
run: yarn --ignore-engines run prettier-check
- name: Typecheck
run: yarn run typecheck
run: yarn --ignore-engines run typecheck
- name: Publish
run: yarn vsce publish --pat ${{ secrets.VSCE_PAT }}
run: yarn --ignore-engines vsce publish --pat ${{ secrets.VSCE_PAT }}
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
"test-dependencies": "node ./scripts/testDependencies.js",
"typecheck": "flow check"
},
"workspaces": [
"vscode-extension"
],
"dependencies": {
"@babel/core": "^7.18.6",
"@babel/generator": "^7.18.6",
Expand Down
2 changes: 2 additions & 0 deletions vscode-extension/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
out/**
**.vsix
7 changes: 7 additions & 0 deletions vscode-extension/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.vscode/**
src/**
.gitignore
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
14 changes: 9 additions & 5 deletions vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,11 @@
"typecheck": "tsc --noEmit",
"prettier-check": "prettier -c .",
"lint": "eslint --max-warnings 0 .",
"vscode:prepublish": "tsc",
"build-local": "vsce package"
"vscode:prepublish": "rm -f tsconfig.tsbuildinfo && rm -rf out && yarn run esbuild-base -- --minify",
"build-local": "vsce package",
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node",
"esbuild": "yarn run esbuild-base --sourcemap",
"esbuild-watch": "yarn run esbuild-base --sourcemap --watch"
},
"engines": {
"vscode": "^1.60.0"
Expand All @@ -131,12 +134,13 @@
"@types/vscode": "^1.60.0",
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.12.0",
"@vscode/vsce": "^2.18.0",
"esbuild": "^0.17.12",
"eslint": "^8.19.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"prettier": "^2.6.2",
"typescript": "^4.6.3",
"vsce": "^2.7.0"
"typescript": "^4.6.3"
}
}
2 changes: 1 addition & 1 deletion vscode-extension/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"lib": ["es2020"],
"outDir": "out",
"rootDir": "src",
"sourceMap": true,
"sourceMap": false,
"incremental": true,
"strict": true
},
Expand Down
Loading

0 comments on commit 5dd6914

Please sign in to comment.