joist-codegen 2.1.0-next.14 → 2.1.0-next.15

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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=v2_1_0_rename_has_async_property.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2_1_0_rename_has_async_property.test.d.ts","sourceRoot":"","sources":["../../../src/codemods/__tests__/v2_1_0_rename_has_async_property.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const testUtils_1 = require("jscodeshift/src/testUtils");
4
+ describe("v2_1_0_rename_has_async_property", () => {
5
+ (0, testUtils_1.defineTest)(__dirname, "v2_1_0_rename_has_async_property", null, "v2_1_0_rename_has_async_property", {
6
+ parser: "ts",
7
+ });
8
+ });
9
+ //# sourceMappingURL=v2_1_0_rename_has_async_property.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2_1_0_rename_has_async_property.test.js","sourceRoot":"","sources":["../../../src/codemods/__tests__/v2_1_0_rename_has_async_property.test.ts"],"names":[],"mappings":";;AAAA,yDAAuD;AAEvD,QAAQ,CAAC,kCAAkC,EAAE,GAAG,EAAE;IAChD,IAAA,sBAAU,EAAC,SAAS,EAAE,kCAAkC,EAAE,IAAI,EAAE,kCAAkC,EAAE;QAClG,MAAM,EAAE,IAAI;KACb,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codemods/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAQnC,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiDtE;AAED,wBAAgB,cAAc,IAAI,MAAM,CAIvC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codemods/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AASnC,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiDtE;AAED,wBAAgB,cAAc,IAAI,MAAM,CAIvC"}
@@ -12,6 +12,7 @@ const v1_148_0_move_codegen_files_1 = require("./v1_148_0_move_codegen_files");
12
12
  const v1_151_0_rename_derived_async_reference_1 = require("./v1_151_0_rename_derived_async_reference");
13
13
  const v1_226_0_rename_current_txn_knex_1 = require("./v1_226_0_rename_current_txn_knex");
14
14
  const v1_245_0_upsert_rename_1 = require("./v1_245_0_upsert_rename");
15
+ const v2_1_0_rename_has_async_property_1 = require("./v2_1_0_rename_has_async_property");
15
16
  async function maybeRunTransforms(config) {
16
17
  const { confirm } = await import("@inquirer/prompts");
17
18
  const confVersion = config.version;
@@ -66,6 +67,7 @@ function findApplyableCodemods(prevVersion) {
66
67
  v1_151_0_rename_derived_async_reference_1.v1_151_0_rename_derived_reference,
67
68
  v1_226_0_rename_current_txn_knex_1.v1_226_0_rename_current_txn_knex,
68
69
  v1_245_0_upsert_rename_1.v1_245_0_upsert_rename,
70
+ v2_1_0_rename_has_async_property_1.v2_1_0_rename_has_async_property,
69
71
  ].filter((t) => semver_1.default.lt(prevVersion, t.version));
70
72
  }
