From 140d726bb8e5a3d6e0dca777b1e8d69277224136 Mon Sep 17 00:00:00 2001 From: Cloyd Lau <31238760+cloydlau@users.noreply.github.com> Date: Fri, 11 Oct 2024 12:51:58 +0800 Subject: [PATCH] workflow: integrate publint --- package.json | 7 ++++- pnpm-lock.yaml | 69 +++++++++++++++++++++++++++++++++++++++++++++ scripts/release.mts | 5 ++++ 3 files changed, 80 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 619b384..a9337b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "json-editor-vue", "PascalCasedName": "JsonEditorVue", + "type": "commonjs", "version": "0.17.1", "private": false, "description": "Vue and Nuxt 2/3 isomorphic JSON editor, viewer, formatter and validator.", @@ -9,7 +10,10 @@ "url": "https://github.com/cloydlau" }, "license": "MIT", - "repository": "https://github.com/cloydlau/json-editor-vue", + "repository": { + "type": "git", + "url": "git+https://github.com/cloydlau/json-editor-vue.git" + }, "keywords": [ "ajv", "bigint", @@ -117,6 +121,7 @@ "only-allow": "^1.2.1", "open": "^10.1.0", "prompts": "^2.4.2", + "publint": "^0.2.11", "rollup-plugin-visualizer": "^5.12.0", "semver": "^7.6.3", "simple-git-hooks": "^2.11.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 06deaa3..4f3dd5f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -111,6 +111,9 @@ importers: prompts: specifier: ^2.4.2 version: 2.4.2 + publint: + specifier: ^0.2.11 + version: 0.2.11 rollup-plugin-visualizer: specifier: ^5.12.0 version: 5.12.0(rollup@4.24.0) @@ -2405,6 +2408,11 @@ packages: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Glob versions prior to v9 are no longer supported + glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + deprecated: Glob versions prior to v9 are no longer supported + global-directory@4.0.1: resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} engines: {node: '>=18'} @@ -2484,6 +2492,10 @@ packages: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} + ignore-walk@5.0.1: + resolution: {integrity: sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -3180,6 +3192,10 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + minimatch@9.0.1: resolution: {integrity: sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==} engines: {node: '>=16 || 14 >=14.17'} @@ -3279,9 +3295,22 @@ 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} + npm-normalize-package-bin@1.0.1: resolution: {integrity: sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==} + npm-normalize-package-bin@2.0.0: + resolution: {integrity: sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + 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 + npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -3543,6 +3572,11 @@ packages: proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + publint@0.2.11: + resolution: {integrity: sha512-/kxbd+sD/uEG515N/ZYpC6gYs8h89cQ4UIsAq1y6VT4qlNh8xmiSwcP2xU2MbzXFl8J0l2IdONKFweLfYoqhcA==} + engines: {node: '>=16'} + hasBin: true + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -6964,6 +6998,14 @@ snapshots: once: 1.4.0 path-is-absolute: 1.0.1 + glob@8.1.0: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.6 + once: 1.4.0 + global-directory@4.0.1: dependencies: ini: 4.1.1 @@ -7041,6 +7083,10 @@ snapshots: human-signals@5.0.0: {} + ignore-walk@5.0.1: + dependencies: + minimatch: 5.1.6 + ignore@5.3.2: {} immutable-json-patch@6.0.1: {} @@ -8017,6 +8063,10 @@ snapshots: dependencies: brace-expansion: 1.1.11 + minimatch@5.1.6: + dependencies: + brace-expansion: 2.0.1 + minimatch@9.0.1: dependencies: brace-expansion: 2.0.1 @@ -8111,8 +8161,21 @@ snapshots: normalize-path@3.0.0: {} + npm-bundled@2.0.1: + dependencies: + npm-normalize-package-bin: 2.0.0 + npm-normalize-package-bin@1.0.1: {} + npm-normalize-package-bin@2.0.0: {} + + npm-packlist@5.1.3: + dependencies: + glob: 8.1.0 + ignore-walk: 5.0.1 + npm-bundled: 2.0.1 + npm-normalize-package-bin: 2.0.0 + npm-run-path@4.0.1: dependencies: path-key: 3.1.1 @@ -8345,6 +8408,12 @@ snapshots: proxy-from-env@1.1.0: {} + publint@0.2.11: + dependencies: + npm-packlist: 5.1.3 + picocolors: 1.1.0 + sade: 1.8.1 + punycode@2.3.1: {} queue-microtask@1.2.3: {} diff --git a/scripts/release.mts b/scripts/release.mts index f544a03..11ef4d6 100644 --- a/scripts/release.mts +++ b/scripts/release.mts @@ -31,6 +31,11 @@ async function release() { return } + console.log(cyan('Publinting...')) + if (spawn.sync('npx', ['publint'], { stdio: 'inherit' }).status === 1) { + return + } + console.log(cyan('Checking exports...')) if (spawn.sync('pnpm', ['check-exports'], { stdio: 'inherit' }).status === 1) { return