Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Switch to esbuild. Closes #14. #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 22, 2022
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
32 changes: 26 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,25 @@ on:
- push
- pull_request_target
jobs:
ci:
name: CI
# Ensure that the distributables compile with esbuild (since tests use tsc)
build:
name: Build Distributables
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v3
with:
node-version: 14.x
cache: yarn
- name: Compile extension
run: |
yarn install --frozen-lockfile
yarn compile
# Run tests (including a special build of extension w/ tsc, not esbuild)
test:
name: Run Tests
strategy:
matrix:
os:
Expand All @@ -28,12 +45,12 @@ jobs:
with:
bundler-cache: true
ruby-version: ${{ matrix.ruby }}
- name: Install gem
- name: Install Gem
run: gem install syntax_tree
- name: Compile extension
- name: Compile Tests
run: |
yarn install --frozen-lockfile
yarn compile
yarn test-compile
- name: Setup GUI Environment
run: |
sudo apt-get install -yq dbus-x11 ffmpeg > /dev/null
Expand Down Expand Up @@ -100,9 +117,12 @@ jobs:
start-stop-daemon --stop --pidfile ~/var/run/Xvfb.pid
kill $DBUS_SESSION_BUS_PID
if: always() && runner.os == 'Linux'
# Merge green PRs automatically if they come from repository owner or Dependabot
automerge:
name: AutoMerge
needs: ci
needs:
- build
- test
runs-on: ubuntu-latest
if: github.event_name == 'pull_request_target' && (github.actor == github.repository_owner || github.actor == 'dependabot[bot]')
steps:
Expand Down
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"connor4312.esbuild-problem-matchers"
],
"unwantedRecommendations": []
}
57 changes: 29 additions & 28 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,33 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [

{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Run Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
}
]
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/extension.js"
],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Run Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "test-watch"
}
]
}
46 changes: 30 additions & 16 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$esbuild-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "test-watch",
"type": "npm",
"script": "test-watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": false
}
}
]
}
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"bugs": {
"url": "https://github.com/ruby-syntax-tree/vscode-syntax-tree/issues"
},
"packageManager": "yarn@1.22.19",
"engines": {
"vscode": "^1.68.0"
},
Expand Down Expand Up @@ -94,12 +95,16 @@
"colors": []
},
"scripts": {
"compile": "tsc -p ./",
"clean": "rm -rf ./out",
"compile": "yarn run esbuild-base --sourcemap",
"esbuild-base": "esbuild --bundle --external:vscode --external:vscode-languageclient --format=cjs --outfile=out/extension.js --platform=node src/extension.ts",
"package": "vsce package --no-yarn --githubBranch main",
"publish": "vsce publish --no-yarn --githubBranch main",
"test": "node ./out/test/runTest.js",
"vscode:prepublish": "yarn compile",
"watch": "tsc --watch -p ./"
"test-compile": "tsc -p ./",
"test-watch": "tsc --watch -p ./",
"vscode:prepublish": "yarn run esbuild-base -- --minify",
"watch": "yarn run esbuild-base --sourcemap --watch"
},
"dependencies": {
"vscode-languageclient": "8.0.2"
Expand All @@ -110,6 +115,7 @@
"@types/node": "^18.0.0",
"@types/vscode": "^1.68.0",
"@vscode/test-electron": "^1.6.2",
"esbuild": "^0.14.49",
"glob": "^8.0.3",
"mocha": "^10.0.0",
"typescript": "^4.7.4",
Expand Down
126 changes: 126 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,132 @@ entities@~2.1.0:
resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5"
integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==

esbuild-android-64@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.49.tgz#9e4682c36dcf6e7b71b73d2a3723a96e0fdc5054"
integrity sha512-vYsdOTD+yi+kquhBiFWl3tyxnj2qZJsl4tAqwhT90ktUdnyTizgle7TjNx6Ar1bN7wcwWqZ9QInfdk2WVagSww==

esbuild-android-arm64@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.49.tgz#9861b1f7e57d1dd1f23eeef6198561c5f34b51f6"
integrity sha512-g2HGr/hjOXCgSsvQZ1nK4nW/ei8JUx04Li74qub9qWrStlysaVmadRyTVuW32FGIpLQyc5sUjjZopj49eGGM2g==

esbuild-darwin-64@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.49.tgz#fd30a5ebe28704a3a117126c60f98096c067c8d1"
integrity sha512-3rvqnBCtX9ywso5fCHixt2GBCUsogNp9DjGmvbBohh31Ces34BVzFltMSxJpacNki96+WIcX5s/vum+ckXiLYg==

esbuild-darwin-arm64@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.49.tgz#c04a3a57dad94a972c66a697a68a25aa25947f41"
integrity sha512-XMaqDxO846srnGlUSJnwbijV29MTKUATmOLyQSfswbK/2X5Uv28M9tTLUJcKKxzoo9lnkYPsx2o8EJcTYwCs/A==

esbuild-freebsd-64@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.49.tgz#c404dbd66c98451395b1eef0fa38b73030a7be82"
integrity sha512-NJ5Q6AjV879mOHFri+5lZLTp5XsO2hQ+KSJYLbfY9DgCu8s6/Zl2prWXVANYTeCDLlrIlNNYw8y34xqyLDKOmQ==

esbuild-freebsd-arm64@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.49.tgz#b62cec96138ebc5937240ce3e1b97902963ea74a"
integrity sha512-lFLtgXnAc3eXYqj5koPlBZvEbBSOSUbWO3gyY/0+4lBdRqELyz4bAuamHvmvHW5swJYL7kngzIZw6kdu25KGOA==

esbuild-linux-32@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.49.tgz#495b1cc011b8c64d8bbaf65509c1e7135eb9ddbf"
integrity sha512-zTTH4gr2Kb8u4QcOpTDVn7Z8q7QEIvFl/+vHrI3cF6XOJS7iEI1FWslTo3uofB2+mn6sIJEQD9PrNZKoAAMDiA==

esbuild-linux-64@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.49.tgz#3f28dd8f986e6ff42f38888ee435a9b1fb916a56"
integrity sha512-hYmzRIDzFfLrB5c1SknkxzM8LdEUOusp6M2TnuQZJLRtxTgyPnZZVtyMeCLki0wKgYPXkFsAVhi8vzo2mBNeTg==

esbuild-linux-arm64@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.49.tgz#a52e99ae30246566dc5f33e835aa6ca98ef70e33"
integrity sha512-KLQ+WpeuY+7bxukxLz5VgkAAVQxUv67Ft4DmHIPIW+2w3ObBPQhqNoeQUHxopoW/aiOn3m99NSmSV+bs4BSsdA==

esbuild-linux-arm@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.49.tgz#7c33d05a64ec540cf7474834adaa57b3167bbe97"
integrity sha512-iE3e+ZVv1Qz1Sy0gifIsarJMQ89Rpm9mtLSRtG3AH0FPgAzQ5Z5oU6vYzhc/3gSPi2UxdCOfRhw2onXuFw/0lg==

esbuild-linux-mips64le@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.49.tgz#ed062bd844b587be649443831eb84ba304685f25"
integrity sha512-n+rGODfm8RSum5pFIqFQVQpYBw+AztL8s6o9kfx7tjfK0yIGF6tm5HlG6aRjodiiKkH2xAiIM+U4xtQVZYU4rA==

esbuild-linux-ppc64le@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.49.tgz#c0786fb5bddffd90c10a2078181513cbaf077958"
integrity sha512-WP9zR4HX6iCBmMFH+XHHng2LmdoIeUmBpL4aL2TR8ruzXyT4dWrJ5BSbT8iNo6THN8lod6GOmYDLq/dgZLalGw==

esbuild-linux-riscv64@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.49.tgz#579b0e7cc6fce4bfc698e991a52503bb616bec49"
integrity sha512-h66ORBz+Dg+1KgLvzTVQEA1LX4XBd1SK0Fgbhhw4akpG/YkN8pS6OzYI/7SGENiN6ao5hETRDSkVcvU9NRtkMQ==

esbuild-linux-s390x@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.49.tgz#09eb15c753e249a500b4e28d07c5eef7524a9740"
integrity sha512-DhrUoFVWD+XmKO1y7e4kNCqQHPs6twz6VV6Uezl/XHYGzM60rBewBF5jlZjG0nCk5W/Xy6y1xWeopkrhFFM0sQ==

esbuild-netbsd-64@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.49.tgz#f7337cd2bddb7cc9d100d19156f36c9ca117b58d"
integrity sha512-BXaUwFOfCy2T+hABtiPUIpWjAeWK9P8O41gR4Pg73hpzoygVGnj0nI3YK4SJhe52ELgtdgWP/ckIkbn2XaTxjQ==

esbuild-openbsd-64@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.49.tgz#1f8bdc49f8a44396e73950a3fb6b39828563631d"
integrity sha512-lP06UQeLDGmVPw9Rg437Btu6J9/BmyhdoefnQ4gDEJTtJvKtQaUcOQrhjTq455ouZN4EHFH1h28WOJVANK41kA==

esbuild-sunos-64@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.49.tgz#47d042739365b61aa8ca642adb69534a8eef9f7a"
integrity sha512-4c8Zowp+V3zIWje329BeLbGh6XI9c/rqARNaj5yPHdC61pHI9UNdDxT3rePPJeWcEZVKjkiAS6AP6kiITp7FSw==

esbuild-windows-32@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.49.tgz#79198c88ec9bde163c18a6b430c34eab098ec21a"
integrity sha512-q7Rb+J9yHTeKr9QTPDYkqfkEj8/kcKz9lOabDuvEXpXuIcosWCJgo5Z7h/L4r7rbtTH4a8U2FGKb6s1eeOHmJA==

esbuild-windows-64@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.49.tgz#b36b230d18d1ee54008e08814c4799c7806e8c79"
integrity sha512-+Cme7Ongv0UIUTniPqfTX6mJ8Deo7VXw9xN0yJEN1lQMHDppTNmKwAM3oGbD/Vqff+07K2gN0WfNkMohmG+dVw==

esbuild-windows-arm64@0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.49.tgz#d83c03ff6436caf3262347cfa7e16b0a8049fae7"
integrity sha512-v+HYNAXzuANrCbbLFJ5nmO3m5y2PGZWLe3uloAkLt87aXiO2mZr3BTmacZdjwNkNEHuH3bNtN8cak+mzVjVPfA==

esbuild@^0.14.49:
version "0.14.49"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.49.tgz#b82834760eba2ddc17b44f05cfcc0aaca2bae492"
integrity sha512-/TlVHhOaq7Yz8N1OJrjqM3Auzo5wjvHFLk+T8pIue+fhnhIMpfAzsG6PLVMbFveVxqD2WOp3QHei+52IMUNmCw==
optionalDependencies:
esbuild-android-64 "0.14.49"
esbuild-android-arm64 "0.14.49"
esbuild-darwin-64 "0.14.49"
esbuild-darwin-arm64 "0.14.49"
esbuild-freebsd-64 "0.14.49"
esbuild-freebsd-arm64 "0.14.49"
esbuild-linux-32 "0.14.49"
esbuild-linux-64 "0.14.49"
esbuild-linux-arm "0.14.49"
esbuild-linux-arm64 "0.14.49"
esbuild-linux-mips64le "0.14.49"
esbuild-linux-ppc64le "0.14.49"
esbuild-linux-riscv64 "0.14.49"
esbuild-linux-s390x "0.14.49"
esbuild-netbsd-64 "0.14.49"
esbuild-openbsd-64 "0.14.49"
esbuild-sunos-64 "0.14.49"
esbuild-windows-32 "0.14.49"
esbuild-windows-64 "0.14.49"
esbuild-windows-arm64 "0.14.49"

escalade@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
Expand Down