Skip to content

Commit

Permalink
refactor: Add Typescript support + seperate injection grammars [relea…
Browse files Browse the repository at this point in the history
…se] (#38)
  • Loading branch information
harrydowning authored Aug 29, 2024
1 parent 7b56243 commit fd1c21d
Show file tree
Hide file tree
Showing 20 changed files with 4,105 additions and 686 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
- run: npm i
- run: npm run generate
- run: "[[ -z $(git status --porcelain) ]]"
- run: npm run lint:check
- run: npm run format:check
- run: npm run type
- run: npm run lint
- run: npm run format
release:
runs-on: ubuntu-latest
needs: check
Expand All @@ -25,6 +26,7 @@ jobs:
with:
node-version: "18"
- run: npm i
- run: npm run build
- run: npx vsce package
- run: echo "VERSION=$(node -p "require('./package.json').version")" >> "$GITHUB_ENV"
- run: gh release create v$VERSION --generate-notes yaml-embedded-languages-$VERSION.vsix
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
*.vsix
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
syntaxes/injection.json
syntaxes/
package.json
4 changes: 2 additions & 2 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
**

!extension.js
!syntaxes/injection.json
!dist/extension.js
!syntaxes/
!images/icon.png
!package.json
!README.md
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

## [Unreleased]

## [1.0.2] - 2024-08-29

### Changed

- `scopeName` to be required
- Output to be bundled and minified
- Injection grammar to be separated into `source.yaml.injection` and `source.github-actions-workflow.injection`

## [1.0.1] - 2024-08-26

Expand Down Expand Up @@ -112,7 +116,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

- Highlighting support for 40 languages in YAML block-scalars

[unreleased]: https://github.com/harrydowning/yaml-embedded-languages/compare/v1.0.1...HEAD
[unreleased]: https://github.com/harrydowning/yaml-embedded-languages/compare/v1.0.2...HEAD
[1.0.2]: https://github.com/harrydowning/yaml-embedded-languages/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/harrydowning/yaml-embedded-languages/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/harrydowning/yaml-embedded-languages/compare/v0.4.0...v1.0.0
[0.4.0]: https://github.com/harrydowning/yaml-embedded-languages/compare/v0.3.3...v0.4.0
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Thank you for taking an interest in contributing to this project. All contributi

## Development Workflow

- Implement changes, noting that `package.json` is partially generated and `syntaxes/injection.json` is fully generated so relevant changes to these should be made in `extension.js`
- Run `npm run generate` to update `package.json` and `syntaxes/injection.json`
- Implement changes, noting that `package.json` is partially generated and `syntaxes` is fully generated so relevant changes to these should be made in `src`
- Run `npm run generate` to update `package.json` and `syntaxes`
- Use F5 within VS Code to test the extension

## Release Workflow
Expand Down
21 changes: 11 additions & 10 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import globals from "globals";
import pluginJs from "@eslint/js";
// @ts-check

export default [
pluginJs.configs.recommended,
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
files: ["**/*.js"],
languageOptions: {
sourceType: "commonjs",
globals: globals.node,
},
ignores: ["dist/*"],
},
];
eslintPluginPrettierRecommended, // Must be last
);
Loading

0 comments on commit fd1c21d

Please sign in to comment.