From 5acd8428de950782ac2de41bb20ea06e4c24d273 Mon Sep 17 00:00:00 2001 From: "Matthew \"strager\" Glazar" Date: Thu, 5 Aug 2021 16:20:43 -0700 Subject: [PATCH] Rename VS Code plugin; prepare for new plugin I dislike the architecture of the existing VS Code plugin. I want to switch away from WebAssembly. Take a step toward deprecation by renaming the VS Code plugin to quick-lint-js-wasm and moving it into the plugin/vscode-wasm/ directory. Future commits will introduce a new plugin in plugin/vscode/. --- ...de.yml => build-and-test-plugin-vscode-wasm.yml} | 12 ++++++------ README.md | 2 +- docs/RELEASE.md | 4 ++-- plugin/{vscode => vscode-wasm}/.gitignore | 0 plugin/{vscode => vscode-wasm}/.vscode/launch.json | 0 plugin/{vscode => vscode-wasm}/.vscodeignore | 0 plugin/{vscode => vscode-wasm}/BUILDING.md | 6 +++--- plugin/{vscode => vscode-wasm}/LICENSE | 0 plugin/{vscode => vscode-wasm}/README.md | 0 plugin/{vscode => vscode-wasm}/demo.mp4 | Bin plugin/{vscode => vscode-wasm}/demo.png | Bin plugin/{vscode => vscode-wasm}/demo.webp | Bin plugin/{vscode => vscode-wasm}/extension.js | 0 plugin/{vscode => vscode-wasm}/package.json | 2 +- .../test/empty_test_workspace/.vscode/settings.json | 0 plugin/{vscode => vscode-wasm}/test/mock/vscode.js | 0 .../{vscode => vscode-wasm}/test/run-all-tests.js | 0 .../test/run-vscode-tests.js | 0 plugin/{vscode => vscode-wasm}/test/test-support.js | 0 plugin/{vscode => vscode-wasm}/test/vscode-tests.js | 2 +- plugin/{vscode => vscode-wasm}/yarn.lock | 0 website/public/vscode-demo.mp4 | 2 +- website/public/vscode-demo.png | 2 +- website/public/vscode-demo.webp | 2 +- 24 files changed, 17 insertions(+), 17 deletions(-) rename .github/workflows/{build-and-test-plugin-vscode.yml => build-and-test-plugin-vscode-wasm.yml} (93%) rename plugin/{vscode => vscode-wasm}/.gitignore (100%) rename plugin/{vscode => vscode-wasm}/.vscode/launch.json (100%) rename plugin/{vscode => vscode-wasm}/.vscodeignore (100%) rename plugin/{vscode => vscode-wasm}/BUILDING.md (83%) rename plugin/{vscode => vscode-wasm}/LICENSE (100%) rename plugin/{vscode => vscode-wasm}/README.md (100%) rename plugin/{vscode => vscode-wasm}/demo.mp4 (100%) rename plugin/{vscode => vscode-wasm}/demo.png (100%) rename plugin/{vscode => vscode-wasm}/demo.webp (100%) rename plugin/{vscode => vscode-wasm}/extension.js (100%) rename plugin/{vscode => vscode-wasm}/package.json (97%) rename plugin/{vscode => vscode-wasm}/test/empty_test_workspace/.vscode/settings.json (100%) rename plugin/{vscode => vscode-wasm}/test/mock/vscode.js (100%) rename plugin/{vscode => vscode-wasm}/test/run-all-tests.js (100%) rename plugin/{vscode => vscode-wasm}/test/run-vscode-tests.js (100%) rename plugin/{vscode => vscode-wasm}/test/test-support.js (100%) rename plugin/{vscode => vscode-wasm}/test/vscode-tests.js (99%) rename plugin/{vscode => vscode-wasm}/yarn.lock (100%) diff --git a/.github/workflows/build-and-test-plugin-vscode.yml b/.github/workflows/build-and-test-plugin-vscode-wasm.yml similarity index 93% rename from .github/workflows/build-and-test-plugin-vscode.yml rename to .github/workflows/build-and-test-plugin-vscode-wasm.yml index 1a6b45f514..12de4caf99 100644 --- a/.github/workflows/build-and-test-plugin-vscode.yml +++ b/.github/workflows/build-and-test-plugin-vscode-wasm.yml @@ -1,7 +1,7 @@ # Copyright (C) 2020 Matthew Glazar # See end of file for extended copyright information. -name: build and test VS Code extension +name: build and test VS Code extension (WASM) on: push: pull_request: @@ -91,7 +91,7 @@ jobs: run: emmake cmake --install build --component vscode --prefix wasm - name: JS configure - run: cd plugin/vscode && yarn + run: cd plugin/vscode-wasm && yarn - name: JS test run: | DISPLAY=:1 @@ -102,26 +102,26 @@ jobs: sleep 0.1 # Wait for Xvfb to start. printf 'Started Xvfb\n' >&2 - cd plugin/vscode + cd plugin/vscode-wasm yarn test kill %1 wait || : - name: create extension - run: cd plugin/vscode && ./node_modules/.bin/vsce package --baseImagesUrl https://raw.githubusercontent.com/quick-lint/quick-lint-js/master/plugin/vscode/ + run: cd plugin/vscode-wasm && ./node_modules/.bin/vsce package --baseImagesUrl https://raw.githubusercontent.com/quick-lint/quick-lint-js/master/plugin-wasm/vscode/ - name: upload build to workflow uses: actions/upload-artifact@v2 with: if-no-files-found: error name: plugin-vscode-${{ github.sha }} - path: plugin/vscode/*.vsix + path: plugin/vscode-wasm/*.vsix - name: upload build to long-term storage if: ${{ github.event_name == 'push' && github.repository_owner == 'quick-lint' != null }} uses: quick-lint/sftp-upload@master with: host: ${{ secrets.artifacts_host }} - local-file-globs: plugin/vscode/*.vsix + local-file-globs: plugin/vscode-wasm/*.vsix private-key: ${{ secrets.artifacts_key }} remote-directory: ${{ secrets.artifacts_root }}/builds/${{ github.sha }}/vscode/ user: ${{ secrets.artifacts_user }} diff --git a/README.md b/README.md index 82d93e44e7..f61621fffa 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ quick-lint-js finds many bugs, including: * Using `await` in a non-`async` function * Syntax errors -![Demonstration of quick-lint-js in Visual Studio Code](plugin/vscode/demo.webp) +![Demonstration of quick-lint-js in Visual Studio Code](plugin/vscode-wasm/demo.webp) ## Installing diff --git a/docs/RELEASE.md b/docs/RELEASE.md index a867215d34..73549dafdd 100644 --- a/docs/RELEASE.md +++ b/docs/RELEASE.md @@ -22,8 +22,8 @@ Follow the following steps to release a new version of quick-lint-js: * plugin/vim/quick-lint-js.vim/doc/quick-lint-js.txt * plugin/vscode-lsp/README.md * plugin/vscode-lsp/package.json - * plugin/vscode/BUILDING.md - * plugin/vscode/package.json + * plugin/vscode-wasm/BUILDING.md + * plugin/vscode-wasm/package.json * src/quick-lint-js/version.h * website/public/index.ejs.html * website/public/install/index.ejs.html diff --git a/plugin/vscode/.gitignore b/plugin/vscode-wasm/.gitignore similarity index 100% rename from plugin/vscode/.gitignore rename to plugin/vscode-wasm/.gitignore diff --git a/plugin/vscode/.vscode/launch.json b/plugin/vscode-wasm/.vscode/launch.json similarity index 100% rename from plugin/vscode/.vscode/launch.json rename to plugin/vscode-wasm/.vscode/launch.json diff --git a/plugin/vscode/.vscodeignore b/plugin/vscode-wasm/.vscodeignore similarity index 100% rename from plugin/vscode/.vscodeignore rename to plugin/vscode-wasm/.vscodeignore diff --git a/plugin/vscode/BUILDING.md b/plugin/vscode-wasm/BUILDING.md similarity index 83% rename from plugin/vscode/BUILDING.md rename to plugin/vscode-wasm/BUILDING.md index cc5469e1f2..f8bf8350e7 100644 --- a/plugin/vscode/BUILDING.md +++ b/plugin/vscode-wasm/BUILDING.md @@ -10,12 +10,12 @@ package](../../wasm/README.md#Building). Then, run the following command: - $ cd plugin/vscode/ # Navigate to this directory. + $ cd plugin/vscode-wasm/ # Navigate to this directory. $ yarn install --force -Finally, run the following command to create `quick-lint-js-0.3.0.vsix`: +Finally, run the following command to create `quick-lint-js-wasm-0.3.0.vsix`: - $ ./node_modules/.bin/vsce package --baseImagesUrl https://raw.githubusercontent.com/quick-lint/quick-lint-js/master/plugin/vscode/ + $ ./node_modules/.bin/vsce package --baseImagesUrl https://raw.githubusercontent.com/quick-lint/quick-lint-js/master/plugin/vscode-wasm/ ## Testing diff --git a/plugin/vscode/LICENSE b/plugin/vscode-wasm/LICENSE similarity index 100% rename from plugin/vscode/LICENSE rename to plugin/vscode-wasm/LICENSE diff --git a/plugin/vscode/README.md b/plugin/vscode-wasm/README.md similarity index 100% rename from plugin/vscode/README.md rename to plugin/vscode-wasm/README.md diff --git a/plugin/vscode/demo.mp4 b/plugin/vscode-wasm/demo.mp4 similarity index 100% rename from plugin/vscode/demo.mp4 rename to plugin/vscode-wasm/demo.mp4 diff --git a/plugin/vscode/demo.png b/plugin/vscode-wasm/demo.png similarity index 100% rename from plugin/vscode/demo.png rename to plugin/vscode-wasm/demo.png diff --git a/plugin/vscode/demo.webp b/plugin/vscode-wasm/demo.webp similarity index 100% rename from plugin/vscode/demo.webp rename to plugin/vscode-wasm/demo.webp diff --git a/plugin/vscode/extension.js b/plugin/vscode-wasm/extension.js similarity index 100% rename from plugin/vscode/extension.js rename to plugin/vscode-wasm/extension.js diff --git a/plugin/vscode/package.json b/plugin/vscode-wasm/package.json similarity index 97% rename from plugin/vscode/package.json rename to plugin/vscode-wasm/package.json index ebc0e8befb..5db3ae47fb 100644 --- a/plugin/vscode/package.json +++ b/plugin/vscode-wasm/package.json @@ -1,5 +1,5 @@ { - "name": "quick-lint-js", + "name": "quick-lint-js-wasm", "description": "Find JavaScript bugs with quick-lint-js", "publisher": "quick-lint", "version": "0.3.0", diff --git a/plugin/vscode/test/empty_test_workspace/.vscode/settings.json b/plugin/vscode-wasm/test/empty_test_workspace/.vscode/settings.json similarity index 100% rename from plugin/vscode/test/empty_test_workspace/.vscode/settings.json rename to plugin/vscode-wasm/test/empty_test_workspace/.vscode/settings.json diff --git a/plugin/vscode/test/mock/vscode.js b/plugin/vscode-wasm/test/mock/vscode.js similarity index 100% rename from plugin/vscode/test/mock/vscode.js rename to plugin/vscode-wasm/test/mock/vscode.js diff --git a/plugin/vscode/test/run-all-tests.js b/plugin/vscode-wasm/test/run-all-tests.js similarity index 100% rename from plugin/vscode/test/run-all-tests.js rename to plugin/vscode-wasm/test/run-all-tests.js diff --git a/plugin/vscode/test/run-vscode-tests.js b/plugin/vscode-wasm/test/run-vscode-tests.js similarity index 100% rename from plugin/vscode/test/run-vscode-tests.js rename to plugin/vscode-wasm/test/run-vscode-tests.js diff --git a/plugin/vscode/test/test-support.js b/plugin/vscode-wasm/test/test-support.js similarity index 100% rename from plugin/vscode/test/test-support.js rename to plugin/vscode-wasm/test/test-support.js diff --git a/plugin/vscode/test/vscode-tests.js b/plugin/vscode-wasm/test/vscode-tests.js similarity index 99% rename from plugin/vscode/test/vscode-tests.js rename to plugin/vscode-wasm/test/vscode-tests.js index 8fda9fdb35..ee5db87c79 100644 --- a/plugin/vscode/test/vscode-tests.js +++ b/plugin/vscode-wasm/test/vscode-tests.js @@ -475,7 +475,7 @@ async function pollAsync(callback) { async function runAsync() { // vscode-test activated the extension for us. We want tests to be activate and // deactivate the extension at will. - let extension = vscode.extensions.getExtension("quick-lint.quick-lint-js"); + let extension = vscode.extensions.getExtension("quick-lint.quick-lint-js-wasm"); await extension.activate(); await qljsExtension.deactivate(); diff --git a/plugin/vscode/yarn.lock b/plugin/vscode-wasm/yarn.lock similarity index 100% rename from plugin/vscode/yarn.lock rename to plugin/vscode-wasm/yarn.lock diff --git a/website/public/vscode-demo.mp4 b/website/public/vscode-demo.mp4 index 5e61532e2d..6c66793e0b 120000 --- a/website/public/vscode-demo.mp4 +++ b/website/public/vscode-demo.mp4 @@ -1 +1 @@ -../../plugin/vscode/demo.mp4 \ No newline at end of file +../../plugin/vscode-wasm/demo.mp4 \ No newline at end of file diff --git a/website/public/vscode-demo.png b/website/public/vscode-demo.png index 993b5293b4..9a018641df 120000 --- a/website/public/vscode-demo.png +++ b/website/public/vscode-demo.png @@ -1 +1 @@ -../../plugin/vscode/demo.png \ No newline at end of file +../../plugin/vscode-wasm/demo.png \ No newline at end of file diff --git a/website/public/vscode-demo.webp b/website/public/vscode-demo.webp index 91de7c493e..819e9aaf10 120000 --- a/website/public/vscode-demo.webp +++ b/website/public/vscode-demo.webp @@ -1 +1 @@ -../../plugin/vscode/demo.webp \ No newline at end of file +../../plugin/vscode-wasm/demo.webp \ No newline at end of file