Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ember-tooling/tree-sitter-glimmer
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0
Choose a base ref
...
head repository: ember-tooling/tree-sitter-glimmer
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Sep 25, 2021

  1. Copy the full SHA
    ab9061a View commit details
  2. chore: release v1.0.1

    alexlafroscia committed Sep 25, 2021
    Copy the full SHA
    1d69226 View commit details
  3. Copy the full SHA
    a19d309 View commit details

Commits on Oct 5, 2021

  1. chore(deps-dev): bump lint-staged from 11.1.2 to 11.2.0

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 11.1.2 to 11.2.0.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v11.1.2...v11.2.0)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Oct 5, 2021
    Copy the full SHA
    3fa9c12 View commit details
  2. Copy the full SHA
    b72a297 View commit details

Commits on Oct 11, 2021

  1. chore(deps-dev): bump lint-staged from 11.2.0 to 11.2.3

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 11.2.0 to 11.2.3.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v11.2.0...v11.2.3)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Oct 11, 2021
    Copy the full SHA
    3ae5ead View commit details
  2. Copy the full SHA
    70aa399 View commit details

Commits on Oct 21, 2021

  1. chore(deps-dev): bump husky from 7.0.2 to 7.0.4

    Bumps [husky](https://github.com/typicode/husky) from 7.0.2 to 7.0.4.
    - [Release notes](https://github.com/typicode/husky/releases)
    - [Commits](typicode/husky@v7.0.2...v7.0.4)
    
    ---
    updated-dependencies:
    - dependency-name: husky
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Oct 21, 2021
    Copy the full SHA
    23b3a52 View commit details
  2. Copy the full SHA
    78bc70b View commit details

Commits on Oct 25, 2021

  1. chore(deps-dev): bump lint-staged from 11.2.3 to 11.2.4

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 11.2.3 to 11.2.4.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v11.2.3...v11.2.4)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Oct 25, 2021
    Copy the full SHA
    5cbbf45 View commit details
  2. Copy the full SHA
    e35d30e View commit details

Commits on Oct 27, 2021

  1. chore(deps-dev): bump lint-staged from 11.2.4 to 11.2.6

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 11.2.4 to 11.2.6.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v11.2.4...v11.2.6)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Oct 27, 2021
    Copy the full SHA
    682f01a View commit details
  2. Copy the full SHA
    dd39c2e View commit details

Commits on Nov 6, 2021

  1. Copy the full SHA
    ac8b168 View commit details