71
73
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/codemods/index.ts"],"names":[],"mappings":";;;;;AAUA,gDAiDC;AAED,wCAIC;AAjED,oDAA4B;AAC5B,oDAAkE;AAGlE,qGAAkG;AAClG,+EAA4E;AAC5E,uGAA8F;AAC9F,yFAAsF;AACtF,qEAAkE;AAE3D,KAAK,UAAU,kBAAkB,CAAC,MAAc;IACrD,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,CAAC;IACt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AO,CAAC,GAAG,CACT,4BAA4B,WAAW,kBAAkB,IAAI,CAAC,MAAM,gCAAgC,WAAW,GAAG,CACnH,CAAC;IAEF,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC;QACxB,OAAO,EAAE,6BAA6B;KACvC,CAAC,CAAC;IAEH,iBAAiB;IACjB,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,CAAC,OAAO,GAAG,WAAW,CAAC;QAC7B,OAAO;IACT,CAAC;IAED,qBAAqB;IACrB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC;YACxB,OAAO,EAAE,sBAAsB,GAAG,CAAC,WAAW,GAAG;SAClD,CAAC,CAAC;QACH,IAAI,CAAC,GAAG;YAAE,SAAS;QACnB,MAAM,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,iCAAiC,WAAW,GAAG,CAAC,CAAC;IAE7D,yEAAyE;IACzE,MAAM,CAAC,OAAO,GAAG,WAAW,CAAC;AAC/B,CAAC;AAED,SAAgB,cAAc;IAC5B,yFAAyF;IACzF,wFAAwF;IACxF,OAAO,IAAA,8CAA8B,EAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC,CAAC;AAC/E,CAAC;AAED,SAAS,qBAAqB,CAAC,WAAmB;IAChD,OAAO;QACL,+EAAsC;QACtC,yDAA2B;QAC3B,2EAAiC;QACjC,mEAAgC;QAChC,+CAAsB;QACtB,mEAAgC;KACjC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAM,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;AACrD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Transform } from "jscodeshift";
2
+ import { JscodeshiftMod } from "./JscodeshiftMod";
3
+ export declare const v2_1_0_rename_has_async_property: JscodeshiftMod;
4
+ /** Find/replace the various `*AsyncProperty*` symbols with their `*Property*` counterparts. */
5
+ declare const transform: Transform;
6
+ export default transform;
7
+ //# sourceMappingURL=v2_1_0_rename_has_async_property.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2_1_0_rename_has_async_property.d.ts","sourceRoot":"","sources":["../../src/codemods/v2_1_0_rename_has_async_property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAO,MAAM,gCAAgC,gBAK5C,CAAC;AAWF,+FAA+F;AAC/F,QAAA,MAAM,SAAS,EAAE,SAShB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.v2_1_0_rename_has_async_property = void 0;
4
+ const JscodeshiftMod_1 = require("./JscodeshiftMod");
5
+ exports.v2_1_0_rename_has_async_property = new JscodeshiftMod_1.JscodeshiftMod("2.1.0", "v2_1_0_rename_has_async_property", "Rename `hasAsyncProperty` to `hasProperty`", (config) => `${config.entitiesDirectory}/*.ts`);
6
+ const renames = {
7
+ hasAsyncProperty: "hasProperty",
8
+ hasReactiveAsyncProperty: "hasReactiveProperty",
9
+ AsyncProperty: "Property",
10
+ AsyncPropertyImpl: "PropertyImpl",
11
+ isAsyncProperty: "isProperty",
12
+ isLoadedAsyncProperty: "isLoadedProperty",
13
+ };
14
+ /** Find/replace the various `*AsyncProperty*` symbols with their `*Property*` counterparts. */
15
+ const transform = (file, api) => {
16
+ const j = api.jscodeshift;
17
+ return j(file.source)
18
+ .find(j.Identifier)
19
+ .filter(({ node }) => node.name in renames)
20
+ .forEach((path) => {
21
+ j(path).replaceWith(j.identifier(renames[path.node.name]));
22
+ })
23
+ .toSource();
24
+ };
25
+ exports.default = transform;
26
+ //# sourceMappingURL=v2_1_0_rename_has_async_property.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2_1_0_rename_has_async_property.js","sourceRoot":"","sources":["../../src/codemods/v2_1_0_rename_has_async_property.ts"],"names":[],"mappings":";;;AACA,qDAAkD;AAErC,QAAA,gCAAgC,GAAG,IAAI,+BAAc,CAChE,OAAO,EACP,kCAAkC,EAClC,4CAA4C,EAC5C,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,iBAAiB,OAAO,CAC/C,CAAC;AAEF,MAAM,OAAO,GAA2B;IACtC,gBAAgB,EAAE,aAAa;IAC/B,wBAAwB,EAAE,qBAAqB;IAC/C,aAAa,EAAE,UAAU;IACzB,iBAAiB,EAAE,cAAc;IACjC,eAAe,EAAE,YAAY;IAC7B,qBAAqB,EAAE,kBAAkB;CAC1C,CAAC;AAEF,+FAA+F;AAC/F,MAAM,SAAS,GAAc,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;IACzC,MAAM,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC;IAC1B,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;SAClB,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;SAClB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC;SAC1C,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAChB,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC,CAAC;SACD,QAAQ,EAAE,CAAC;AAChB,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joist-codegen",
3
- "version": "2.1.0-next.14",
3
+ "version": "2.1.0-next.15",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,7 +17,7 @@
17
17
  "build"
18
18
  ],
19
19
  "peerDependencies": {
20
- "joist-utils": "2.1.0-next.14",
20
+ "joist-utils": "2.1.0-next.15",
21
21
  "knex": "^3.1.0",
22
22
  "pg": "^8.16.3"
23
23
  },