Skip to content

Commit 05f8e2d

Browse files
authored
Update dependencies and fix rollup warnings (withastro#229)
* Update dependencies * Fix rollup and vitest dependencies warnings
1 parent 68b1c2a commit 05f8e2d

6 files changed

Lines changed: 213 additions & 309 deletions

File tree

package.json

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"workers/*"
1010
],
1111
"engines": {
12-
"node": "^14.13.1 || >=16.0.0",
12+
"node": "^14.15.0 || >=16.0.0",
1313
"npm": ">=6.14.0"
1414
},
1515
"homepage": "https://github.com/withastro/prettier-plugin-astro/",
@@ -31,36 +31,34 @@
3131
"build": "rollup -c",
3232
"dev": "rollup -c -w",
3333
"test": "vitest run",
34-
"test:w": "vitest -w",
34+
"test:watch": "vitest -w",
3535
"test:ui": "vitest --ui",
36-
"release": "yarn build && changeset publish",
3736
"lint": "eslint .",
38-
"fix": "yarn lint --fix",
39-
"format": "prettier -w ."
37+
"lint:fix": "yarn lint --fix",
38+
"format": "prettier -w . --cache"
4039
},
4140
"dependencies": {
4241
"@astrojs/compiler": "^0.15.2",
43-
"prettier": "^2.6.2",
42+
"prettier": "^2.7.1",
4443
"sass-formatter": "^0.7.2",
4544
"synckit": "^0.7.0"
4645
},
4746
"devDependencies": {
4847
"@changesets/cli": "^2.16.0",
49-
"@rollup/plugin-commonjs": "^21.0.3",
50-
"@rollup/plugin-node-resolve": "^13.0.5",
51-
"@types/prettier": "^2.4.1",
52-
"@typescript-eslint/eslint-plugin": "^5.18.0",
53-
"@typescript-eslint/parser": "^5.18.0",
54-
"@vitest/ui": "^0.9.2",
55-
"eslint": "^8.12.0",
48+
"@rollup/plugin-commonjs": "^22.0.1",
49+
"@rollup/plugin-typescript": "^8.3.3",
50+
"@types/node": "^14.15.0",
51+
"@types/prettier": "^2.6.3",
52+
"@typescript-eslint/eslint-plugin": "^5.29.0",
53+
"@typescript-eslint/parser": "^5.29.0",
54+
"@vitest/ui": "^0.16.0",
55+
"eslint": "^8.18.0",
5656
"eslint-config-prettier": "^8.5.0",
5757
"eslint-plugin-prettier": "^4.0.0",
58-
"eslint-plugin-prettier-doc": "^1.0.1",
59-
"rollup": "^2.70.1",
60-
"rollup-plugin-typescript": "^1.0.1",
61-
"ts-node": "^10.7.0",
62-
"tslib": "^2.3.1",
63-
"typescript": "^4.6.3",
64-
"vitest": "^0.9.2"
58+
"eslint-plugin-prettier-doc": "^1.1.0",
59+
"rollup": "^2.75.7",
60+
"tslib": "^2.4.0",
61+
"typescript": "^4.7.4",
62+
"vitest": "^0.16.0"
6563
}
6664
}

rollup.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import commonjs from '@rollup/plugin-commonjs';
2-
import typescript from 'rollup-plugin-typescript';
2+
import typescript from '@rollup/plugin-typescript';
33
import { defineConfig } from 'rollup';
44

55
export default defineConfig({
66
input: 'src/index.ts',
77
plugins: [commonjs(), typescript()],
8-
external: ['prettier'],
8+
external: ['prettier', 'prettier/doc', 'synckit', 'sass-formatter', 'node:module'],
99
output: {
1010
dir: 'dist',
1111
format: 'cjs',

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import printer from './printer';
22
import { options } from './options';
33
import { Parser, Printer, SupportLanguage } from 'prettier';
44
import { createSyncFn } from 'synckit';
5-
import { createRequire } from 'module';
5+
import { createRequire } from 'node:module';
66
const require = createRequire(import.meta.url);
77

88
// the worker path must be absolute

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
} from './nodes';
2727

2828
import { createSyncFn } from 'synckit';
29-
import { createRequire } from 'module';
29+
import { createRequire } from 'node:module';
3030
const require = createRequire(import.meta.url);
3131

3232
// the worker path must be absolute

vitest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// <reference types="vitest" />
2-
import { defineConfig } from 'vite';
2+
import { defineConfig } from 'vitest/config';
33

44
export default defineConfig({
55
test: {

0 commit comments

Comments
 (0)