Commits on Nov 22, 2021

  1. chore(deps-dev): bump tree-sitter-cli from 0.20.0 to 0.20.1

    Bumps [tree-sitter-cli](https://github.com/tree-sitter/tree-sitter) from 0.20.0 to 0.20.1.
    - [Release notes](https://github.com/tree-sitter/tree-sitter/releases)
    - [Commits](tree-sitter/tree-sitter@v0.20.0...v0.20.1)
    
    ---
    updated-dependencies:
    - dependency-name: tree-sitter-cli
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Nov 22, 2021
    Copy the full SHA
    c47dbb8 View commit details
  2. Copy the full SHA
    2623e2a View commit details

Commits on Nov 26, 2021

  1. chore(deps-dev): bump prettier from 2.4.1 to 2.5.0

    Bumps [prettier](https://github.com/prettier/prettier) from 2.4.1 to 2.5.0.
    - [Release notes](https://github.com/prettier/prettier/releases)
    - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
    - [Commits](prettier/prettier@2.4.1...2.5.0)
    
    ---
    updated-dependencies:
    - dependency-name: prettier
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Nov 26, 2021
    Copy the full SHA
    ce42997 View commit details
  2. Copy the full SHA
    fd8fb1d View commit details
  3. chore(deps-dev): bump lint-staged from 11.2.6 to 12.1.2

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 11.2.6 to 12.1.2.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v11.2.6...v12.1.2)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Nov 26, 2021
    Copy the full SHA
    f66b012 View commit details

Commits on Nov 29, 2021

  1. Merge pull request #50 from alexlafroscia/dependabot/npm_and_yarn/lin…

    …t-staged-12.1.2
    
    chore(deps-dev): bump lint-staged from 11.2.6 to 12.1.2
    alexlafroscia authored Nov 29, 2021
    Copy the full SHA
    86d82d1 View commit details

Commits on Dec 6, 2021

  1. chore(deps-dev): bump prettier from 2.5.0 to 2.5.1

    Bumps [prettier](https://github.com/prettier/prettier) from 2.5.0 to 2.5.1.
    - [Release notes](https://github.com/prettier/prettier/releases)
    - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
    - [Commits](prettier/prettier@2.5.0...2.5.1)
    
    ---
    updated-dependencies:
    - dependency-name: prettier
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Dec 6, 2021
    Copy the full SHA
    16734d6 View commit details
  2. Copy the full SHA
    2dd4ab7 View commit details

Commits on Dec 20, 2021

  1. chore(deps-dev): bump lint-staged from 12.1.2 to 12.1.3

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.1.2 to 12.1.3.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v12.1.2...v12.1.3)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Dec 20, 2021
    Copy the full SHA
    7c63b36 View commit details
  2. Copy the full SHA
    429c946 View commit details

Commits on Dec 24, 2021

  1. chore(deps-dev): bump lint-staged from 12.1.3 to 12.1.4

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.1.3 to 12.1.4.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v12.1.3...v12.1.4)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Dec 24, 2021
    Copy the full SHA
    9015c76 View commit details
  2. Copy the full SHA
    7b29275 View commit details

Commits on Jan 3, 2022

  1. chore(deps-dev): bump lint-staged from 12.1.4 to 12.1.5

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.1.4 to 12.1.5.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v12.1.4...v12.1.5)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 3, 2022
    Copy the full SHA
    ec43098 View commit details
  2. Copy the full SHA
    1286ac8 View commit details

Commits on Jan 7, 2022

  1. chore(deps-dev): bump lint-staged from 12.1.5 to 12.1.6

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.1.5 to 12.1.6.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v12.1.5...v12.1.6)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 7, 2022
    Copy the full SHA
    4ebd549 View commit details
  2. Copy the full SHA
    4c93fd8 View commit details

Commits on Jan 10, 2022

  1. chore(deps-dev): bump lint-staged from 12.1.6 to 12.1.7

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.1.6 to 12.1.7.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v12.1.6...v12.1.7)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 10, 2022
    Copy the full SHA
    6d12a74 View commit details
  2. Copy the full SHA
    2c7a335 View commit details

Commits on Jan 19, 2022

  1. chore(deps-dev): bump lint-staged from 12.1.7 to 12.2.0

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.1.7 to 12.2.0.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v12.1.7...v12.2.0)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 19, 2022
    Copy the full SHA
    2b4d00c View commit details
  2. Copy the full SHA
    25dcc63 View commit details

Commits on Jan 20, 2022

  1. chore(deps-dev): bump lint-staged from 12.2.0 to 12.2.1

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.2.0 to 12.2.1.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v12.2.0...v12.2.1)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 20, 2022
    Copy the full SHA
    a7bbd42 View commit details
  2. Copy the full SHA
    cf02c2a View commit details

Commits on Jan 21, 2022

  1. chore(deps-dev): bump lint-staged from 12.2.1 to 12.2.2

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.2.1 to 12.2.2.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v12.2.1...v12.2.2)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 21, 2022
    Copy the full SHA
    769d329 View commit details
  2. Copy the full SHA
    df778b4 View commit details

Commits on Jan 24, 2022

  1. chore(deps-dev): bump lint-staged from 12.2.2 to 12.3.1

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.2.2 to 12.3.1.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v12.2.2...v12.3.1)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 24, 2022
    Copy the full SHA
    41deb4b View commit details
  2. Copy the full SHA
    2644d7d View commit details

