@anolilab/semantic-release-clean-package-json 4.0.0-alpha.2 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,38 @@
1
+ ## @anolilab/semantic-release-clean-package-json [4.0.0](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-clean-package-json@3.0.5...@anolilab/semantic-release-clean-package-json@4.0.0) (2025-11-20)
2
+
3
+ ### ⚠ BREAKING CHANGES
4
+
5
+ * - node-versions: the minimum node version for the v24 range is now v24.10.0
6
+ - deps: a minimum of node v22.14 is now required
7
+
8
+ ### Bug Fixes
9
+
10
+ * update dependencies and configurations across multiple packages ([c37a51f](https://github.com/anolilab/semantic-release/commit/c37a51f53899c7088140d398867ed9ab7b291acf))
11
+ * update dependencies and node version across multiple packages ([cbfde4b](https://github.com/anolilab/semantic-release/commit/cbfde4b18e22a3994c70f145e9a9a6c71f4539c8))
12
+
13
+ ### Miscellaneous Chores
14
+
15
+ * **release:** @anolilab/semantic-release-clean-package-json@4.0.0-alpha.1 [skip ci]\n\n## @anolilab/semantic-release-clean-package-json [4.0.0-alpha.1](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-clean-package-json@3.0.4...@anolilab/semantic-release-clean-package-json@4.0.0-alpha.1) (2025-10-14) ([1652733](https://github.com/anolilab/semantic-release/commit/165273358f86860f9488eaa8f4c8f977d49c5b41))
16
+ * **release:** @anolilab/semantic-release-clean-package-json@4.0.0-alpha.2 [skip ci]\n\n## @anolilab/semantic-release-clean-package-json [4.0.0-alpha.2](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-clean-package-json@4.0.0-alpha.1...@anolilab/semantic-release-clean-package-json@4.0.0-alpha.2) (2025-10-21) ([4ac44c2](https://github.com/anolilab/semantic-release/commit/4ac44c2b29b02b2af6c084eb5a761a48cdb7a688))
17
+ * **release:** @anolilab/semantic-release-clean-package-json@4.0.0-alpha.3 [skip ci]\n\n## @anolilab/semantic-release-clean-package-json [4.0.0-alpha.3](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-clean-package-json@4.0.0-alpha.2...@anolilab/semantic-release-clean-package-json@4.0.0-alpha.3) (2025-11-20) ([0078911](https://github.com/anolilab/semantic-release/commit/0078911f52da53d7e92d3894c2010f7158602abe))
18
+ * **release:** update changelogs for multi-semantic-release, rc, clean-package-json, and preset packages ([a0073c4](https://github.com/anolilab/semantic-release/commit/a0073c4ef4c582dc3514afc42b4ffbd07bf07761))
19
+
20
+
21
+ ### Dependencies
22
+
23
+ * **@anolilab/semantic-release-pnpm:** upgraded to 3.0.0
24
+
25
+ ## @anolilab/semantic-release-clean-package-json [4.0.0-alpha.3](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-clean-package-json@4.0.0-alpha.2...@anolilab/semantic-release-clean-package-json@4.0.0-alpha.3) (2025-11-20)
26
+
27
+ ### Miscellaneous Chores
28
+
29
+ * **release:** update changelogs for multi-semantic-release, rc, clean-package-json, and preset packages ([a0073c4](https://github.com/anolilab/semantic-release/commit/a0073c4ef4c582dc3514afc42b4ffbd07bf07761))
30
+
31
+
32
+ ### Dependencies
33
+
34
+ * **@anolilab/semantic-release-pnpm:** upgraded to 3.0.0-alpha.3
35
+
1
36
  ## @anolilab/semantic-release-clean-package-json [4.0.0-alpha.2](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-clean-package-json@4.0.0-alpha.1...@anolilab/semantic-release-clean-package-json@4.0.0-alpha.2) (2025-10-21)
2
37
 
3
38
  ### Bug Fixes
@@ -26,6 +61,17 @@
26
61
 
27
62
  * **@anolilab/semantic-release-pnpm:** upgraded to 3.0.0-alpha.1
28
63
 
64
+ ## @anolilab/semantic-release-clean-package-json [3.0.5](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-clean-package-json@3.0.4...@anolilab/semantic-release-clean-package-json@3.0.5) (2025-11-01)
65
+
66
+ ### Bug Fixes
67
+
68
+ * update package dependencies and configurations ([d94ebd8](https://github.com/anolilab/semantic-release/commit/d94ebd8869c34106aa0c11beb0f7410bbc86367f))
69
+
70
+
71
+ ### Dependencies
72
+
73
+ * **@anolilab/semantic-release-pnpm:** upgraded to 2.0.5
74
+
29
75
  ## @anolilab/semantic-release-clean-package-json [3.0.4](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-clean-package-json@3.0.3...@anolilab/semantic-release-clean-package-json@3.0.4) (2025-09-22)
30
76
 
31
77
  ### Bug Fixes
@@ -147,31 +193,23 @@
147
193
 
148
194
  * **@anolilab/semantic-release-pnpm:** upgraded to 1.1.9
149
195
 
150
- ## @anolilab/semantic-release-clean-package-json 1.0.0 (2025-01-16)
151
-
152
- ### Features
153
-
154
- * new clean-package-json package for semantic-release ([#106](https://github.com/anolilab/semantic-release/issues/106)) ([94218d7](https://github.com/anolilab/semantic-release/commit/94218d72b21e698f46b96749d9216209782d381a))
196
+ ## @anolilab/semantic-release-clean-package-json [1.0.0-alpha.2](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-clean-package-json@1.0.0-alpha.1...@anolilab/semantic-release-clean-package-json@1.0.0-alpha.2) (2025-01-16)
155
197
 
156
198
  ### Bug Fixes
157
199
 
158
200
  * changed plugin order to not publish cleaned package.json to GitHub ([6673e69](https://github.com/anolilab/semantic-release/commit/6673e69723fd340380250fa2d986e4c37091351f))
159
- * remove usage of aggregate-error library ([e0c6e95](https://github.com/anolilab/semantic-release/commit/e0c6e95b07416d6694fa192ddca96e17a4c1c4b8))
160
- * **semantic-release-clean-package-json:** fixed circular dependency ([93b51f9](https://github.com/anolilab/semantic-release/commit/93b51f9c03503e10f0c0a23dcd55273622b40aa0))
161
- * **semantic-release-clean-package-json:** removed cjs exports, semantic-release don't support both types at the same time ([48c93c0](https://github.com/anolilab/semantic-release/commit/48c93c09cd5d6429b7658bc9a4fc573ea23462e2))
162
201
 
202
+ ## @anolilab/semantic-release-clean-package-json 1.0.0-alpha.1 (2025-01-15)
163
203
 
164
- ### Dependencies
165
-
166
- * **@anolilab/semantic-release-pnpm:** upgraded to 1.1.8
204
+ ### Features
167
205
 
168
- ## @anolilab/semantic-release-clean-package-json [1.0.0-alpha.2](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-clean-package-json@1.0.0-alpha.1...@anolilab/semantic-release-clean-package-json@1.0.0-alpha.2) (2025-01-16)
206
+ * new clean-package-json package for semantic-release ([#106](https://github.com/anolilab/semantic-release/issues/106)) ([94218d7](https://github.com/anolilab/semantic-release/commit/94218d72b21e698f46b96749d9216209782d381a))
169
207
 
170
208
  ### Bug Fixes
171
209
 
172
- * changed plugin order to not publish cleaned package.json to GitHub ([6673e69](https://github.com/anolilab/semantic-release/commit/6673e69723fd340380250fa2d986e4c37091351f))
210
+ * **semantic-release-clean-package-json:** fixed circular dependency ([93b51f9](https://github.com/anolilab/semantic-release/commit/93b51f9c03503e10f0c0a23dcd55273622b40aa0))
173
211
 
174
- ## @anolilab/semantic-release-clean-package-json 1.0.0-alpha.1 (2025-01-15)
212
+ ## @anolilab/semantic-release-clean-package-json 1.0.0 (2025-01-16)
175
213
 
176
214
  ### Features
177
215
 
@@ -179,4 +217,12 @@
179
217
 
180
218
  ### Bug Fixes
181
219
 
220
+ * changed plugin order to not publish cleaned package.json to GitHub ([6673e69](https://github.com/anolilab/semantic-release/commit/6673e69723fd340380250fa2d986e4c37091351f))
221
+ * remove usage of aggregate-error library ([e0c6e95](https://github.com/anolilab/semantic-release/commit/e0c6e95b07416d6694fa192ddca96e17a4c1c4b8))
182
222
  * **semantic-release-clean-package-json:** fixed circular dependency ([93b51f9](https://github.com/anolilab/semantic-release/commit/93b51f9c03503e10f0c0a23dcd55273622b40aa0))
223
+ * **semantic-release-clean-package-json:** removed cjs exports, semantic-release don't support both types at the same time ([48c93c0](https://github.com/anolilab/semantic-release/commit/48c93c09cd5d6429b7658bc9a4fc573ea23462e2))
224
+
225
+
226
+ ### Dependencies
227
+
228
+ * **@anolilab/semantic-release-pnpm:** upgraded to 1.1.8
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var w=Object.defineProperty;var r=(s,e)=>w(s,"name",{value:e,configurable:!0});import{createRequire as b}from"node:module";import{findUp as E,readJson as f,writeJson as p,isAccessible as N}from"@visulima/fs";import{resolve as g,join as c}from"@visulima/path";import{NotFoundError as P}from"@visulima/fs/error";import O from"@semantic-release/error";const h=b(import.meta.url),y=r(s=>{if(process.versions?.node){const[e,o]=process.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return process.getBuiltinModule(s)}return h(s)},"__cjs_getBuiltinModule"),J=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,{rm:v}=y("node:fs/promises"),_=["name","version","private","publishConfig","scripts.preinstall","scripts.install","scripts.postinstall","scripts.dependencies","files","bin","browser","main","man","jsdelivr","unpkg","dependencies","peerDependencies","peerDependenciesMeta","bundledDependencies","optionalDependencies","engines","os","cpu","description","keywords","author","contributors","license","homepage","repository","bugs","funding","type","exports","imports","sponsor","publisher","displayName","categories","galleryBanner","preview","contributes","activationEvents","badges","markdown","qna","extensionPack","extensionDependencies","extensionKind","icon","fesm2020","fesm2015","esm2020","es2020","types","typings","typesVersions","module","sideEffects"];var R=Object.defineProperty,l=r((s,e)=>R(s,"name",{value:e,configurable:!0}),"e");const K={ENOPKG:l(()=>({details:"A [package.json file](https://docs.npmjs.com/files/package.json) at the root of your project is required to release on npm.\nPlease follow the [npm guideline](https://docs.npmjs.com/getting-started/creating-node-modules) to create a valid `package.json` file.",message:"Missing `package.json` file."}),"ENOPKG"),ENOPKGNAME:l(()=>({details:"The `package.json`'s [name](https://docs.npmjs.com/files/package.json#name) property is required in order to publish a package to the npm registry.\nPlease make sure to add a valid `name` for your package in your `package.json`.",message:"Missing `name` property in `package.json`."}),"ENOPKGNAME")};var M=Object.defineProperty,A=r((s,e)=>M(s,"name",{value:e,configurable:!0}),"o");const u=A((s,e={})=>{const{details:o,message:t}=K[s](e);return new O(t,s,o)},"getError");var $=Object.defineProperty,m=r((s,e)=>$(s,"name",{value:e,configurable:!0}),"n");const q=m(async s=>{const e={type:"file"};s&&(e.cwd=s);const o=await E("package.json",e);if(!o)throw new P("No such file or directory, for package.json found.");return{packageJson:await f(o),path:o}},"findPackageJson"),k=m(async({pkgRoot:s},{cwd:e})=>{try{const{packageJson:o}=await q(s?g(e,s):e);if(!o.name){const t=u("ENOPKGNAME");throw new AggregateError([t],t.message)}return o}catch(o){if(o.code==="ENOENT"){const t=u("ENOPKG");throw new AggregateError([t],t.message)}throw o}},"getPackage");var G=Object.defineProperty,j=r((s,e)=>G(s,"name",{value:e,configurable:!0}),"c");const F=j(async(s,e)=>{const o=await k(s,e),t=s.pkgRoot?g(e.cwd,s.pkgRoot):e.cwd;await p(c(t,"package.json.back"),o,{detectIndent:!0}),e.logger.log("Created a backup of the package.json file.");const a=new Set([..._,...s.keep??[]]);e.logger.log(`Keeping the following properties: ${[...a].join(", ")}`);const n={...o};for(const i in n)if(!a.has(i)){if(i==="scripts"){for(const d in n.scripts)a.has(`${i}.${d}`)||delete n.scripts[d];if(n.scripts&&Object.keys(n.scripts).length>0)continue}e.logger.log(`Removing property "${i}"`),delete n[i]}await p(c(t,"package.json"),n,{detectIndent:!0})},"publish"),S=j(async(s,e)=>{const o=s.pkgRoot?g(e.cwd,s.pkgRoot):e.cwd,t=c(o,"package.json.back");if(await N(t)){const a=await k(s,e),n=await f(t);n.version=a.version,await p(c(o,"package.json"),n,{detectIndent:!0,overwrite:!0}),await v(t),e.logger.log("Restored modified package.json from backup.")}else e.logger.error("No backup package.json found.")},"success");export{F as publish,S as success};
1
+ var b=Object.defineProperty;var r=(s,e)=>b(s,"name",{value:e,configurable:!0});import{createRequire as y}from"node:module";import{findUp as N,readJson as m,writeJson as g,isAccessible as P}from"@visulima/fs";import{resolve as d,join as p}from"@visulima/path";import{NotFoundError as O}from"@visulima/fs/error";import _ from"@semantic-release/error";const h=y(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,v=r(s=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[e,o]=c.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return c.getBuiltinModule(s)}return h(s)},"__cjs_getBuiltinModule"),{rm:E}=v("node:fs/promises"),R=["name","version","private","publishConfig","scripts.preinstall","scripts.install","scripts.postinstall","scripts.dependencies","files","bin","browser","main","man","jsdelivr","unpkg","dependencies","peerDependencies","peerDependenciesMeta","bundledDependencies","optionalDependencies","engines","os","cpu","description","keywords","author","contributors","license","homepage","repository","bugs","funding","type","exports","imports","sponsor","publisher","displayName","categories","galleryBanner","preview","contributes","activationEvents","badges","markdown","qna","extensionPack","extensionDependencies","extensionKind","icon","fesm2020","fesm2015","esm2020","es2020","types","typings","typesVersions","module","sideEffects"];var K=Object.defineProperty,u=r((s,e)=>K(s,"name",{value:e,configurable:!0}),"e");const M={ENOPKG:u(()=>({details:"A [package.json file](https://docs.npmjs.com/files/package.json) at the root of your project is required to release on npm.\nPlease follow the [npm guideline](https://docs.npmjs.com/getting-started/creating-node-modules) to create a valid `package.json` file.",message:"Missing `package.json` file."}),"ENOPKG"),ENOPKGNAME:u(()=>({details:"The `package.json`'s [name](https://docs.npmjs.com/files/package.json#name) property is required in order to publish a package to the npm registry.\nPlease make sure to add a valid `name` for your package in your `package.json`.",message:"Missing `name` property in `package.json`."}),"ENOPKGNAME")};var A=Object.defineProperty,$=r((s,e)=>A(s,"name",{value:e,configurable:!0}),"o");const f=$((s,e={})=>{const{details:o,message:t}=M[s](e);return new _(t,s,o)},"getError");var q=Object.defineProperty,k=r((s,e)=>q(s,"name",{value:e,configurable:!0}),"n");const G=k(async s=>{const e={type:"file"};s&&(e.cwd=s);const o=await N("package.json",e);if(!o)throw new O("No such file or directory, for package.json found.");return{packageJson:await m(o),path:o}},"findPackageJson"),j=k(async({pkgRoot:s},{cwd:e})=>{try{const{packageJson:o}=await G(s?d(e,s):e);if(!o.name){const t=f("ENOPKGNAME");throw new AggregateError([t],t.message)}return o}catch(o){if(o.code==="ENOENT"){const t=f("ENOPKG");throw new AggregateError([t],t.message)}throw o}},"getPackage");var x=Object.defineProperty,w=r((s,e)=>x(s,"name",{value:e,configurable:!0}),"c");const F=w(async(s,e)=>{const o=await j(s,e),t=s.pkgRoot?d(e.cwd,s.pkgRoot):e.cwd;await g(p(t,"package.json.back"),o,{detectIndent:!0}),e.logger.log("Created a backup of the package.json file.");const a=new Set([...R,...s.keep??[]]);e.logger.log(`Keeping the following properties: ${[...a].join(", ")}`);const n={...o};for(const i in n)if(!a.has(i)){if(i==="scripts"){for(const l in n.scripts)a.has(`${i}.${l}`)||delete n.scripts[l];if(n.scripts&&Object.keys(n.scripts).length>0)continue}e.logger.log(`Removing property "${i}"`),delete n[i]}await g(p(t,"package.json"),n,{detectIndent:!0})},"publish"),S=w(async(s,e)=>{const o=s.pkgRoot?d(e.cwd,s.pkgRoot):e.cwd,t=p(o,"package.json.back");if(await P(t)){const a=await j(s,e),n=await m(t);n.version=a.version,await g(p(o,"package.json"),n,{detectIndent:!0,overwrite:!0}),await E(t),e.logger.log("Restored modified package.json from backup.")}else e.logger.error("No backup package.json found.")},"success");export{F as publish,S as success};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anolilab/semantic-release-clean-package-json",
3
- "version": "4.0.0-alpha.2",
3
+ "version": "4.0.0",
4
4
  "description": "Clean package.json before publish by removing unnecessary properties",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -45,9 +45,9 @@
45
45
  ],
46
46
  "dependencies": {
47
47
  "@semantic-release/error": "^4.0.0",
48
- "@visulima/fs": "^4.0.2",
49
- "@visulima/path": "^2.0.1",
50
- "type-fest": "^5.1.0"
48
+ "@visulima/fs": "^4.0.4",
49
+ "@visulima/path": "^2.0.3",
50
+ "type-fest": "^5.2.0"
51
51
  },
52
52
  "engines": {
53
53
  "node": "^22.14.0 || >=24.10.0"