@openrewrite/recipes-nodejs 0.35.0-20251201-132325 → 0.35.0-20251201-142102

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":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAmBpD,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,cAAc,QAiBhD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAoBpD,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,cAAc,QAkBhD"}
package/dist/index.js CHANGED
@@ -15,6 +15,7 @@ const process_exit_code_1 = require("./migrate/process-exit-code");
15
15
  const dirent_path_1 = require("./migrate/dirent-path");
16
16
  const util_types_wasm_1 = require("./migrate/util-types-wasm");
17
17
  const zlib_bytes_read_1 = require("./migrate/zlib-bytes-read");
18
+ const fs_truncate_1 = require("./migrate/fs-truncate");
18
19
  const upgrade_node_22_1 = require("./migrate/upgrade-node-22");
19
20
  const upgrade_node_24_1 = require("./migrate/upgrade-node-24");
20
21
  function activate(registry) {
@@ -32,6 +33,7 @@ function activate(registry) {
32
33
  registry.register(dirent_path_1.ReplaceDirentPath);
33
34
  registry.register(util_types_wasm_1.ReplaceIsWebAssemblyCompiledModule);
34
35
  registry.register(zlib_bytes_read_1.ReplaceZlibBytesRead);
36
+ registry.register(fs_truncate_1.ReplaceFsTruncateWithFd);
35
37
  registry.register(upgrade_node_22_1.UpgradeNode22);
36
38
  registry.register(upgrade_node_24_1.UpgradeNode24);
37
39
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAmBA,4BAiBC;AAnCD,qEA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rewrite/rewrite";
2
+ export declare class ReplaceFsTruncateWithFd extends Recipe {
3
+ readonly name = "org.openrewrite.node.migrate.fs.replace-fs-truncate-fd";
4
+ readonly displayName: string;
5
+ readonly description: string;
6
+ readonly tags: string[];
7
+ editor(): Promise<TreeVisitor<any, ExecutionContext>>;
8
+ }
9
+ //# sourceMappingURL=fs-truncate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs-truncate.d.ts","sourceRoot":"","sources":["../../src/migrate/fs-truncate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAE,MAAM,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAI3E,qBAAa,uBAAwB,SAAQ,MAAM;IAC/C,QAAQ,CAAC,IAAI,4DAA2D;IACxE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAsE;IAClG,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAwM;IACpO,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,CAAe;IAEhC,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;CA4B9D"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ReplaceFsTruncateWithFd = void 0;
13
+ const rewrite_1 = require("@openrewrite/rewrite");
14
+ const javascript_1 = require("@openrewrite/rewrite/javascript");
15
+ const java_1 = require("@openrewrite/rewrite/java");
16
+ class ReplaceFsTruncateWithFd extends rewrite_1.Recipe {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.name = "org.openrewrite.node.migrate.fs.replace-fs-truncate-fd";
20
+ this.displayName = "Replace `fs.truncate()` with file descriptor to `fs.ftruncate()`";
21
+ this.description = "Replace deprecated `fs.truncate(fd, ...)` and `fs.truncateSync(fd, ...)` calls with `fs.ftruncate(fd, ...)` and `fs.ftruncateSync(fd, ...)` when the first argument is a file descriptor (number).";
22
+ this.tags = ["DEP0081"];
23
+ }
24
+ editor() {
25
+ return __awaiter(this, void 0, void 0, function* () {
26
+ return new class extends javascript_1.JavaScriptVisitor {
27
+ constructor() {
28
+ super(...arguments);
29
+ this.truncate = new javascript_1.MethodMatcher("fs truncate(..)");
30
+ this.truncateSync = new javascript_1.MethodMatcher("fs truncateSync(..)");
31
+ }
32
+ visitMethodInvocation(method, p) {
33
+ const _super = Object.create(null, {
34
+ visitMethodInvocation: { get: () => super.visitMethodInvocation }
35
+ });
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ const m = yield _super.visitMethodInvocation.call(this, method, p);
38
+ const args = m.arguments.elements;
39
+ if (args.length < 1)
40
+ return m;
41
+ const firstArg = args[0].element;
42
+ if (firstArg.type !== java_1.Type.Primitive.Double)
43
+ return m;
44
+ if (this.truncate.matches(m.methodType)) {
45
+ const select = m.select.element;
46
+ return yield (0, javascript_1.template) `${select}.ftruncate(${args})`.apply(m, this.cursor);
47
+ }
48
+ if (this.truncateSync.matches(m.methodType)) {
49
+ const select = m.select.element;
50
+ return yield (0, javascript_1.template) `${select}.ftruncateSync(${args})`.apply(m, this.cursor);
51
+ }
52
+ return m;
53
+ });
54
+ }
55
+ };
56
+ });
57
+ }
58
+ }
59
+ exports.ReplaceFsTruncateWithFd = ReplaceFsTruncateWithFd;
60
+ //# sourceMappingURL=fs-truncate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs-truncate.js","sourceRoot":"","sources":["../../src/migrate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AY,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC;4BAC1C,MAAM,MAAM,GAAG,CAAC,CAAC,MAAO,CAAC,OAAO,CAAC;4BACjC,OAAO,MAAM,IAAA,qBAAQ,EAAA,GAAG,MAAM,kBAAkB,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;wBAClF,CAAC;wBAED,OAAO,CAAC,CAAC;oBACb,CAAC;iBAAA;aACJ,CAAC;QACN,CAAC;KAAA;CACJ;AAlCD,0DAkCC"}
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-node-24.d.ts","sourceRoot":"","sources":["../../src/migrate/upgrade-node-24.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAmB5C,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;CAOxC"}
1
+ {"version":3,"file":"upgrade-node-24.d.ts","sourceRoot":"","sources":["../../src/migrate/upgrade-node-24.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAqB5C,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;CAOxC"}
@@ -15,10 +15,12 @@ const util_log_1 = require("./util-log");
15
15
  const zlib_bytes_read_1 = require("./zlib-bytes-read");
16
16
  const crypto_fips_1 = require("./crypto-fips");
17
17
  const dirent_path_1 = require("./dirent-path");
18
+ const fs_truncate_1 = require("./fs-truncate");
18
19
  const upgrade_node_22_1 = require("./upgrade-node-22");
19
20
  const node24EolDeprecations = [
20
21
  new util_log_1.ReplaceUtilLog(),
21
22
  new zlib_bytes_read_1.ReplaceZlibBytesRead(),
23
+ new fs_truncate_1.ReplaceFsTruncateWithFd(),
22
24
  new dirent_path_1.ReplaceDirentPath(),
23
25
  ];
24
26
  const node24RuntimeDeprecations = [
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-node-24.js","sourceRoot":"","sources":["../../src/migrate/upgrade-node-24.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4C;AAC5C,yCAA0C;AAC1C,uDAAuD;AACvD,+CAAgD;AAChD,+CAAgD;AAChD,uDAAgD;AAGhD,MAAM,qBAAqB,GAAa;IACpC,IAAI,yBAAc,EAAE;IACpB,IAAI,sCAAoB,EAAE;IAC1B,IAAI,+BAAiB,EAAE;CAC1B,CAAC;AAGF,MAAM,yBAAyB,GAAa;IACxC,IAAI,+BAAiB,EAAE;CAC1B,CAAC;AAEF,MAAa,aAAc,SAAQ,gBAAM;IAAzC;;QACa,SAAI,GAAG,8CAA8C,CAAC;QACtD,gBAAW,GAAG,uBAAuB,CAAC;QACtC,gBAAW,GAAG,uIAAuI,CAAC;IASnK,CAAC;IAPS,UAAU;;YACZ,OAAO;gBACH,IAAI,+BAAa,EAAE;gBACnB,GAAG,qBAAqB;gBACxB,GAAG,yBAAyB;aAC/B,CAAC;QACN,CAAC;KAAA;CACJ;AAZD,sCAYC"}
1
+ {"version":3,"file":"upgrade-node-24.js","sourceRoot":"","sources":["../../src/migrate/upgrade-node-24.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4C;AAC5C,yCAA0C;AAC1C,uDAAuD;AACvD,+CAAgD;AAChD,+CAAgD;AAChD,+CAAsD;AACtD,uDAAgD;AAGhD,MAAM,qBAAqB,GAAa;IACpC,IAAI,yBAAc,EAAE;IACpB,IAAI,sCAAoB,EAAE;IAC1B,IAAI,qCAAuB,EAAE;IAC7B,IAAI,+BAAiB,EAAE;CAC1B,CAAC;AAGF,MAAM,yBAAyB,GAAa;IACxC,IAAI,+BAAiB,EAAE;CAC1B,CAAC;AAEF,MAAa,aAAc,SAAQ,gBAAM;IAAzC;;QACa,SAAI,GAAG,8CAA8C,CAAC;QACtD,gBAAW,GAAG,uBAAuB,CAAC;QACtC,gBAAW,GAAG,uIAAuI,CAAC;IASnK,CAAC;IAPS,UAAU;;YACZ,OAAO;gBACH,IAAI,+BAAa,EAAE;gBACnB,GAAG,qBAAqB;gBACxB,GAAG,yBAAyB;aAC/B,CAAC;QACN,CAAC;KAAA;CACJ;AAZD,sCAYC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrewrite/recipes-nodejs",
3
- "version": "0.35.0-20251201-132325",
3
+ "version": "0.35.0-20251201-142102",
4
4
  "license": "Moderne Source Available License",
5
5
  "description": "OpenRewrite recipes for Node.js library migrations.",
6
6
  "homepage": "https://github.com/moderneinc/rewrite-node",
package/src/index.ts CHANGED
@@ -13,6 +13,7 @@ import {AvoidImplicitCoercionOfExitCode} from "./migrate/process-exit-code";
13
13
  import {ReplaceDirentPath} from "./migrate/dirent-path";
14
14
  import {ReplaceIsWebAssemblyCompiledModule} from "./migrate/util-types-wasm";
15
15
  import {ReplaceZlibBytesRead} from "./migrate/zlib-bytes-read";
16
+ import {ReplaceFsTruncateWithFd} from "./migrate/fs-truncate";
16
17
  import {UpgradeNode22} from "./migrate/upgrade-node-22";
17
18
  import {UpgradeNode24} from "./migrate/upgrade-node-24";
18
19
 
@@ -32,6 +33,7 @@ export function activate(registry: RecipeRegistry) {
32
33
  registry.register(ReplaceDirentPath);
33
34
  registry.register(ReplaceIsWebAssemblyCompiledModule);
34
35
  registry.register(ReplaceZlibBytesRead);
36
+ registry.register(ReplaceFsTruncateWithFd);
35
37
  registry.register(UpgradeNode22);
36
38
  registry.register(UpgradeNode24);
37
39
  }
@@ -0,0 +1,39 @@
1
+ import {ExecutionContext, Recipe, TreeVisitor} from "@openrewrite/rewrite";
2
+ import {JavaScriptVisitor, MethodMatcher, template} from "@openrewrite/rewrite/javascript";
3
+ import {J, Type} from "@openrewrite/rewrite/java";
4
+
5
+ export class ReplaceFsTruncateWithFd extends Recipe {
6
+ readonly name = "org.openrewrite.node.migrate.fs.replace-fs-truncate-fd"
7
+ readonly displayName: string = "Replace `fs.truncate()` with file descriptor to `fs.ftruncate()`";
8
+ readonly description: string = "Replace deprecated `fs.truncate(fd, ...)` and `fs.truncateSync(fd, ...)` calls with `fs.ftruncate(fd, ...)` and `fs.ftruncateSync(fd, ...)` when the first argument is a file descriptor (number).";
9
+ readonly tags: string[] = ["DEP0081"];
10
+
11
+ async editor(): Promise<TreeVisitor<any, ExecutionContext>> {
12
+ return new class extends JavaScriptVisitor<ExecutionContext> {
13
+ truncate = new MethodMatcher("fs truncate(..)");
14
+ truncateSync = new MethodMatcher("fs truncateSync(..)");
15
+
16
+ protected async visitMethodInvocation(method: J.MethodInvocation, p: ExecutionContext): Promise<J | undefined> {
17
+ const m = await super.visitMethodInvocation(method, p) as J.MethodInvocation;
18
+
19
+ const args = m.arguments.elements;
20
+ if (args.length < 1) return m;
21
+
22
+ const firstArg = args[0].element;
23
+ if (firstArg.type !== Type.Primitive.Double) return m;
24
+
25
+ if (this.truncate.matches(m.methodType)) {
26
+ const select = m.select!.element;
27
+ return await template`${select}.ftruncate(${args})`.apply(m, this.cursor);
28
+ }
29
+
30
+ if (this.truncateSync.matches(m.methodType)) {
31
+ const select = m.select!.element;
32
+ return await template`${select}.ftruncateSync(${args})`.apply(m, this.cursor);
33
+ }
34
+
35
+ return m;
36
+ }
37
+ };
38
+ }
39
+ }
@@ -3,12 +3,14 @@ import {ReplaceUtilLog} from "./util-log";
3
3
  import {ReplaceZlibBytesRead} from "./zlib-bytes-read";
4
4
  import {ReplaceCryptoFips} from "./crypto-fips";
5
5
  import {ReplaceDirentPath} from "./dirent-path";
6
+ import {ReplaceFsTruncateWithFd} from "./fs-truncate";
6
7
  import {UpgradeNode22} from "./upgrade-node-22";
7
8
 
8
9
  // Node 24 End-of-Life deprecations (includes v23 EOL)
9
10
  const node24EolDeprecations: Recipe[] = [
10
11
  new ReplaceUtilLog(), // DEP0059: util.log (v23 EOL)
11
12
  new ReplaceZlibBytesRead(), // DEP0108: zlib.bytesRead (v23 EOL)
13
+ new ReplaceFsTruncateWithFd(), // DEP0081: fs.truncate() with fd (v24 EOL)
12
14
  new ReplaceDirentPath(), // DEP0178: dirent.path (v24 EOL)
13
15
  ];
14
16