diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 00000000..e5b6d8d6 --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 00000000..d4c33cf1 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", + "changelog": [ + "@changesets/changelog-github", + { "repo": "NullVoxPopuli/highlightjs-glimmer" } + ], + "commit": false, + "fixed": [], + "linked": [], + "access": "restricted", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": ["hljs-glimmer-tests-cjs", "hljs-glimmer-tests-esm"] +} diff --git a/.changeset/selfish-books-smash.md b/.changeset/selfish-books-smash.md new file mode 100644 index 00000000..f0d975fc --- /dev/null +++ b/.changeset/selfish-books-smash.md @@ -0,0 +1,5 @@ +--- +"highlightjs-glimmer": patch +--- + +Removed some unused code. diff --git a/.github/actions/pnpm/action.yml b/.github/actions/pnpm/action.yml deleted file mode 100644 index 9d472515..00000000 --- a/.github/actions/pnpm/action.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Setup node and pnpm -description: Setup node and install dependencies using pnpm -runs: - using: "composite" - steps: - - uses: pnpm/action-setup@v2.2.4 - with: - version: 7 - - uses: actions/setup-node@v3 - with: - cache: 'pnpm' - - name: 'Install dependencies' - shell: 'bash' - run: pnpm install diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ac11046..864d4d5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,34 +9,42 @@ on: schedule: - cron: "0 3 * * 0" # every Sunday at 3am +concurrency: ${{ github.workflow }}-${{ github.ref }} + env: CI: true + TURBO_API: http://127.0.0.1:9080 + TURBO_TOKEN: this-is-not-a-secret + TURBO_TEAM: myself jobs: - lint_source: - name: Lint Source - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: ./.github/actions/pnpm - - run: pnpm lint:js - - commits: - name: Commit Messages + install_dependencies: + name: Install Dependencies runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: felixmosh/turborepo-gh-artifacts@v2 with: - fetch-depth: 0 - - - uses: volta-cli/action@v4 - - uses: wagoid/commitlint-github-action@v5.3.1 + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: NullVoxPopuli/action-setup-pnpm@v1.1.0 + lint: + name: Lint Source + runs-on: ubuntu-latest + needs: [install_dependencies] + steps: + - uses: actions/checkout@v3 + - uses: felixmosh/turborepo-gh-artifacts@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: NullVoxPopuli/action-setup-pnpm@v1.1.0 + - run: pnpm lint esm_tests: name: ESM Tests timeout-minutes: 5 runs-on: ubuntu-latest + needs: [install_dependencies] strategy: matrix: node: @@ -45,12 +53,10 @@ jobs: - "18" steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/pnpm - - uses: actions/setup-node@v3 + - uses: felixmosh/turborepo-gh-artifacts@v2 with: - node-version: ${{ matrix.node}} - - run: pnpm install - + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: NullVoxPopuli/action-setup-pnpm@v1.1.0 - name: Test Modules with ${{ matrix.node }} run: pnpm test working-directory: tests-esm @@ -59,6 +65,7 @@ jobs: name: CJS Tests timeout-minutes: 5 runs-on: ubuntu-latest + needs: [install_dependencies] strategy: matrix: node: @@ -67,11 +74,10 @@ jobs: - "18" steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/pnpm - - uses: actions/setup-node@v3 + - uses: felixmosh/turborepo-gh-artifacts@v2 with: - node-version: ${{ matrix.node}} - - run: pnpm install + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: NullVoxPopuli/action-setup-pnpm@v1.1.0 - name: Test CJS with ${{ matrix.node }} run: pnpm test working-directory: tests-cjs @@ -81,24 +87,33 @@ jobs: name: "Highlight.js Tests" timeout-minutes: 5 runs-on: ubuntu-latest + needs: [install_dependencies] steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/pnpm + - uses: felixmosh/turborepo-gh-artifacts@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: NullVoxPopuli/action-setup-pnpm@v1.1.0 - run: scripts/hljs-test.sh + working-directory: highlightjs-glimmer - publish: + release: name: Release runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' needs: [esm_tests, cjs_tests, hljs_tests] - steps: - uses: actions/checkout@v3 + - uses: felixmosh/turborepo-gh-artifacts@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: NullVoxPopuli/action-setup-pnpm@v1.1.0 + - name: Create Release Pull Request or Publish to npm + id: changesets + uses: changesets/action@v1 with: - persist-credentials: false - - uses: ./.github/actions/pnpm - - name: Release - run: pnpm semantic-release + publish: pnpm release + title: "Release Preview" env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/config/ember-cli-update.json b/config/ember-cli-update.json deleted file mode 100644 index 62ed6bfb..00000000 --- a/config/ember-cli-update.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "schemaVersion": "1.0.0", - "packages": [ - { - "name": "ember-addon-automated-ci", - "version": "1.0.2", - "blueprints": [ - { - "name": "ember-addon-automated-ci", - "isBaseBlueprint": true - } - ] - } - ] -} diff --git a/dist/glimmer.cjs.cjs b/dist/glimmer.cjs.cjs index 48f29dda..83d39b57 100644 --- a/dist/glimmer.cjs.cjs +++ b/dist/glimmer.cjs.cjs @@ -161,6 +161,7 @@ function glimmer(hljs) { end: /"/, contains: [ XML_ENTITIES + /* MUSTACHE_EXPRESSION added later */ ] }, { @@ -168,6 +169,7 @@ function glimmer(hljs) { end: /'/, contains: [ XML_ENTITIES + /* MUSTACHE_EXPRESSION added later */ ] } ] @@ -180,8 +182,19 @@ function glimmer(hljs) { BLOCK_PARAMS, THIS_EXPRESSION, ATTRIBUTES, + // { + // className: 'variable', + // keywords: KEYWORDS, + // match: /\s[\w\d-_^]+/ + // }, + // { + // match: /\b[a-z][a-zA-Z0-9-]+\b/, + // keywords: KEYWORDS, + // className: 'keyword' + // }, CURLY_NAME, STRING + // NAME, ]; const SUB_EXPRESSION = { keywords: KEYWORDS, @@ -189,6 +202,7 @@ function glimmer(hljs) { /\(/, regex.lookahead( regex.concat( + // /[^)]+/, /\)/ ) ) @@ -241,6 +255,7 @@ function glimmer(hljs) { ABS_NAME ] }, + // close tag { className: "tag", begin: regex.concat(/<\/:?/, regex.lookahead(regex.concat(TAG_NAME, />/))), @@ -317,10 +332,21 @@ function setupTemplateTag(_hljs, js) { const GLIMMER_TEMPLATE_TAG = { begin: /