@openrewrite/recipes-nodejs 0.53.1 → 0.55.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.
@@ -1 +1 @@
1
- {"version":3,"file":"fs-access-constants.d.ts","sourceRoot":"","sources":["../../src/migrate/fs-access-constants.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,gBAAgB,EAAM,MAAM,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAOtF,qBAAa,wBAAyB,SAAQ,MAAM;IAChD,QAAQ,CAAC,IAAI,iEAAgE;IAC7E,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAyF;IACrH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAA4O;IACxQ,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAe;IAEhC,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;CAoD9D"}
1
+ {"version":3,"file":"fs-access-constants.d.ts","sourceRoot":"","sources":["../../src/migrate/fs-access-constants.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,gBAAgB,EAAM,MAAM,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAOtF,qBAAa,wBAAyB,SAAQ,MAAM;IAChD,QAAQ,CAAC,IAAI,iEAAgE;IAC7E,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAyF;IACrH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAA0O;IACtQ,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAe;IAEhC,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;CAoD9D"}
@@ -18,7 +18,7 @@ class ReplaceFsAccessConstants extends rewrite_1.Recipe {
18
18
  super(...arguments);
19
19
  this.name = "org.openrewrite.node.migrate.fs.replace-fs-access-constants";
20
20
  this.displayName = "Replace deprecated `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK` with `fs.constants.*`";
21
- this.description = "Replace deprecated file access constants (`fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK`) with their equivalents from `fs.constants`. These constants were removed in Node.js v24+ and should be accessed through the constants namespace.";
21
+ this.description = "Replace deprecated file access constants (`fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK`) with their equivalents from `fs.constants`. These constants were removed in Node.js 25 and should be accessed through the constants namespace.";
22
22
  this.tags = ["DEP0176"];
23
23
  }
24
24
  editor() {
@@ -1 +1 @@
1
- {"version":3,"file":"fs-access-constants.js","sourceRoot":"","sources":["../../src/migrate/fs-access-constants.ts"],"names":[],"mappings":";;;;;;;;;;;;AAKA,kDAAsF;AACtF,gEAAsF;AACtF,oDAAkD;AAKlD,MAAa,wBAAyB,SAAQ,gBAAM;IAApD;;QACa,SAAI,GAAG,6DAA6D,CAAA;QACpE,gBAAW,GAAW,qFAAqF,CAAC;QAC5G,gBAAW,GAAW,wOAAwO,CAAC;QAC/P,SAAI,GAAa,CAAC,SAAS,CAAC,CAAC;IAsD1C,CAAC;IApDS,MAAM;;YACR,OAAO,IAAA,eAAK,EAAC,IAAA,YAAE,EAAC,IAAA,qBAAQ,EAAC,IAAI,CAAC,EAAE,IAAA,qBAAQ,EAAC,SAAS,CAAC,CAAC,EAAE,IAAI,KAAM,SAAQ,8BAAmC;gBAG/F,kBAAkB,CAAC,WAA0B;oBACjD,MAAM,YAAY,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;oBAGzD,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;wBAC3D,OAAO,KAAK,CAAC;oBACjB,CAAC;oBAGD,IAAI,WAAW,CAAC,MAAM,CAAC,IAAI,KAAK,QAAC,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;wBAChD,MAAM,UAAU,GAAG,WAAW,CA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AA,qBAAQ,EAAA,GAAG,YAAY,iBAAiB,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;4BACpF,CAAC;wBACL,CAAC;wBAED,OAAO,KAAK,CAAC;oBACjB,CAAC;iBAAA;aACJ,CAAC,CAAC;QACP,CAAC;KAAA;CACJ;AA1DD,4DA0DC"}
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-node-26.d.ts","sourceRoot":"","sources":["../../src/migrate/upgrade-node-26.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AA4B5C,qBAAa,aAAc,SAAQ,MAAM;IACrC,QAAQ,CAAC,IAAI,kDAAkD;IAC/D,QAAQ,CAAC,WAAW,2BAA2B;IAC/C,QAAQ,CAAC,WAAW,2IAA2I;IAEzJ,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAUxC"}
1
+ {"version":3,"file":"upgrade-node-26.d.ts","sourceRoot":"","sources":["../../src/migrate/upgrade-node-26.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAgC5C,qBAAa,aAAc,SAAQ,MAAM;IACrC,QAAQ,CAAC,IAAI,kDAAkD;IAC/D,QAAQ,CAAC,WAAW,2BAA2B;IAC/C,QAAQ,CAAC,WAAW,2IAA2I;IAEzJ,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAUxC"}
@@ -22,9 +22,13 @@ const find_duplex_to_web_type_1 = require("./find-duplex-to-web-type");
22
22
  const find_module_register_1 = require("./find-module-register");
23
23
  const find_fs_rmdir_recursive_1 = require("./find-fs-rmdir-recursive");
24
24
  const crypto_rsa_pss_key_pair_options_1 = require("./crypto-rsa-pss-key-pair-options");
25
+ const slow_buffer_1 = require("./slow-buffer");
26
+ const fs_access_constants_1 = require("./fs-access-constants");
25
27
  const node26EolDeprecations = [
28
+ new slow_buffer_1.ReplaceSlowBuffer(),
26
29
  new find_fs_rmdir_recursive_1.FindFsRmdirRecursive(),
27
30
  new crypto_rsa_pss_key_pair_options_1.ReplaceRsaPssKeyPairOptions(),
31
+ new fs_access_constants_1.ReplaceFsAccessConstants(),
28
32
  new server_response_write_header_1.ReplaceServerResponseWriteHeader(),
29
33
  new stream_internal_modules_1.ReplaceStreamInternalModules(),
30
34
  new find_aead_decipheriv_without_auth_tag_length_1.FindAeadDecipherivWithoutAuthTagLength(),
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-node-26.js","sourceRoot":"","sources":["../../src/migrate/upgrade-node-26.ts"],"names":[],"mappings":";;;;;;;;;;;;AAKA,kDAA4C;AAC5C,kDAA2D;AAC3D,uDAAgD;AAChD,iFAAyE;AACzE,qHAA0G;AAC1G,uEAAuE;AACvE,iFAAgF;AAChF,iHAAsG;AACtG,uEAA8D;AAC9D,iEAA0D;AAC1D,uEAA+D;AAC/D,uFAA8E;AAG9E,MAAM,qBAAqB,GAAa;IACpC,IAAI,8CAAoB,EAAE;IAC1B,IAAI,6DAA2B,EAAE;IACjC,IAAI,+DAAgC,EAAE;IACtC,IAAI,sDAA4B,EAAE;IAClC,IAAI,qFAAsC,EAAE;CAC/C,CAAC;AAGF,MAAM,yBAAyB,GAAa;IACxC,IAAI,6CAAmB,EAAE;IACzB,IAAI,yCAAkB,EAAE;CAC3B,CAAC;AAEF,MAAa,aAAc,SAAQ,gBAAM;IAAzC;;QACa,SAAI,GAAG,8CAA8C,CAAC;QACtD,gBAAW,GAAG,uBAAuB,CAAC;QACtC,gBAAW,GAAG,uIAAuI,CAAC;IAYnK,CAAC;IAVS,UAAU;;YACZ,OAAO;gBACH,IAAI,wDAAyB,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;gBAC9C,IAAI,yFAAwC,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;gBAC7D,MAAM,IAAA,uBAAiB,EAAC,mDAAmD,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC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,CAAC;KAAA;CACJ;AAfD,sCAeC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrewrite/recipes-nodejs",
3
- "version": "0.53.1",
3
+ "version": "0.55.0",
4
4
  "license": "Moderne Proprietary",
5
5
  "description": "OpenRewrite recipes for Node.js library migrations.",
6
6
  "homepage": "https://github.com/moderneinc/rewrite-node",
@@ -25,7 +25,7 @@
25
25
  "ci:test": "jest"
26
26
  },
27
27
  "dependencies": {
28
- "@openrewrite/rewrite": "^8.94.0",
28
+ "@openrewrite/rewrite": "^8.96.0",
29
29
  "mutative": "^1.1.0",
30
30
  "semver": "^7.7.3"
31
31
  },
@@ -13,7 +13,7 @@ import {J, Type} from "@openrewrite/rewrite/java";
13
13
  export class ReplaceFsAccessConstants extends Recipe {
14
14
  readonly name = "org.openrewrite.node.migrate.fs.replace-fs-access-constants"
15
15
  readonly displayName: string = "Replace deprecated `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK` with `fs.constants.*`";
16
- readonly description: string = "Replace deprecated file access constants (`fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK`) with their equivalents from `fs.constants`. These constants were removed in Node.js v24+ and should be accessed through the constants namespace.";
16
+ readonly description: string = "Replace deprecated file access constants (`fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK`) with their equivalents from `fs.constants`. These constants were removed in Node.js 25 and should be accessed through the constants namespace.";
17
17
  readonly tags: string[] = ["DEP0176"];
18
18
 
19
19
  async editor(): Promise<TreeVisitor<any, ExecutionContext>> {
@@ -15,11 +15,15 @@ import {FindDuplexToWebType} from "./find-duplex-to-web-type";
15
15
  import {FindModuleRegister} from "./find-module-register";
16
16
  import {FindFsRmdirRecursive} from "./find-fs-rmdir-recursive";
17
17
  import {ReplaceRsaPssKeyPairOptions} from "./crypto-rsa-pss-key-pair-options";
18
+ import {ReplaceSlowBuffer} from "./slow-buffer";
19
+ import {ReplaceFsAccessConstants} from "./fs-access-constants";
18
20
 
19
21
  // Node 26 End-of-Life deprecations (includes v25 EOL)
20
22
  const node26EolDeprecations: Recipe[] = [
23
+ new ReplaceSlowBuffer(), // DEP0030: SlowBuffer (v25 EOL)
21
24
  new FindFsRmdirRecursive(), // DEP0147: fs.rmdir(path, { recursive: true }) (v25 EOL)
22
25
  new ReplaceRsaPssKeyPairOptions(), // DEP0154: RSA-PSS hash and mgf1Hash options (v25 EOL)
26
+ new ReplaceFsAccessConstants(), // DEP0176: fs.F_OK, fs.R_OK, fs.W_OK, fs.X_OK (v25 EOL)
23
27
  new ReplaceServerResponseWriteHeader(), // DEP0063: ServerResponse.writeHeader() (v26 EOL)
24
28
  new ReplaceStreamInternalModules(), // DEP0125: legacy _stream_* modules (v26 EOL)
25
29
  new FindAeadDecipherivWithoutAuthTagLength(), // DEP0182: short GCM auth tags (v26 EOL)