Skip to content

Commit

Permalink
Merge branch 'main' into feat/linear-checker
Browse files Browse the repository at this point in the history
  • Loading branch information
luckasRanarison committed Nov 27, 2024
2 parents ca74ed8 + 9671d60 commit e58a0e6
Show file tree
Hide file tree
Showing 743 changed files with 9,396 additions and 11,725 deletions.
672 changes: 245 additions & 427 deletions .ghjk/lock.json

Large diffs are not rendered by default.

46 changes: 0 additions & 46 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -289,52 +289,6 @@ jobs:
docker buildx imagetools create --tag ${{ env.REGISTRY_IMAGE }}:${{ steps.latest-tag.outputs.tag }} --tag ${{ env.REGISTRY_IMAGE }}:latest $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:latest
pub-vscode-extension:
needs:
- check-bump
if: |
always()
&& (
needs.check-bump.result == 'success'
|| github.event_name == 'workflow_dispatch'
)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: WyriHaximus/[email protected]
id: latest-tag
- uses: metatypedev/setup-ghjk@318209a9d215f70716a4ac89dbeb9653a2deb8bc
- shell: bash
run: |
cd src/meta-lsp
pnpm install --frozen-lockfile
cd ts-language-server
pnpm install --frozen-lockfile
cd ../vscode-metatype-support
pnpm install --frozen-lockfile
cd ..
pnpm compile:ts-server
pnpm compile:vscode
pnpm vscode:package
# avoid publishing pre-release versions as they don't
# support it
if [[ "$(ghjk x version-print)" != *-* ]]; then
if [ ${{ github.event_name == 'workflow_dispatch' && inputs.ovewriteArtifacts }} == 'true' ]; then
pnpm run vscode:publish -p ${{ secrets.AZURE_DEVOPS_TOKEN }} --skip-duplicate
else
pnpm run vscode:publish -p ${{ secrets.AZURE_DEVOPS_TOKEN }}
fi
fi
- uses: svenstaro/upload-release-action@v2
with:
tag: ${{ steps.latest-tag.outputs.tag }}
file: "src/meta-lsp/*.vsix"
file_glob: true
overwrite: ${{ inputs.ovewriteArtifacts }}

bump:
needs:
- pub-meta-cli
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ jobs:
ghjk x install-ts
ghjk x install-website
ghjk x install-lsp
ghjk x fetch-deno
# pre-resolve everything to disable resolutions
Expand Down Expand Up @@ -320,20 +319,3 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.lcov
fail_ci_if_error: true

