diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 690e1470..5d6c230d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,6 +76,9 @@ jobs: - name: Lint run: pnpm run lint + - name: Publint + run: pnpm run publint + - name: Type check run: pnpm run type-check diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 145a961f..90e68558 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,6 +38,7 @@ jobs: pnpm run type-check pnpm run clean pnpm run build + pnpm run publint cp README.md packages/vite-plugin-checker/README.md - name: Publish to NPM diff --git a/package.json b/package.json index 2a141bcf..ec2213fd 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "clean": "pnpm -r --filter=./packages/** run clean", "format": "prettier --check \"packages/*/src/**/*.{ts,js,svelte}\"", "lint": "eslint \"packages/*/src/**/*.{ts,js,svelte}\"", + "publint": "pnpm -r --filter='vite-plugin-checker' exec publint", "test": "run-s test-unit test-serve test-build", "test-unit": "vitest run", "test-serve": "vitest run -c vitest.config.e2e.ts", @@ -70,6 +71,7 @@ "prettier": "^2.3.2", "prettier-plugin-svelte": "^2.6.0", "prompts": "^2.4.1", + "publint": "^0.1.9", "rimraf": "^3.0.2", "semver": "^7.3.5", "simple-git-hooks": "^2.8.0", diff --git a/packages/vite-plugin-checker/src/main.ts b/packages/vite-plugin-checker/src/main.ts index 89ce7052..7a19cd9e 100644 --- a/packages/vite-plugin-checker/src/main.ts +++ b/packages/vite-plugin-checker/src/main.ts @@ -193,7 +193,7 @@ export function checker(userConfig: UserPluginConfig): Plugin { }) if (server.ws.on) { - server.watcher.on('change', (file) => { + server.watcher.on('change', () => { logger!.clearScreen('error') }) server.ws.on('vite-plugin-checker', (data) => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a600babe..15d42b50 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,6 +36,7 @@ importers: prettier: ^2.3.2 prettier-plugin-svelte: ^2.6.0 prompts: ^2.4.1 + publint: ^0.1.9 rimraf: ^3.0.2 semver: ^7.3.5 simple-git-hooks: ^2.8.0 @@ -82,6 +83,7 @@ importers: prettier: 2.7.1 prettier-plugin-svelte: 2.7.0_o3ioganyptcsrh6x4hnxvjkpqi prompts: 2.4.2 + publint: 0.1.9 rimraf: 3.0.2 semver: 7.3.7 simple-git-hooks: 2.8.0 @@ -4912,6 +4914,17 @@ packages: path-is-absolute: 1.0.1 dev: true + /glob/8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.1 + once: 1.4.0 + dev: true + /global-modules/2.0.0: resolution: {integrity: sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==} engines: {node: '>=6'} @@ -5109,6 +5122,13 @@ packages: safer-buffer: 2.1.2 dev: true + /ignore-walk/5.0.1: + resolution: {integrity: sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + minimatch: 5.1.1 + dev: true + /ignore/4.0.6: resolution: {integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==} engines: {node: '>= 4'} @@ -5887,6 +5907,29 @@ packages: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} + /npm-bundled/2.0.1: + resolution: {integrity: sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + npm-normalize-package-bin: 2.0.0 + dev: true + + /npm-normalize-package-bin/2.0.0: + resolution: {integrity: sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dev: true + + /npm-packlist/5.1.3: + resolution: {integrity: sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + hasBin: true + dependencies: + glob: 8.1.0 + ignore-walk: 5.0.1 + npm-bundled: 2.0.1 + npm-normalize-package-bin: 2.0.0 + dev: true + /npm-run-all/4.1.5: resolution: {integrity: sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==} engines: {node: '>= 4'} @@ -6289,6 +6332,16 @@ packages: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} dev: true + /publint/0.1.9: + resolution: {integrity: sha512-O53y7vbePxuGFmEjgcrafMSlDpOJwOkj8YdexOt7yWlv7SB3rXoT3mHknyMJ3lf2UFH5Bmt6tnIkHcOTR6dEoA==} + engines: {node: '>=16'} + hasBin: true + dependencies: + npm-packlist: 5.1.3 + picocolors: 1.0.0 + sade: 1.8.1 + dev: true + /pug-error/2.0.0: resolution: {integrity: sha512-sjiUsi9M4RAGHktC1drQfCr5C5eriu24Lfbt4s+7SykztEOwVZtbFk1RRq0tzLxcMxMYTBR+zMQaG07J/btayQ==} dev: true