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
5 changes: 5 additions & 0 deletions .changeset/cuddly-webs-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"prettier-plugin-embed": patch
---

Fix indentation issues in sql, css and markdown embedded languages.
5 changes: 5 additions & 0 deletions .changeset/icy-impalas-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"prettier-plugin-embed": patch
---

Fix embedded xml and prisma formatting behavior.
9 changes: 7 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ runs:
using: composite
steps:
- name: Setup PNPM
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0

- name: Setup Node.js
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: .node-version
cache: pnpm
registry-url: https://registry.npmjs.org

- name: Upgrade npm for trusted publishing
shell: bash
run: npm install -g npm@latest

- name: Install Dependencies
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Setup
uses: ./.github/actions/setup
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Release

on:
workflow_dispatch:
push:
branches:
- main
Expand All @@ -17,32 +16,32 @@ permissions:
env:
NPM_CONFIG_PROVENANCE: true

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

jobs:
release:
if: ${{ github.repository != 'Sec-ant/vanilla-ts' }}
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Setup
uses: ./.github/actions/setup

- name: Test
run: pnpm -s test
run: pnpm -s test:ci

- name: Get Next Package Version
id: package-version
run: echo "version=$(pnpm -s changeset status --output=release.json && jq -r '.releases[0].newVersion // '$(npm pkg get version)'' release.json && rm release.json)" >> $GITHUB_OUTPUT