test-lsp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: metatypedev/setup-ghjk@318209a9d215f70716a4ac89dbeb9653a2deb8bc
- shell: bash
run: |
ghjk x install-lsp
ghjk x test-lsp
# node --test --import=tsx --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=coverage.lcov tests/*.test.ts
# - uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: ./meta-lsp/ts-language-server/coverage.lcov
# fail_ci_if_error: true
82 changes: 25 additions & 57 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,35 @@ repos:
- id: deno-fmt
name: Deno format
language: system
entry: bash -c 'cd typegate && deno fmt --ignore=native,src/typegraphs,tmp,tests/e2e/nextjs,tests/metagen/typegraphs/sample/ts/client.ts && cd ../dev && deno fmt && cd ../typegraph/deno && deno fmt --ignore=node_modules,dist && cd ../../libs/metagen/src && deno fmt'
entry: bash -c 'deno fmt'
pass_filenames: false
types:
- javascript
- ts
files: ^(typegate|dev|typegraph/deno)/
- tsx
- json
- yaml
- id: deno-lint
name: Deno lint
language: system
entry: bash -c 'cd typegate && deno lint --rules-exclude=no-explicit-any --ignore=native,tmp,tests/e2e/nextjs && cd ../dev && deno lint && cd ../libs/metagen/src/ && deno lint'
entry: bash -c 'deno lint && ghjk x lint-deno'
pass_filenames: false
types:
- javascript
- ts
files: ^(typegate|dev)/
- tsx
- json
- yaml
files: ^(src/typegate|tools)/
- id: es-lint
name: Eslint website
language: system
entry: bash -c 'cd website && [ -f node_modules/.bin/eslint ] && pnpm lint && pnpm prettier'
entry: bash -c 'cd ./docs/metatype.dev/ && [ -f node_modules/.bin/eslint ] && pnpm lint && pnpm prettier'
pass_filenames: false
types_or:
- ts
- tsx
files: ^website/
exclude: ^website/typegraphs/
- id: devtools-lint
name: ESLint meta-lsp
language: system
entry: bash -c 'cd meta-lsp && pnpm lint'
pass_filenames: false
types:
- ts
files: ^meta-lsp/
files: ^docs/metatype.dev
#- id: cargo-udeps
# name: Check for unused cargo dependencies
# language: system
Expand Down Expand Up @@ -87,9 +85,9 @@ repos:
.*deno.lock|
CHANGELOG.md|
.*\.snap$|
typegate/src/typegraphs/.*\.json|
website/docs/reference/|
libs/pyrt_wit_wire/pyrt|
src/typegate/src/typegraphs/.*\.json|
docs/metatype.dev/reference/|
src/pyrt_wit_wire/pyrt|
migration_lock.toml|
tests/metagen/typegraphs/sample/[rs|ts|py]/client\.[rs|ts|py]
)
Expand All @@ -100,66 +98,36 @@ repos:
name: "License MPL-2.0 python"
args:
#- --remove-header
- --license-filepath=dev/license-header-MPL-2.0.txt
- --license-filepath=tools/license-header-MPL-2.0.txt
- "--comment-style=#"
- "--skip-license-insertion-comment=no-auto-license-header"
types_or:
- python
files: ^typegraph/
- id: insert-license
name: "License Elastic-2.0 rust"
args:
#- --remove-header
- --license-filepath=dev/license-header-Elastic-2.0.txt
- "--comment-style=//"
- "--skip-license-insertion-comment=no-auto-license-header"
- "--skip-license-insertion-comment=@generated"
types_or:
- rust
files: ^(typegate|libs!(/metagen/.*))/
- python
exclude: ^examples/|src/metagen/src/.*/static/.*
- id: insert-license
name: "License MPL-2.0 rust"
args:
#- --remove-header
- --license-filepath=dev/license-header-MPL-2.0.txt
- --license-filepath=tools/license-header-MPL-2.0.txt
- "--comment-style=//"
- "--skip-license-insertion-comment=no-auto-license-header"
- "--skip-license-insertion-comment=@generated"
types_or:
- rust
files: ^(meta-cli|typegraph|libs/metagen)/
exclude: ^examples/|src/metagen/src/.*/static/.*
- id: insert-license
name: "License Elastic-2.0 deno"
name: "License MPL-2.0 typescript"
args:
#- --remove-header
- --license-filepath=dev/license-header-Elastic-2.0.txt
- --license-filepath=tools/license-header-MPL-2.0.txt
- "--comment-style=//"
- "--skip-license-insertion-comment=no-auto-license-header"
- "--skip-license-insertion-comment=@generated"
types_or:
- ts
files: ^(typegate|dev)/
- id: insert-license
name: "License MPL-2.0 deno"
args:
#- --remove-header
- --license-filepath=dev/license-header-MPL-2.0.txt
- "--comment-style=//"
- "--skip-license-insertion-comment=no-auto-license-header"
types_or:
- ts
files: ^typegraph/
- id: insert-license
name: "License Elastic-2.0 typescript"
args:
#- --remove-header
- --license-filepath=dev/license-header-Elastic-2.0.txt
- "--comment-style=//"
- "--skip-license-insertion-comment=no-auto-license-header"
types_or:
- ts
- tsx
files: ^website/
exclude: website/typegraphs
exclude: ^examples/|src/metagen/src/.*/static/.*
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.6
hooks:
Expand Down
34 changes: 17 additions & 17 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"recommendations": [
"charliermarsh.ruff",
"rust-lang.rust-analyzer",
"ms-python.black-formatter",
"denoland.vscode-deno",
"ms-vscode-remote.remote-containers",
"dbaeumer.vscode-eslint",
"graphql.vscode-graphql-syntax",
"unifiedjs.vscode-mdx",
"ms-python.vscode-pylance",
"ms-python.python",
"chrischinchilla.vale-vscode",
"hediet.vscode-drawio",
"davidlday.languagetool-linter",
"dtsvet.vscode-wasm",
"bierner.comment-tagged-templates"
]
"recommendations": [
"charliermarsh.ruff",
"rust-lang.rust-analyzer",
"ms-python.black-formatter",
"denoland.vscode-deno",
"ms-vscode-remote.remote-containers",
"dbaeumer.vscode-eslint",
"graphql.vscode-graphql-syntax",
"unifiedjs.vscode-mdx",
"ms-python.vscode-pylance",
"ms-python.python",
"chrischinchilla.vale-vscode",
"hediet.vscode-drawio",
"davidlday.languagetool-linter",
"dtsvet.vscode-wasm",
"bierner.comment-tagged-templates"
]
}
64 changes: 32 additions & 32 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.2.0",
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Client",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}/meta-lsp"
],
"outFiles": [
"${workspaceRoot}/meta-lsp/vscode-metatype-support/out/**/*.js"
],
"preLaunchTask": "vscode-ext:build"
},
{
"name": "Language Server E2E Test",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/client/out/test/index",
"${workspaceRoot}/client/testFixture"
],
"outFiles": [
"${workspaceRoot}/client/out/test/**/*.js"
]
}
]
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.2.0",
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Client",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}/meta-lsp"
],
"outFiles": [
"${workspaceRoot}/meta-lsp/vscode-metatype-support/out/**/*.js"
],
"preLaunchTask": "vscode-ext:build"
},
{
"name": "Language Server E2E Test",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/client/out/test/index",
"${workspaceRoot}/client/testFixture"
],
"outFiles": [
"${workspaceRoot}/client/out/test/**/*.js"
]
}
]
}
Loading

0 comments on commit e58a0e6

Please sign in to comment.