Commits on Jan 27, 2022

  1. chore(deps-dev): bump lint-staged from 12.3.1 to 12.3.2

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.3.1 to 12.3.2.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v12.3.1...v12.3.2)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 27, 2022
    Copy the full SHA
    9b90fc5 View commit details
  2. Copy the full SHA
    96722ab View commit details

Commits on Feb 2, 2022

  1. chore(deps-dev): bump lint-staged from 12.3.2 to 12.3.3

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.3.2 to 12.3.3.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v12.3.2...v12.3.3)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Feb 2, 2022
    Copy the full SHA
    f146aa0 View commit details
  2. Copy the full SHA
    67aee6c View commit details

Commits on Feb 14, 2022

  1. chore(deps-dev): bump lint-staged from 12.3.3 to 12.3.4

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.3.3 to 12.3.4.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v12.3.3...v12.3.4)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Feb 14, 2022
    Copy the full SHA
    193552d View commit details
  2. Copy the full SHA
    ffc91bf View commit details

Commits on Mar 7, 2022

  1. chore(deps-dev): bump lint-staged from 12.3.4 to 12.3.5

    Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.3.4 to 12.3.5.
    - [Release notes](https://github.com/okonet/lint-staged/releases)
    - [Commits](lint-staged/lint-staged@v12.3.4...v12.3.5)
    
    ---
    updated-dependencies:
    - dependency-name: lint-staged
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 7, 2022
    Copy the full SHA
    d635218 View commit details
  2. Copy the full SHA
    664ee63 View commit details

Commits on Mar 16, 2022

  1. chore(deps-dev): bump prettier from 2.5.1 to 2.6.0

    Bumps [prettier](https://github.com/prettier/prettier) from 2.5.1 to 2.6.0.
    - [Release notes](https://github.com/prettier/prettier/releases)
    - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
    - [Commits](prettier/prettier@2.5.1...2.6.0)
    
    ---
    updated-dependencies:
    - dependency-name: prettier
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 16, 2022
    Copy the full SHA
    52f2f75 View commit details
  2. Copy the full SHA
    7da1c5e View commit details
Showing with 5,707 additions and 1,566 deletions.
  1. +39 −0 .editorconfig
  2. +11 −0 .gitattributes
  3. +0 −14 .github/workflows/auto-merge.yml
  4. +69 −0 .github/workflows/ci.yml
  5. +0 −37 .github/workflows/docs.yml
  6. +42 −0 .github/workflows/linting.yml
  7. +90 −0 .github/workflows/plan-release.yml
  8. +58 −0 .github/workflows/publish.yml
  9. +19 −0 .github/workflows/regenerate.yml
  10. +0 −71 .github/workflows/verify.yml
  11. +14 −0 .gitignore
  12. +0 −4 .husky/pre-commit
  13. +5 −0 .prettierignore
  14. +25 −0 .release-plan.json
  15. +25 −0 CHANGELOG.md
  16. +10 −12 Cargo.toml
  17. +109 −0 Makefile
  18. +48 −0 Package.swift
  19. +3 −3 README.md
  20. +27 −0 RELEASE.md
  21. +7 −5 binding.gyp
  22. +16 −0 bindings/c/tree-sitter-glimmer.h
  23. +11 −0 bindings/c/tree-sitter-glimmer.pc.in
  24. +13 −0 bindings/go/binding.go
  25. +15 −0 bindings/go/binding_test.go
  26. +5 −0 bindings/go/go.mod
  27. +14 −22 bindings/node/binding.cc
  28. +28 −0 bindings/node/index.d.ts
  29. +3 −15 bindings/node/index.js
  30. +5 −0 bindings/python/tree_sitter_glimmer/__init__.py
  31. +1 −0 bindings/python/tree_sitter_glimmer/__init__.pyi
  32. +27 −0 bindings/python/tree_sitter_glimmer/binding.c
  33. 0 bindings/python/tree_sitter_glimmer/py.typed
  34. +8 −26 bindings/rust/build.rs
  35. +12 −10 bindings/rust/lib.rs
  36. +16 −0 bindings/swift/TreeSitterGlimmer/glimmer.h
  37. +33 −28 grammar.js
  38. +58 −19 package.json
  39. 0 parser/.gitkeep
  40. +2,783 −0 pnpm-lock.yaml
  41. +29 −0 pyproject.toml
  42. +5 −0 queries/glimmer/folds.scm
  43. +117 −0 queries/glimmer/highlights.scm
  44. +34 −0 queries/glimmer/indents.scm
  45. +21 −0 queries/glimmer/injections.scm
  46. +9 −0 queries/glimmer/locals.scm
  47. +0 −88 queries/highlights.scm
  48. +31 −0 scripts/ci-install.sh
  49. +451 −0 scripts/format-queries.lua
  50. +57 −0 setup.py
  51. +1 −2 src/grammar.json
  52. +865 −543 src/parser.c
  53. +0 −3 src/scanner.c
  54. +54 −0 src/tree_sitter/alloc.h
  55. +290 −0 src/tree_sitter/array.h
  56. +55 −13 src/tree_sitter/parser.h
  57. +1 −5 test/corpus/comments.txt
  58. +26 −0 test/corpus/element.txt
  59. +12 −0 test/highlight/highlights.hbs
  60. +0 −646 yarn.lock
39 changes: 39 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{json,toml,yml,gyp}]
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 2

[*.rs]
indent_style = space
indent_size = 4

[*.{c,cc,h}]
indent_style = space
indent_size = 4

[*.{py,pyi}]
indent_style = space
indent_size = 4

[*.swift]
indent_style = space
indent_size = 4

[*.go]
indent_style = tab
indent_size = 8

[Makefile]
indent_style = tab
indent_size = 8
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
* text eol=lf

src/*.json linguist-generated
src/parser.c linguist-generated
src/tree_sitter/* linguist-generated

bindings/** linguist-generated
binding.gyp linguist-generated
setup.py linguist-generated
Makefile linguist-generated
Package.swift linguist-generated
14 changes: 0 additions & 14 deletions .github/workflows/auto-merge.yml

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI

on:
push:
branches:
- master
- main
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp
- .github/workflows/ci.yml
pull_request:
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp
- .github/workflows/ci.yml

concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

jobs:
test:
name: Test parser
runs-on: ${{matrix.os}}
if: >-
!github.event.repository.is_template &&
github.event.head_commit.message != 'Initial commit'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up tree-sitter
uses: tree-sitter/setup-action/cli@v1
- name: Run tests
uses: tree-sitter/parser-test-action@v2
with:
# We don't support rust bundling for now
test-rust: false
# test-rust: ${{runner.os == 'Linux'}}
fuzz:
name: Fuzz scanner
runs-on: ubuntu-latest
if: >-
!github.event.repository.is_template &&
github.event.head_commit.message != 'Initial commit'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check for scanner changes
id: scanner-check
shell: sh
run: |-
{
test -f src/scanner.c && ! git diff --quiet HEAD^ -- "$_" &&
printf 'changed=true\n' || printf 'changed=false\n'
} >> "$GITHUB_OUTPUT"
- name: Run fuzzer
uses: tree-sitter/fuzz-action@v4
if: steps.scanner-check.outputs.changed == 'true'
37 changes: 0 additions & 37 deletions .github/workflows/docs.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Linting

on:
pull_request:
push:
branches:
- master
- main

concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

jobs:
js:
name: "JavaScript"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install
- run: npm exec prettier --check .

format-queries:
name: Queries
runs-on: ubuntu-latest
env:
NVIM_TAG: nightly
# NVIM_TAG: stable
steps:
- uses: actions/checkout@v4
- name: Prepare
run: |
bash ./scripts/ci-install.sh
- name: Lint
run: |
nvim --version
nvim --headless -c "TSInstallSync query" -c "q"
nvim -l scripts/format-queries.lua
git diff --exit-code
90 changes: 90 additions & 0 deletions .github/workflows/plan-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Release Plan Review
on:
push:
branches:
- main
- master
pull_request_target: # This workflow has permissions on the repo, do NOT run code from PRs in this workflow. See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
types:
- labeled
- unlabeled

concurrency:
group: plan-release # only the latest one of these should ever be running
cancel-in-progress: true

jobs:
check-plan:
name: "Check Release Plan"
runs-on: ubuntu-latest
outputs:
command: ${{ steps.check-release.outputs.command }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: 'main'
# This will only cause the `check-plan` job to have a "command" of `release`
# when the .release-plan.json file was changed on the last commit.
- id: check-release
run: if git diff --name-only HEAD HEAD~1 | grep -w -q ".release-plan.json"; then echo "command=release"; fi >> $GITHUB_OUTPUT

prepare_release_notes:
name: Prepare Release Notes
runs-on: ubuntu-latest
timeout-minutes: 5
needs: check-plan
permissions:
contents: write
issues: read
pull-requests: write
outputs:
explanation: ${{ steps.explanation.outputs.text }}
# only run on push event if plan wasn't updated (don't create a release plan when we're releasing)
# only run on labeled event if the PR has already been merged
if: (github.event_name == 'push' && needs.check-plan.outputs.command != 'release') || (github.event_name == 'pull_request_target' && github.event.pull_request.merged == true)

steps:
- uses: actions/checkout@v4
# We need to download lots of history so that
# github-changelog can discover what's changed since the last release
with:
fetch-depth: 0
ref: 'main'
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: pnpm/action-setup@v4
- run: pnpm install --frozen-lockfile
- name: "Generate Explanation and Prep Changelogs"
id: explanation
run: |
set +e
pnpm release-plan prepare 2> >(tee -a release-plan-stderr.txt >&2)
if [ $? -ne 0 ]; then
echo 'text<<EOF' >> $GITHUB_OUTPUT
cat release-plan-stderr.txt >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
else
echo 'text<<EOF' >> $GITHUB_OUTPUT
jq .description .release-plan.json -r >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
rm release-plan-stderr.txt
fi
env:
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}

- uses: peter-evans/create-pull-request@v6
with:
commit-message: "Prepare Release using 'release-plan'"
labels: "internal"
branch: release-preview
title: Prepare Release
body: |
This PR is a preview of the release that [release-plan](https://github.com/embroider-build/release-plan) has prepared. To release you should just merge this PR 👍
-----------------------------------------
${{ steps.explanation.outputs.text }}
58 changes: 58 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# For every push to the master branch, this checks if the release-plan was
# updated and if it was it will publish stable npm packages based on the
# release plan

name: Publish Stable

on:
workflow_dispatch:
push:
branches:
- main
- master

concurrency:
group: publish-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
check-plan:
name: "Check Release Plan"
runs-on: ubuntu-latest
outputs:
command: ${{ steps.check-release.outputs.command }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: 'main'
# This will only cause the `check-plan` job to have a result of `success`
# when the .release-plan.json file was changed on the last commit. This
# plus the fact that this action only runs on main will be enough of a guard
- id: check-release
run: if git diff --name-only HEAD HEAD~1 | grep -w -q ".release-plan.json"; then echo "command=release"; fi >> $GITHUB_OUTPUT

publish:
name: "NPM Publish"
runs-on: ubuntu-latest
needs: check-plan
if: needs.check-plan.outputs.command == 'release'
permissions:
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v4
- run: pnpm install --frozen-lockfile
- name: npm publish
run: pnpm release-plan publish
env:
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/regenerate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Regenerate parser

on:
pull_request:

permissions:
contents: write
pull-requests: write

concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

jobs:
regenerate:
uses: tree-sitter/workflows/.github/workflows/regenerate.yml@main
if: >-
!github.event.repository.is_template &&
github.actor == 'dependabot[bot]'
Loading