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
24 changes: 24 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier"
],
"plugins": ["@typescript-eslint", "prettier"],
"rules": {
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off",
"prettier/prettier": "warn"
},
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
}
98 changes: 98 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Build
on:
push:
branches:
- main
workflow_dispatch:
pull_request:
branches:
- main

jobs:
build:
name: test (${{ matrix.os }}, node-${{ matrix.node }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node: [18.x]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.config.node }}
- name: Use Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Restore CLI Binaries
uses: actions/cache/restore@v3
with:
path: test-resources/cli-releases
key: ${{ runner.os }}-cli-context-${{ hashFiles('src/test/cliContext.json') }}
- name: Restore `directories.data` folder (CLI)
uses: actions/cache/restore@v3
with:
path: test-resources/envs/cli
key: ${{ runner.os }}-cli-env-${{ hashFiles('src/test/envs.cli.json') }}
- name: Restore `directories.data` folder (Git)
uses: actions/cache/restore@v3
with:
path: test-resources/envs/git
key: ${{ runner.os }}-git-env-${{ hashFiles('src/test/envs.git.json') }}
- name: Install Dependencies
run: npm ci
- name: Check Format
run: npm run format && git diff --exit-code
- name: Test
uses: coactions/setup-xvfb@v1
with:
run: npm run test-all
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Store CLI Binaries
uses: actions/cache/save@v3
with:
path: test-resources/cli-releases
key: ${{ runner.os }}-cli-context-${{ hashFiles('src/test/cliContext.json') }}
- name: Store `directories.data` folder (CLI)
uses: actions/cache/save@v3
with:
path: test-resources/envs/cli
key: ${{ runner.os }}-cli-env-${{ hashFiles('src/test/envs.cli.json') }}
- name: Store `directories.data` folder (Git)
uses: actions/cache/save@v3
with:
path: test-resources/envs/git
key: ${{ runner.os }}-git-env-${{ hashFiles('src/test/envs.git.json') }}

release:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- name: Release
id: release
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
outputs:
release_version: ${{ steps.release.outputs.release_version }}
19 changes: 19 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Taken from stephenh/ts-proto. Thank you!
# https://github.com/stephenh/ts-proto/blob/1f73bad91fe33c497d5168b9f0847ad596ffec39/.github/workflows/pr-title.yml
name: PR Title

on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131 changes: 4 additions & 127 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,130 +1,7 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
node_modules
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
*.vsix
# binary releases of the Arduino CLI for testing and the `directories.data` folder for the tests
test-resources
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
out
dist
.vscode-test
test-resources
15 changes: 15 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"singleQuote": true,
"tabWidth": 2,
"useTabs": false,
"printWidth": 80,
"endOfLine": "auto",
"overrides": [
{
"files": "*.json",
"options": {
"tabWidth": 2
}
}
]
}
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"amodio.tsl-problem-matcher",
"streetsidesoftware.code-spell-checker"
]
}
50 changes: 50 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"env": {
"NO_TEST_TIMEOUT": "true",
"TEST_DEBUG": "espExceptionDecoder*"
},
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "tasks: watch-tests"
},
{
"name": "Extension Tests (Slow)",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"env": {
"CLI_TEST_CONTEXT": "slow",
"NO_TEST_TIMEOUT": "true",
"TEST_DEBUG": "espExceptionDecoder*"
},
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "tasks: watch-tests"
}
]
}
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"files.exclude": {
"out": false,
"dist": false
},
"search.exclude": {
"out": true,
"dist": true
},
"typescript.tsc.autoDetect": "off",
"typescript.tsdk": "./node_modules/typescript/lib",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
Loading