Skip to content

Commit a206d9c

Browse files
Shinigami92fiskerlehni
authored
v3.0.0
Co-authored-by: fisker <[email protected]> Co-authored-by: Jürg Lehni <[email protected]>
1 parent 3dcbe01 commit a206d9c

File tree

164 files changed

+1232
-701
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+1232
-701
lines changed

.eslintrc.cjs

+11
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ module.exports = defineConfig({
3535
curly: ['error'],
3636
'linebreak-style': ['error', 'unix'],
3737
'no-case-declarations': 'warn',
38+
'no-restricted-globals': [
39+
'error',
40+
{
41+
name: '__dirname',
42+
message: "Use `fileURLToPath(new URL('.', import.meta.url))` instead.",
43+
},
44+
],
3845
quotes: ['error', 'single', { avoidEscape: true }],
3946
semi: ['error', 'always'],
4047

@@ -98,9 +105,11 @@ module.exports = defineConfig({
98105
'coffeescript',
99106
'colno',
100107
'doctype',
108+
'dts',
101109
'ecmascript',
102110
'endregion',
103111
'eos',
112+
'esm',
104113
'fallthrough',
105114
'filenames',
106115
'frameset',
@@ -115,13 +124,15 @@ module.exports = defineConfig({
115124
'lf',
116125
'lineno',
117126
'loc',
127+
'minify',
118128
'multiline',
119129
'multilines',
120130
'num',
121131
'outdent',
122132
'parens',
123133
'pipeless',
124134
'plist',
135+
'postcss',
125136
'pragma',
126137
'prepend',
127138
'readdir',

.github/ISSUE_TEMPLATE/bug-report-issue-forms-beta.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ body:
88
id: plugin-version
99
attributes:
1010
label: Plugin Version
11-
placeholder: v2.x.x
11+
placeholder: v3.x.x
1212
validations:
1313
required: true
1414
- type: input
1515
id: prettier-version
1616
attributes:
1717
label: Prettier Version
18-
placeholder: v2.x.x
18+
placeholder: v3.x.x
1919
validations:
2020
required: true
2121
- type: checkboxes

.github/ISSUE_TEMPLATE/bug-report.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ assignees: ''
1010

1111
| Tool | Version |
1212
| --------- | ----------------------- |
13-
| Plugin | v2.x.x |
14-
| Prettier | v2.x.x |
13+
| Plugin | v3.x.x |
14+
| Prettier | v3.x.x |
1515
| Framework | none,vue,angular,svelte |
1616
| Node | vx.x.x |
1717
| OS | win,linux,mac |

.prettierrc.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @type {import('prettier').Options}
66
*/
77
module.exports = {
8-
plugins: [require.resolve('prettier-plugin-organize-imports')],
8+
plugins: ['prettier-plugin-organize-imports'],
99
singleQuote: true,
1010
trailingComma: 'all',
1111
overrides: [

CHANGELOG.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
# Next
22

3-
[diff](https://github.com/prettier/plugin-pug/compare/2.5.2...main)
3+
[diff](https://github.com/prettier/plugin-pug/compare/3.0.0...main)
4+
5+
# 3.0.0
6+
7+
[diff](https://github.com/prettier/plugin-pug/compare/2.5.2...3.0.0)
8+
9+
## BREAKING CHANGES
10+
11+
**Dropped support for Prettier v2 and CJS** ([#458])
12+
13+
If you are using Prettier v2 / CJS, you need to stay on `2.5.2`.
14+
15+
[#458]: https://github.com/prettier/plugin-pug/pull/458
416

517
# 2.5.2
618

docs/guide/index.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ You can write your `.prettierrc.cjs` like this to get fully type check support w
9595
* @type {import('prettier').Options}
9696
*/
9797
module.exports = {
98-
// `require.resolve` is needed for e.g. `pnpm`
99-
plugins: [require.resolve('@prettier/plugin-pug')],
98+
plugins: ['@prettier/plugin-pug'],
10099

101100
printWidth: 120,
102101
singleQuote: true,

package.json

+25-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
22
"name": "@prettier/plugin-pug",
3-
"version": "2.5.2",
3+
"version": "3.0.0",
44
"description": "Prettier Pug Plugin",
5-
"main": "dist/index.js",
65
"scripts": {
76
"clean": "rimraf coverage .eslintcache dist junit.xml docs/.vitepress/dist pnpm-lock.yaml node_modules",
87
"build:clean": "rimraf dist",
9-
"build:code": "tsc --project tsconfig.build.json",
8+
"build:code": "tsup-node",
109
"build": "run-s build:clean build:code",
1110
"docs:build": "vitepress build docs",
1211
"docs:dev": "vitepress dev docs",
@@ -19,6 +18,20 @@
1918
"prepublishOnly": "pnpm run clean && pnpm install && pnpm run build",
2019
"preflight": "pnpm install && run-s format lint build test ts-check"
2120
},
21+
"type": "module",
22+
"main": "dist/index.js",
23+
"module": "dist/index.js",
24+
"exports": {
25+
".": {
26+
"types": "./dist/index.d.ts",
27+
"default": "./dist/index.js"
28+
},
29+
"./src/*": {
30+
"types": "./src/*.d.ts",
31+
"default": "./src/*.ts"
32+
},
33+
"./package.json": "./package.json"
34+
},
2235
"keywords": [
2336
"pug",
2437
"prettier-plugin",
@@ -56,10 +69,9 @@
5669
"pug-lexer": "^5.0.1"
5770
},
5871
"devDependencies": {
59-
"@types/node": "~20.4.4",
60-
"@types/prettier": "~2.7.3",
61-
"@typescript-eslint/eslint-plugin": "~6.1.0",
62-
"@typescript-eslint/parser": "~6.1.0",
72+
"@types/node": "~20.4.5",
73+
"@typescript-eslint/eslint-plugin": "~6.2.0",
74+
"@typescript-eslint/parser": "~6.2.0",
6375
"@vitest/coverage-v8": "~0.33.0",
6476
"benchmark": "~2.1.4",
6577
"eslint": "~8.45.0",
@@ -68,21 +80,22 @@
6880
"eslint-gitignore": "~0.1.0",
6981
"eslint-plugin-inclusive-language": "~2.2.0",
7082
"eslint-plugin-jsdoc": "~46.4.4",
71-
"eslint-plugin-prettier": "~4.2.1",
83+
"eslint-plugin-prettier": "~5.0.0",
7284
"eslint-plugin-spellcheck": "~0.0.20",
7385
"npm-run-all": "~4.1.5",
74-
"prettier": "2.8.8",
86+
"prettier": "3.0.0",
7587
"prettier-plugin-organize-imports": "~3.2.3",
7688
"rimraf": "~5.0.1",
89+
"tsup": "~7.1.0",
7790
"typescript": "~5.1.6",
78-
"vite": "~4.4.6",
91+
"vite": "~4.4.7",
7992
"vitepress": "1.0.0-beta.6",
8093
"vitest": "~0.33.0"
8194
},
8295
"peerDependencies": {
83-
"prettier": "^2.3.0"
96+
"prettier": "^3.0.0"
8497
},
85-
"packageManager": "[email protected].9",
98+
"packageManager": "[email protected].10",
8699
"engines": {
87100
"node": "^16.13.0 || >=18.0.0",
88101
"npm": ">=7.10.0"

0 commit comments

Comments
 (0)