- name: Create Release Pull Request or Publish to NPM
id: changesets
uses: changesets/action@c8bada60c408975afd1a20b3db81d6eee6789308 # v1.4.9
uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba # v1.5.3
with:
publish: pnpm -s changeset publish
commit: "chore(release): v${{ steps.package-version.outputs.version }}"
env:
GITHUB_TOKEN: ${{ secrets.CHANGESET_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 13 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Setup
uses: ./.github/actions/setup

# This is required for @prettier/plugin-ruby to work correctly
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4" # Not needed with a .ruby-version, .tool-versions or mise.toml
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Install Ruby gems for plugin-ruby
run: |
gem install syntax_tree --no-document

- name: Test
run: pnpm -s test
run: pnpm -s test:ci
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
*.tsx
*.json
*.jsonc
pnpm-lock.yaml
tests/**/fixtures/**/*
.all-contributorsrc
3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
### Patch Changes

- fbb5cae: Fix wrong options fallback behaviors:

- Empty list of tags and comments shouldn't fallback to identifiers in options.

- 5cadbfa: Fix unstable embedded markdown indentation when using the `useTabs` option: https://github.com/Sec-ant/prettier-plugin-embed/pull/91#issuecomment-1963760555.
Expand All @@ -36,7 +35,6 @@
### Patch Changes

- 67d0726: Fix a regression of formatting template literals with only whitespaces:

- Template literals with only whitespaces should be formatted to ` `` `.

## 0.4.11
Expand All @@ -45,7 +43,6 @@

- 3639712: Set up changesets
- f4a41e7: Deprecate `identifier`-named options.

- Change options `embedded<Language>Identifiers` to `embedded<Language>Comments` and `embedded<Language>Tags`.
- Remove option ~~`noEmbeddedIdentificationByComment`~~ because it is not needed anymore.
- Remove option ~~`noEmbeddedIdentificationByTag`~~ because it is not needded anymore.
Expand Down
10 changes: 4 additions & 6 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"files": {
"ignore": ["./tests/**/fixtures/**/*"],
"includes": ["**", "!tests/**/fixtures/**/*"],
"ignoreUnknown": true
},
"organizeImports": {
"enabled": true
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"formatter": {
"enabled": true,
"indentStyle": "space"
Expand All @@ -32,15 +30,15 @@
},
"overrides": [
{
"include": ["*.json"],
"includes": ["**/*.json"],
"json": {
"parser": {
"allowTrailingCommas": true
}
}
},
{
"include": ["package.json", ".all-contributorsrc"],
"includes": ["**/package.json", "**/.all-contributorsrc"],
"json": {
"formatter": {
"lineWidth": 1
Expand Down
69 changes: 35 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"nocheck-chevrotain-types": "tsx ./scripts/nocheck-chevrotain-types.ts",
"copy": "copy-files-from-to",
"postbuild": "tsc --project ./tsconfig.production.json && conc \"pnpm:add-glob-import-types\" \"pnpm:nocheck-chevrotain-types\" \"pnpm:copy\"",
"test:ci": "vitest --run",
"test": "vitest",
"test:ui": "vitest --ui",
"process-readme": "tsx ./scripts/process-readme",
Expand All @@ -81,54 +82,54 @@
"bump-biome:nightly": "pnpm add -DE @biomejs/biome@nightly"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@changesets/cli": "^2.28.1",
"@commitlint/cli": "^19.7.1",
"@commitlint/config-conventional": "^19.7.1",
"@prettier/plugin-php": "^0.22.4",
"@prettier/plugin-pug": "^3.2.1",
"@biomejs/biome": "2.3.10",
"@changesets/cli": "^2.29.8",
"@commitlint/cli": "^20.2.0",
"@commitlint/config-conventional": "^20.2.0",
"@prettier/plugin-php": "^0.24.0",
"@prettier/plugin-pug": "^3.4.2",
"@prettier/plugin-ruby": "^4.0.4",
"@prettier/plugin-xml": "^3.4.1",
"@stedi/prettier-plugin-jsonata": "^2.1.3",
"@types/node": "^22.13.5",
"@vitest/coverage-istanbul": "^3.0.6",
"@vitest/ui": "^3.0.6",
"@prettier/plugin-xml": "^3.4.2",
"@stedi/prettier-plugin-jsonata": "^2.1.8",
"@types/node": "^25.0.3",
"@vitest/coverage-istanbul": "^4.0.16",
"@vitest/ui": "^4.0.16",
"@xml-tools/parser": "^1.0.11",
"chevrotain": "7.1.1",
"concurrently": "^9.1.2",
"copy-files-from-to": "^3.12.1",
"esbuild": "^0.25.0",
"lint-staged": "^15.4.3",
"npm-check-updates": "^17.1.14",
"prettier": "^3.5.2",
"prettier-plugin-glsl": "^0.2.0",
"concurrently": "^9.2.1",
"copy-files-from-to": "^3.13.0",
"esbuild": "^0.27.1",
"lint-staged": "^16.2.7",
"npm-check-updates": "^19.2.0",
"prettier": "^3.7.4",
"prettier-plugin-glsl": "^0.2.2",
"prettier-plugin-ini": "^1.3.0",
"prettier-plugin-java": "^2.6.7",
"prettier-plugin-java": "^2.7.7",
"prettier-plugin-latex": "^2.0.1",
"prettier-plugin-nginx": "^1.0.3",
"prettier-plugin-pegjs": "^2.0.2",
"prettier-plugin-prisma": "^5.0.0",
"prettier-plugin-properties": "^0.3.0",
"prettier-plugin-sh": "^0.15.0",
"prettier-plugin-sql": "^0.18.1",
"prettier-plugin-sql-cst": "^0.12.2",
"prettier-plugin-toml": "^2.0.2",
"simple-git-hooks": "^2.11.1",
"tinyglobby": "^0.2.12",
"tsx": "^4.19.3",
"typescript": "^5.7.3",
"vite": "^6.1.1",
"vitest": "^3.0.6"
"prettier-plugin-sh": "^0.18.0",
"prettier-plugin-sql": "^0.19.2",
"prettier-plugin-sql-cst": "^0.17.2",
"prettier-plugin-toml": "^2.0.6",
"simple-git-hooks": "^2.13.1",
"tinyglobby": "^0.2.15",
"tsx": "^4.21.0",
"typescript": "^5.9.3",
"vite": "^7.3.0",
"vitest": "^4.0.16"
},
"dependencies": {
"@types/estree": "^1.0.6",
"dedent": "^1.5.3",
"micro-memoize": "^4.1.3",
"@types/estree": "^1.0.8",
"dedent": "^1.7.1",
"micro-memoize": "^5.1.1",
"package-up": "^5.0.0",
"tiny-jsonc": "^1.0.2",
"type-fest": "^4.35.0"
"type-fest": "^5.3.1"
},
"packageManager": "pnpm@10.4.1+sha512.c753b6c3ad7afa13af388fa6d808035a008e30ea9993f58c6663e2bc5ff21679aa834db094987129aa4d488b86df57f7b634981b2f827cdcacc698cc0cfb88af",
"packageManager": "pnpm@10.26.0+sha512.3b3f6c725ebe712506c0ab1ad4133cf86b1f4b687effce62a9b38b4d72e3954242e643190fc51fa1642949c735f403debd44f5cb0edd657abe63a8b6a7e1e402",
"pnpm": {
"onlyBuiltDependencies": [
"@biomejs/biome",
Expand Down
Loading
Loading