@typeorm/codemod 1.0.0 → 1.0.1
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/README.md +12 -10
- package/dist/cli/print-guide.js +2 -2
- package/dist/cli/print-summary.js +3 -2
- package/dist/cli/print-summary.js.map +1 -1
- package/dist/cli/print-usage.js +1 -1
- package/dist/cli/print-usage.js.map +1 -1
- package/dist/cli/run-transforms.js +16 -2
- package/dist/cli/run-transforms.js.map +1 -1
- package/dist/dependencies/v1.js +22 -9
- package/dist/dependencies/v1.js.map +1 -1
- package/dist/transforms/ast-helpers.js +150 -14
- package/dist/transforms/ast-helpers.js.map +1 -1
- package/dist/transforms/todo.js +25 -2
- package/dist/transforms/todo.js.map +1 -1
- package/dist/transforms/v1/column-readonly.js +28 -13
- package/dist/transforms/v1/column-readonly.js.map +1 -1
- package/dist/transforms/v1/column-unsigned-numeric.js +6 -8
- package/dist/transforms/v1/column-unsigned-numeric.js.map +1 -1
- package/dist/transforms/v1/column-width-zerofill.js +2 -1
- package/dist/transforms/v1/column-width-zerofill.js.map +1 -1
- package/dist/transforms/v1/connection-manager.js +82 -0
- package/dist/transforms/v1/connection-manager.js.map +1 -0
- package/dist/transforms/v1/connection-options-reader.js +198 -0
- package/dist/transforms/v1/connection-options-reader.js.map +1 -0
- package/dist/transforms/v1/connection-to-datasource.js +285 -56
- package/dist/transforms/v1/connection-to-datasource.js.map +1 -1
- package/dist/transforms/v1/datasource-mongodb.js +40 -28
- package/dist/transforms/v1/datasource-mongodb.js.map +1 -1
- package/dist/transforms/v1/datasource-mssql.js +1 -3
- package/dist/transforms/v1/datasource-mssql.js.map +1 -1
- package/dist/transforms/v1/datasource-mysql-connector.js +3 -0
- package/dist/transforms/v1/datasource-mysql-connector.js.map +1 -1
- package/dist/transforms/v1/datasource-name.js +2 -0
- package/dist/transforms/v1/datasource-name.js.map +1 -1
- package/dist/transforms/v1/datasource-sap.js +21 -8
- package/dist/transforms/v1/datasource-sap.js.map +1 -1
- package/dist/transforms/v1/datasource-sqlite-options.js +48 -13
- package/dist/transforms/v1/datasource-sqlite-options.js.map +1 -1
- package/dist/transforms/v1/datasource-sqlite-type.js +28 -7
- package/dist/transforms/v1/datasource-sqlite-type.js.map +1 -1
- package/dist/transforms/v1/file-logger.js +182 -0
- package/dist/transforms/v1/file-logger.js.map +1 -0
- package/dist/transforms/v1/find-options-join.js +84 -0
- package/dist/transforms/v1/find-options-join.js.map +1 -0
- package/dist/transforms/v1/find-options-lock-modes.js +26 -21
- package/dist/transforms/v1/find-options-lock-modes.js.map +1 -1
- package/dist/transforms/v1/find-options-string-relations.js +2 -0
- package/dist/transforms/v1/find-options-string-relations.js.map +1 -1
- package/dist/transforms/v1/find-options-string-select.js +2 -0
- package/dist/transforms/v1/find-options-string-select.js.map +1 -1
- package/dist/transforms/v1/global-functions.js +92 -64
- package/dist/transforms/v1/global-functions.js.map +1 -1
- package/dist/transforms/v1/index.js +10 -2
- package/dist/transforms/v1/index.js.map +1 -1
- package/dist/transforms/v1/migrations-get-all.js +25 -9
- package/dist/transforms/v1/migrations-get-all.js.map +1 -1
- package/dist/transforms/v1/mongodb-stats.js +3 -0
- package/dist/transforms/v1/mongodb-stats.js.map +1 -1
- package/dist/transforms/v1/query-builder-native-parameters.js +2 -0
- package/dist/transforms/v1/query-builder-native-parameters.js.map +1 -1
- package/dist/transforms/v1/query-builder-on-conflict.js +2 -1
- package/dist/transforms/v1/query-builder-on-conflict.js.map +1 -1
- package/dist/transforms/v1/query-builder-or-update.js +8 -4
- package/dist/transforms/v1/query-builder-or-update.js.map +1 -1
- package/dist/transforms/v1/query-builder-print-sql.js +3 -0
- package/dist/transforms/v1/query-builder-print-sql.js.map +1 -1
- package/dist/transforms/v1/query-builder-replace-property-names.js +3 -0
- package/dist/transforms/v1/query-builder-replace-property-names.js.map +1 -1
- package/dist/transforms/v1/query-runner-loaded-tables-views.js +1 -5
- package/dist/transforms/v1/query-runner-loaded-tables-views.js.map +1 -1
- package/dist/transforms/v1/relation-count.js +75 -12
- package/dist/transforms/v1/relation-count.js.map +1 -1
- package/dist/transforms/v1/repository-abstract.js +2 -5
- package/dist/transforms/v1/repository-abstract.js.map +1 -1
- package/dist/transforms/v1/repository-exist.js +2 -0
- package/dist/transforms/v1/repository-exist.js.map +1 -1
- package/dist/transforms/v1/repository-find-by-ids.js +0 -3
- package/dist/transforms/v1/repository-find-by-ids.js.map +1 -1
- package/dist/transforms/v1/repository-find-one-by-id.js +3 -0
- package/dist/transforms/v1/repository-find-one-by-id.js.map +1 -1
- package/dist/transforms/v1/use-container.js +5 -3
- package/dist/transforms/v1/use-container.js.map +1 -1
- package/package.json +3 -1
- package/dist/cli/colors.d.ts +0 -7
- package/dist/cli/colors.js +0 -12
- package/dist/cli/colors.js.map +0 -1
- package/dist/cli/error.d.ts +0 -1
- package/dist/cli/error.js +0 -11
- package/dist/cli/error.js.map +0 -1
- package/dist/cli/list-transforms.d.ts +0 -1
- package/dist/cli/parse-args.d.ts +0 -10
- package/dist/cli/print-guide.d.ts +0 -1
- package/dist/cli/print-summary.d.ts +0 -17
- package/dist/cli/print-todos.d.ts +0 -1
- package/dist/cli/print-usage.d.ts +0 -1
- package/dist/cli/run-dependencies.d.ts +0 -6
- package/dist/cli/run-transforms.d.ts +0 -21
- package/dist/cli/run.d.ts +0 -9
- package/dist/dependencies/config.d.ts +0 -24
- package/dist/dependencies/find-package-json.d.ts +0 -5
- package/dist/dependencies/index.d.ts +0 -5
- package/dist/dependencies/upgrade.d.ts +0 -11
- package/dist/dependencies/v1.d.ts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/lib/colors.d.ts +0 -9
- package/dist/lib/error.d.ts +0 -1
- package/dist/lib/format-time.d.ts +0 -1
- package/dist/lib/highlight.d.ts +0 -1
- package/dist/lib/spinner.d.ts +0 -5
- package/dist/transforms/ast-helpers.d.ts +0 -50
- package/dist/transforms/index.d.ts +0 -7
- package/dist/transforms/resolve.d.ts +0 -1
- package/dist/transforms/scan.d.ts +0 -4
- package/dist/transforms/scan.js +0 -33
- package/dist/transforms/scan.js.map +0 -1
- package/dist/transforms/stats.d.ts +0 -11
- package/dist/transforms/todo.d.ts +0 -2
- package/dist/transforms/transformer.d.ts +0 -8
- package/dist/transforms/v1/column-readonly.d.ts +0 -6
- package/dist/transforms/v1/column-unsigned-numeric.d.ts +0 -6
- package/dist/transforms/v1/column-width-zerofill.d.ts +0 -6
- package/dist/transforms/v1/connection-to-datasource.d.ts +0 -6
- package/dist/transforms/v1/datasource-mongodb.d.ts +0 -7
- package/dist/transforms/v1/datasource-mssql-domain.d.ts +0 -7
- package/dist/transforms/v1/datasource-mssql-domain.js +0 -35
- package/dist/transforms/v1/datasource-mssql-domain.js.map +0 -1
- package/dist/transforms/v1/datasource-mssql.d.ts +0 -7
- package/dist/transforms/v1/datasource-mysql-connector.d.ts +0 -6
- package/dist/transforms/v1/datasource-name.d.ts +0 -6
- package/dist/transforms/v1/datasource-sap.d.ts +0 -6
- package/dist/transforms/v1/datasource-sqlite-options.d.ts +0 -6
- package/dist/transforms/v1/datasource-sqlite-type.d.ts +0 -6
- package/dist/transforms/v1/find-options-lock-modes.d.ts +0 -6
- package/dist/transforms/v1/find-options-string-relations.d.ts +0 -6
- package/dist/transforms/v1/find-options-string-select.d.ts +0 -6
- package/dist/transforms/v1/global-functions.d.ts +0 -7
- package/dist/transforms/v1/index.d.ts +0 -40
- package/dist/transforms/v1/migrations-get-all.d.ts +0 -7
- package/dist/transforms/v1/mongodb-stats.d.ts +0 -7
- package/dist/transforms/v1/mongodb-types.d.ts +0 -6
- package/dist/transforms/v1/query-builder-native-parameters.d.ts +0 -6
- package/dist/transforms/v1/query-builder-on-conflict.d.ts +0 -7
- package/dist/transforms/v1/query-builder-or-update.d.ts +0 -6
- package/dist/transforms/v1/query-builder-print-sql.d.ts +0 -7
- package/dist/transforms/v1/query-builder-replace-property-names.d.ts +0 -7
- package/dist/transforms/v1/query-builder-where-expression.d.ts +0 -6
- package/dist/transforms/v1/query-runner-loaded-tables-views.d.ts +0 -7
- package/dist/transforms/v1/relation-count.d.ts +0 -7
- package/dist/transforms/v1/remove-abstract-repository.d.ts +0 -5
- package/dist/transforms/v1/remove-abstract-repository.js +0 -93
- package/dist/transforms/v1/remove-abstract-repository.js.map +0 -1
- package/dist/transforms/v1/remove-connector-package.d.ts +0 -4
- package/dist/transforms/v1/remove-connector-package.js +0 -19
- package/dist/transforms/v1/remove-connector-package.js.map +0 -1
- package/dist/transforms/v1/remove-datasource-name.d.ts +0 -4
- package/dist/transforms/v1/remove-datasource-name.js +0 -56
- package/dist/transforms/v1/remove-datasource-name.js.map +0 -1
- package/dist/transforms/v1/remove-mongodb-options.d.ts +0 -5
- package/dist/transforms/v1/remove-mongodb-options.js +0 -86
- package/dist/transforms/v1/remove-mongodb-options.js.map +0 -1
- package/dist/transforms/v1/remove-relation-count.d.ts +0 -5
- package/dist/transforms/v1/remove-relation-count.js +0 -49
- package/dist/transforms/v1/remove-relation-count.js.map +0 -1
- package/dist/transforms/v1/remove-replace-property-names.d.ts +0 -5
- package/dist/transforms/v1/remove-replace-property-names.js +0 -35
- package/dist/transforms/v1/remove-replace-property-names.js.map +0 -1
- package/dist/transforms/v1/remove-sap-options.d.ts +0 -4
- package/dist/transforms/v1/remove-sap-options.js +0 -54
- package/dist/transforms/v1/remove-sap-options.js.map +0 -1
- package/dist/transforms/v1/remove-unsigned-numeric.d.ts +0 -4
- package/dist/transforms/v1/remove-unsigned-numeric.js +0 -76
- package/dist/transforms/v1/remove-unsigned-numeric.js.map +0 -1
- package/dist/transforms/v1/remove-use-container.d.ts +0 -5
- package/dist/transforms/v1/remove-use-container.js +0 -63
- package/dist/transforms/v1/remove-use-container.js.map +0 -1
- package/dist/transforms/v1/remove-width-zerofill.d.ts +0 -4
- package/dist/transforms/v1/remove-width-zerofill.js +0 -29
- package/dist/transforms/v1/remove-width-zerofill.js.map +0 -1
- package/dist/transforms/v1/rename-connection-to-datasource.d.ts +0 -4
- package/dist/transforms/v1/rename-connection-to-datasource.js +0 -111
- package/dist/transforms/v1/rename-connection-to-datasource.js.map +0 -1
- package/dist/transforms/v1/rename-exist-to-exists.d.ts +0 -4
- package/dist/transforms/v1/rename-exist-to-exists.js +0 -25
- package/dist/transforms/v1/rename-exist-to-exists.js.map +0 -1
- package/dist/transforms/v1/rename-find-by-ids.d.ts +0 -4
- package/dist/transforms/v1/rename-find-by-ids.js +0 -64
- package/dist/transforms/v1/rename-find-by-ids.js.map +0 -1
- package/dist/transforms/v1/rename-get-all-migrations.d.ts +0 -5
- package/dist/transforms/v1/rename-get-all-migrations.js +0 -32
- package/dist/transforms/v1/rename-get-all-migrations.js.map +0 -1
- package/dist/transforms/v1/rename-loaded-tables-views.d.ts +0 -5
- package/dist/transforms/v1/rename-loaded-tables-views.js +0 -48
- package/dist/transforms/v1/rename-loaded-tables-views.js.map +0 -1
- package/dist/transforms/v1/rename-or-update-overload.d.ts +0 -4
- package/dist/transforms/v1/rename-or-update-overload.js +0 -46
- package/dist/transforms/v1/rename-or-update-overload.js.map +0 -1
- package/dist/transforms/v1/rename-print-sql-to-log-query.d.ts +0 -4
- package/dist/transforms/v1/rename-print-sql-to-log-query.js +0 -25
- package/dist/transforms/v1/rename-print-sql-to-log-query.js.map +0 -1
- package/dist/transforms/v1/replace-global-functions.d.ts +0 -5
- package/dist/transforms/v1/replace-global-functions.js +0 -92
- package/dist/transforms/v1/replace-global-functions.js.map +0 -1
- package/dist/transforms/v1/replace-lock-modes.d.ts +0 -4
- package/dist/transforms/v1/replace-lock-modes.js +0 -75
- package/dist/transforms/v1/replace-lock-modes.js.map +0 -1
- package/dist/transforms/v1/replace-mongodb-stats.d.ts +0 -5
- package/dist/transforms/v1/replace-mongodb-stats.js +0 -54
- package/dist/transforms/v1/replace-mongodb-stats.js.map +0 -1
- package/dist/transforms/v1/replace-mongodb-types.d.ts +0 -4
- package/dist/transforms/v1/replace-mongodb-types.js +0 -72
- package/dist/transforms/v1/replace-mongodb-types.js.map +0 -1
- package/dist/transforms/v1/replace-mssql-domain.d.ts +0 -5
- package/dist/transforms/v1/replace-mssql-domain.js +0 -25
- package/dist/transforms/v1/replace-mssql-domain.js.map +0 -1
- package/dist/transforms/v1/replace-on-conflict.d.ts +0 -5
- package/dist/transforms/v1/replace-on-conflict.js +0 -49
- package/dist/transforms/v1/replace-on-conflict.js.map +0 -1
- package/dist/transforms/v1/replace-readonly-column.d.ts +0 -4
- package/dist/transforms/v1/replace-readonly-column.js +0 -28
- package/dist/transforms/v1/replace-readonly-column.js.map +0 -1
- package/dist/transforms/v1/replace-set-native-parameters.d.ts +0 -4
- package/dist/transforms/v1/replace-set-native-parameters.js +0 -25
- package/dist/transforms/v1/replace-set-native-parameters.js.map +0 -1
- package/dist/transforms/v1/replace-sqlite-options.d.ts +0 -4
- package/dist/transforms/v1/replace-sqlite-options.js +0 -29
- package/dist/transforms/v1/replace-sqlite-options.js.map +0 -1
- package/dist/transforms/v1/replace-sqlite-type.d.ts +0 -4
- package/dist/transforms/v1/replace-sqlite-type.js +0 -22
- package/dist/transforms/v1/replace-sqlite-type.js.map +0 -1
- package/dist/transforms/v1/replace-where-expression-type.d.ts +0 -4
- package/dist/transforms/v1/replace-where-expression-type.js +0 -41
- package/dist/transforms/v1/replace-where-expression-type.js.map +0 -1
- package/dist/transforms/v1/repository-abstract.d.ts +0 -7
- package/dist/transforms/v1/repository-exist.d.ts +0 -6
- package/dist/transforms/v1/repository-find-by-ids.d.ts +0 -6
- package/dist/transforms/v1/repository-find-one-by-id.d.ts +0 -6
- package/dist/transforms/v1/upgrade-dependencies.d.ts +0 -15
- package/dist/transforms/v1/upgrade-dependencies.js +0 -163
- package/dist/transforms/v1/upgrade-dependencies.js.map +0 -1
- package/dist/transforms/v1/use-container.d.ts +0 -7
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { API, FileInfo } from "jscodeshift";
|
|
2
|
-
export declare const description = "replace removed `domain` option in MSSQL config with TODO";
|
|
3
|
-
export declare const manual = true;
|
|
4
|
-
export declare const replaceMssqlDomain: (file: FileInfo, api: API) => string | undefined;
|
|
5
|
-
export default replaceMssqlDomain;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.replaceMssqlDomain = exports.manual = exports.description = void 0;
|
|
4
|
-
const todo_1 = require("../todo");
|
|
5
|
-
exports.description = "replace removed `domain` option in MSSQL config with TODO";
|
|
6
|
-
exports.manual = true;
|
|
7
|
-
const replaceMssqlDomain = (file, api) => {
|
|
8
|
-
const j = api.jscodeshift;
|
|
9
|
-
const root = j(file.source);
|
|
10
|
-
let hasChanges = false;
|
|
11
|
-
let hasTodos = false;
|
|
12
|
-
root.find(j.ObjectProperty, {
|
|
13
|
-
key: { type: "Identifier", name: "domain" },
|
|
14
|
-
}).forEach((path) => {
|
|
15
|
-
(0, todo_1.addTodoComment)(path.node, '`domain` was removed in TypeORM v1. Restructure to `authentication: { type: "ntlm", options: { domain: "..." } }`. See migration guide: https://typeorm.io/docs/guides/migration-v1', j);
|
|
16
|
-
hasChanges = true;
|
|
17
|
-
hasTodos = true;
|
|
18
|
-
});
|
|
19
|
-
if (hasTodos)
|
|
20
|
-
(0, todo_1.reportTodo)("replace-mssql-domain", file, api);
|
|
21
|
-
return hasChanges ? root.toSource() : undefined;
|
|
22
|
-
};
|
|
23
|
-
exports.replaceMssqlDomain = replaceMssqlDomain;
|
|
24
|
-
exports.default = exports.replaceMssqlDomain;
|
|
25
|
-
//# sourceMappingURL=replace-mssql-domain.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replace-mssql-domain.js","sourceRoot":"","sources":["../../../src/transforms/v1/replace-mssql-domain.ts"],"names":[],"mappings":";;;AACA,kCAAoD;AAEvC,QAAA,WAAW,GACpB,2DAA2D,CAAA;AAClD,QAAA,MAAM,GAAG,IAAI,CAAA;AAEnB,MAAM,kBAAkB,GAAG,CAAC,IAAc,EAAE,GAAQ,EAAE,EAAE;IAC3D,MAAM,CAAC,GAAG,GAAG,CAAC,WAAW,CAAA;IACzB,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC3B,IAAI,UAAU,GAAG,KAAK,CAAA;IACtB,IAAI,QAAQ,GAAG,KAAK,CAAA;IAEpB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,EAAE;QACxB,GAAG,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC9C,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAChB,IAAA,qBAAc,EACV,IAAI,CAAC,IAAI,EACT,qLAAqL,EACrL,CAAC,CACJ,CAAA;QACD,UAAU,GAAG,IAAI,CAAA;QACjB,QAAQ,GAAG,IAAI,CAAA;IACnB,CAAC,CAAC,CAAA;IAEF,IAAI,QAAQ;QAAE,IAAA,iBAAU,EAAC,sBAAsB,EAAE,IAAI,EAAE,GAAG,CAAC,CAAA;IAE3D,OAAO,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;AACnD,CAAC,CAAA;AArBY,QAAA,kBAAkB,sBAqB9B;AAED,kBAAe,0BAAkB,CAAA"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { API, FileInfo } from "jscodeshift";
|
|
2
|
-
export declare const description = "replace removed `onConflict()` with `orIgnore()` or TODO";
|
|
3
|
-
export declare const manual = true;
|
|
4
|
-
export declare const replaceOnConflict: (file: FileInfo, api: API) => string | undefined;
|
|
5
|
-
export default replaceOnConflict;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.replaceOnConflict = exports.manual = exports.description = void 0;
|
|
4
|
-
const ast_helpers_1 = require("../ast-helpers");
|
|
5
|
-
const todo_1 = require("../todo");
|
|
6
|
-
exports.description = "replace removed `onConflict()` with `orIgnore()` or TODO";
|
|
7
|
-
exports.manual = true;
|
|
8
|
-
const replaceOnConflict = (file, api) => {
|
|
9
|
-
const j = api.jscodeshift;
|
|
10
|
-
const root = j(file.source);
|
|
11
|
-
let hasChanges = false;
|
|
12
|
-
let hasTodos = false;
|
|
13
|
-
root.find(j.CallExpression, {
|
|
14
|
-
callee: {
|
|
15
|
-
type: "MemberExpression",
|
|
16
|
-
property: { type: "Identifier", name: "onConflict" },
|
|
17
|
-
},
|
|
18
|
-
}).forEach((path) => {
|
|
19
|
-
const arg = path.node.arguments[0];
|
|
20
|
-
const argValue = arg ? (0, ast_helpers_1.getStringValue)(arg) : null;
|
|
21
|
-
if (argValue && /DO\s+NOTHING/i.test(argValue)) {
|
|
22
|
-
// Replace .onConflict("DO NOTHING") with .orIgnore()
|
|
23
|
-
if (path.node.callee.type === "MemberExpression") {
|
|
24
|
-
path.node.callee.property = j.identifier("orIgnore");
|
|
25
|
-
path.node.arguments = [];
|
|
26
|
-
hasChanges = true;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
// Add a TODO comment
|
|
31
|
-
const message = "`onConflict()` was removed in TypeORM v1. Use `orIgnore()` or `orUpdate()` instead. See migration guide: https://typeorm.io/docs/guides/migration-v1";
|
|
32
|
-
const parent = path.parent;
|
|
33
|
-
if (parent.node.type === "ExpressionStatement") {
|
|
34
|
-
(0, todo_1.addTodoComment)(parent.node, message, j);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
(0, todo_1.addTodoComment)(path.node, message, j);
|
|
38
|
-
}
|
|
39
|
-
hasChanges = true;
|
|
40
|
-
hasTodos = true;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
if (hasTodos)
|
|
44
|
-
(0, todo_1.reportTodo)("replace-on-conflict", file, api);
|
|
45
|
-
return hasChanges ? root.toSource() : undefined;
|
|
46
|
-
};
|
|
47
|
-
exports.replaceOnConflict = replaceOnConflict;
|
|
48
|
-
exports.default = exports.replaceOnConflict;
|
|
49
|
-
//# sourceMappingURL=replace-on-conflict.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replace-on-conflict.js","sourceRoot":"","sources":["../../../src/transforms/v1/replace-on-conflict.ts"],"names":[],"mappings":";;;AACA,gDAA+C;AAC/C,kCAAoD;AAEvC,QAAA,WAAW,GACpB,0DAA0D,CAAA;AACjD,QAAA,MAAM,GAAG,IAAI,CAAA;AAEnB,MAAM,iBAAiB,GAAG,CAAC,IAAc,EAAE,GAAQ,EAAE,EAAE;IAC1D,MAAM,CAAC,GAAG,GAAG,CAAC,WAAW,CAAA;IACzB,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC3B,IAAI,UAAU,GAAG,KAAK,CAAA;IACtB,IAAI,QAAQ,GAAG,KAAK,CAAA;IAEpB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,EAAE;QACxB,MAAM,EAAE;YACJ,IAAI,EAAE,kBAAkB;YACxB,QAAQ,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE;SACvD;KACJ,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAChB,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;QAClC,MAAM,QAAQ,GAAG,GAAG,CAAC,CAAC,CAAC,IAAA,4BAAc,EAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;QAEjD,IAAI,QAAQ,IAAI,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7C,qDAAqD;YACrD,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;gBAC/C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;gBACpD,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAA;gBACxB,UAAU,GAAG,IAAI,CAAA;YACrB,CAAC;QACL,CAAC;aAAM,CAAC;YACJ,qBAAqB;YACrB,MAAM,OAAO,GACT,sJAAsJ,CAAA;YAC1J,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;YAC1B,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,qBAAqB,EAAE,CAAC;gBAC7C,IAAA,qBAAc,EAAC,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;YAC3C,CAAC;iBAAM,CAAC;gBACJ,IAAA,qBAAc,EAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;YACzC,CAAC;YACD,UAAU,GAAG,IAAI,CAAA;YACjB,QAAQ,GAAG,IAAI,CAAA;QACnB,CAAC;IACL,CAAC,CAAC,CAAA;IAEF,IAAI,QAAQ;QAAE,IAAA,iBAAU,EAAC,qBAAqB,EAAE,IAAI,EAAE,GAAG,CAAC,CAAA;IAE1D,OAAO,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;AACnD,CAAC,CAAA;AAxCY,QAAA,iBAAiB,qBAwC7B;AAED,kBAAe,yBAAiB,CAAA"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.replaceReadonlyColumn = exports.description = void 0;
|
|
4
|
-
exports.description = "replace `readonly` column option with `update`";
|
|
5
|
-
const replaceReadonlyColumn = (file, api) => {
|
|
6
|
-
const j = api.jscodeshift;
|
|
7
|
-
const root = j(file.source);
|
|
8
|
-
let hasChanges = false;
|
|
9
|
-
root.find(j.ObjectProperty, {
|
|
10
|
-
key: { name: "readonly" },
|
|
11
|
-
}).forEach((path) => {
|
|
12
|
-
if (path.node.key.type === "Identifier") {
|
|
13
|
-
// readonly: true → update: false
|
|
14
|
-
// readonly: false → update: true
|
|
15
|
-
path.node.key.name = "update";
|
|
16
|
-
if (path.node.value.type === "BooleanLiteral" ||
|
|
17
|
-
(path.node.value.type === "Literal" &&
|
|
18
|
-
typeof path.node.value.value === "boolean")) {
|
|
19
|
-
path.node.value.value = !path.node.value.value;
|
|
20
|
-
}
|
|
21
|
-
hasChanges = true;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
return hasChanges ? root.toSource() : undefined;
|
|
25
|
-
};
|
|
26
|
-
exports.replaceReadonlyColumn = replaceReadonlyColumn;
|
|
27
|
-
exports.default = exports.replaceReadonlyColumn;
|
|
28
|
-
//# sourceMappingURL=replace-readonly-column.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replace-readonly-column.js","sourceRoot":"","sources":["../../../src/transforms/v1/replace-readonly-column.ts"],"names":[],"mappings":";;;AAEa,QAAA,WAAW,GAAG,gDAAgD,CAAA;AAEpE,MAAM,qBAAqB,GAAG,CAAC,IAAc,EAAE,GAAQ,EAAE,EAAE;IAC9D,MAAM,CAAC,GAAG,GAAG,CAAC,WAAW,CAAA;IACzB,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC3B,IAAI,UAAU,GAAG,KAAK,CAAA;IAEtB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,EAAE;QACxB,GAAG,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;KAC5B,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAChB,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;YACtC,iCAAiC;YACjC,iCAAiC;YACjC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,QAAQ,CAAA;YAC7B,IACI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,gBAAgB;gBACzC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS;oBAC/B,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,EACjD,CAAC;gBACC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAA;YAClD,CAAC;YACD,UAAU,GAAG,IAAI,CAAA;QACrB,CAAC;IACL,CAAC,CAAC,CAAA;IAEF,OAAO,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;AACnD,CAAC,CAAA;AAxBY,QAAA,qBAAqB,yBAwBjC;AAED,kBAAe,6BAAqB,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { API, FileInfo } from "jscodeshift";
|
|
2
|
-
export declare const description = "rename `setNativeParameters()` to `setParameters()`";
|
|
3
|
-
export declare const replaceSetNativeParameters: (file: FileInfo, api: API) => string | undefined;
|
|
4
|
-
export default replaceSetNativeParameters;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.replaceSetNativeParameters = exports.description = void 0;
|
|
4
|
-
exports.description = "rename `setNativeParameters()` to `setParameters()`";
|
|
5
|
-
const replaceSetNativeParameters = (file, api) => {
|
|
6
|
-
const j = api.jscodeshift;
|
|
7
|
-
const root = j(file.source);
|
|
8
|
-
let hasChanges = false;
|
|
9
|
-
root.find(j.CallExpression, {
|
|
10
|
-
callee: {
|
|
11
|
-
type: "MemberExpression",
|
|
12
|
-
property: { name: "setNativeParameters" },
|
|
13
|
-
},
|
|
14
|
-
}).forEach((path) => {
|
|
15
|
-
if (path.node.callee.type === "MemberExpression" &&
|
|
16
|
-
path.node.callee.property.type === "Identifier") {
|
|
17
|
-
path.node.callee.property.name = "setParameters";
|
|
18
|
-
hasChanges = true;
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
return hasChanges ? root.toSource() : undefined;
|
|
22
|
-
};
|
|
23
|
-
exports.replaceSetNativeParameters = replaceSetNativeParameters;
|
|
24
|
-
exports.default = exports.replaceSetNativeParameters;
|
|
25
|
-
//# sourceMappingURL=replace-set-native-parameters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replace-set-native-parameters.js","sourceRoot":"","sources":["../../../src/transforms/v1/replace-set-native-parameters.ts"],"names":[],"mappings":";;;AAEa,QAAA,WAAW,GAAG,qDAAqD,CAAA;AAEzE,MAAM,0BAA0B,GAAG,CAAC,IAAc,EAAE,GAAQ,EAAE,EAAE;IACnE,MAAM,CAAC,GAAG,GAAG,CAAC,WAAW,CAAA;IACzB,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC3B,IAAI,UAAU,GAAG,KAAK,CAAA;IAEtB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,EAAE;QACxB,MAAM,EAAE;YACJ,IAAI,EAAE,kBAAkB;YACxB,QAAQ,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE;SAC5C;KACJ,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAChB,IACI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,kBAAkB;YAC5C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,YAAY,EACjD,CAAC;YACC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,eAAe,CAAA;YAChD,UAAU,GAAG,IAAI,CAAA;QACrB,CAAC;IACL,CAAC,CAAC,CAAA;IAEF,OAAO,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;AACnD,CAAC,CAAA;AArBY,QAAA,0BAA0B,8BAqBtC;AAED,kBAAe,kCAA0B,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { API, FileInfo } from "jscodeshift";
|
|
2
|
-
export declare const description = "rename `busyTimeout` to `timeout` and remove `flags` in SQLite config";
|
|
3
|
-
export declare const replaceSqliteOptions: (file: FileInfo, api: API) => string | undefined;
|
|
4
|
-
export default replaceSqliteOptions;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.replaceSqliteOptions = exports.description = void 0;
|
|
4
|
-
exports.description = "rename `busyTimeout` to `timeout` and remove `flags` in SQLite config";
|
|
5
|
-
const replaceSqliteOptions = (file, api) => {
|
|
6
|
-
const j = api.jscodeshift;
|
|
7
|
-
const root = j(file.source);
|
|
8
|
-
let hasChanges = false;
|
|
9
|
-
// Rename busyTimeout → timeout
|
|
10
|
-
root.find(j.ObjectProperty, {
|
|
11
|
-
key: { type: "Identifier", name: "busyTimeout" },
|
|
12
|
-
}).forEach((path) => {
|
|
13
|
-
if (path.node.key.type === "Identifier") {
|
|
14
|
-
path.node.key.name = "timeout";
|
|
15
|
-
hasChanges = true;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
// Remove flags
|
|
19
|
-
root.find(j.ObjectProperty, {
|
|
20
|
-
key: { type: "Identifier", name: "flags" },
|
|
21
|
-
}).forEach((path) => {
|
|
22
|
-
j(path).remove();
|
|
23
|
-
hasChanges = true;
|
|
24
|
-
});
|
|
25
|
-
return hasChanges ? root.toSource() : undefined;
|
|
26
|
-
};
|
|
27
|
-
exports.replaceSqliteOptions = replaceSqliteOptions;
|
|
28
|
-
exports.default = exports.replaceSqliteOptions;
|
|
29
|
-
//# sourceMappingURL=replace-sqlite-options.js.map
|
|
@@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e,4BAAoB,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.replaceSqliteType = exports.description = void 0;
|
|
4
|
-
const ast_helpers_1 = require("../ast-helpers");
|
|
5
|
-
exports.description = "replace `sqlite` driver with `better-sqlite3`";
|
|
6
|
-
const replaceSqliteType = (file, api) => {
|
|
7
|
-
const j = api.jscodeshift;
|
|
8
|
-
const root = j(file.source);
|
|
9
|
-
let hasChanges = false;
|
|
10
|
-
// TSX parser uses ObjectProperty (not Property) and StringLiteral
|
|
11
|
-
root.find(j.ObjectProperty, {
|
|
12
|
-
key: { type: "Identifier", name: "type" },
|
|
13
|
-
value: { type: "StringLiteral", value: "sqlite" },
|
|
14
|
-
}).forEach((path) => {
|
|
15
|
-
(0, ast_helpers_1.setStringValue)(path.node.value, "better-sqlite3");
|
|
16
|
-
hasChanges = true;
|
|
17
|
-
});
|
|
18
|
-
return hasChanges ? root.toSource() : undefined;
|
|
19
|
-
};
|
|
20
|
-
exports.replaceSqliteType = replaceSqliteType;
|
|
21
|
-
exports.default = exports.replaceSqliteType;
|
|
22
|
-
//# sourceMappingURL=replace-sqlite-type.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replace-sqlite-type.js","sourceRoot":"","sources":["../../../src/transforms/v1/replace-sqlite-type.ts"],"names":[],"mappings":";;;AACA,gDAA+C;AAElC,QAAA,WAAW,GAAG,+CAA+C,CAAA;AAEnE,MAAM,iBAAiB,GAAG,CAAC,IAAc,EAAE,GAAQ,EAAE,EAAE;IAC1D,MAAM,CAAC,GAAG,GAAG,CAAC,WAAW,CAAA;IACzB,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC3B,IAAI,UAAU,GAAG,KAAK,CAAA;IAEtB,kEAAkE;IAClE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,EAAE;QACxB,GAAG,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE;QACzC,KAAK,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE;KACpD,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAChB,IAAA,4BAAc,EAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAA;QACjD,UAAU,GAAG,IAAI,CAAA;IACrB,CAAC,CAAC,CAAA;IAEF,OAAO,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;AACnD,CAAC,CAAA;AAfY,QAAA,iBAAiB,qBAe7B;AAED,kBAAe,yBAAiB,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { API, FileInfo } from "jscodeshift";
|
|
2
|
-
export declare const description = "rename `WhereExpression` to `WhereExpressionBuilder`";
|
|
3
|
-
export declare const replaceWhereExpressionType: (file: FileInfo, api: API) => string | undefined;
|
|
4
|
-
export default replaceWhereExpressionType;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.replaceWhereExpressionType = exports.description = void 0;
|
|
4
|
-
exports.description = "rename `WhereExpression` to `WhereExpressionBuilder`";
|
|
5
|
-
const replaceWhereExpressionType = (file, api) => {
|
|
6
|
-
const j = api.jscodeshift;
|
|
7
|
-
const root = j(file.source);
|
|
8
|
-
let hasChanges = false;
|
|
9
|
-
// Rename in imports
|
|
10
|
-
root.find(j.ImportSpecifier, {
|
|
11
|
-
imported: { name: "WhereExpression" },
|
|
12
|
-
}).forEach((path) => {
|
|
13
|
-
path.node.imported.name = "WhereExpressionBuilder";
|
|
14
|
-
if (path.node.local?.type === "Identifier" &&
|
|
15
|
-
path.node.local?.name === "WhereExpression") {
|
|
16
|
-
path.node.local.name = "WhereExpressionBuilder";
|
|
17
|
-
}
|
|
18
|
-
hasChanges = true;
|
|
19
|
-
});
|
|
20
|
-
// Rename in type references
|
|
21
|
-
root.find(j.TSTypeReference, {
|
|
22
|
-
typeName: { name: "WhereExpression" },
|
|
23
|
-
}).forEach((path) => {
|
|
24
|
-
if (path.node.typeName.type === "Identifier") {
|
|
25
|
-
path.node.typeName.name = "WhereExpressionBuilder";
|
|
26
|
-
hasChanges = true;
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
// Rename in identifiers (variable types, parameters, etc.)
|
|
30
|
-
root.find(j.Identifier, { name: "WhereExpression" }).forEach((path) => {
|
|
31
|
-
if (path.parent.node.type !== "ImportSpecifier" &&
|
|
32
|
-
path.parent.node.type !== "TSTypeReference") {
|
|
33
|
-
path.node.name = "WhereExpressionBuilder";
|
|
34
|
-
hasChanges = true;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
return hasChanges ? root.toSource() : undefined;
|
|
38
|
-
};
|
|
39
|
-
exports.replaceWhereExpressionType = replaceWhereExpressionType;
|
|
40
|
-
exports.default = exports.replaceWhereExpressionType;
|
|
41
|
-
//# sourceMappingURL=replace-where-expression-type.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replace-where-expression-type.js","sourceRoot":"","sources":["../../../src/transforms/v1/replace-where-expression-type.ts"],"names":[],"mappings":";;;AAEa,QAAA,WAAW,GACpB,sDAAsD,CAAA;AAEnD,MAAM,0BAA0B,GAAG,CAAC,IAAc,EAAE,GAAQ,EAAE,EAAE;IACnE,MAAM,CAAC,GAAG,GAAG,CAAC,WAAW,CAAA;IACzB,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC3B,IAAI,UAAU,GAAG,KAAK,CAAA;IAEtB,oBAAoB;IACpB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE;QACzB,QAAQ,EAAE,EAAE,IAA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OAAO,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;AACnD,CAAC,CAAA;AAzCY,QAAA,0BAA0B,8BAyCtC;AAED,kBAAe,kCAA0B,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { API, FileInfo } from "jscodeshift";
|
|
2
|
-
export declare const name: string;
|
|
3
|
-
export declare const description = "flag removed `@EntityRepository` and `AbstractRepository` for manual migration";
|
|
4
|
-
export declare const manual = true;
|
|
5
|
-
export declare const repositoryAbstract: (file: FileInfo, api: API) => string | undefined;
|
|
6
|
-
export declare const fn: (file: FileInfo, api: API) => string | undefined;
|
|
7
|
-
export default fn;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { API, FileInfo } from "jscodeshift";
|
|
2
|
-
export declare const name: string;
|
|
3
|
-
export declare const description = "rename `Repository.exist()` to `exists()`";
|
|
4
|
-
export declare const repositoryExist: (file: FileInfo, api: API) => string | undefined;
|
|
5
|
-
export declare const fn: (file: FileInfo, api: API) => string | undefined;
|
|
6
|
-
export default fn;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { API, FileInfo } from "jscodeshift";
|
|
2
|
-
export declare const name: string;
|
|
3
|
-
export declare const description = "replace `findByIds()` with `findBy()` and `In` operator";
|
|
4
|
-
export declare const repositoryFindByIds: (file: FileInfo, api: API) => string | undefined;
|
|
5
|
-
export declare const fn: (file: FileInfo, api: API) => string | undefined;
|
|
6
|
-
export default fn;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { API, FileInfo } from "jscodeshift";
|
|
2
|
-
export declare const name: string;
|
|
3
|
-
export declare const description = "replace `findOneById()` with `findOneBy()` using `{ id: value }`";
|
|
4
|
-
export declare const repositoryFindOneById: (file: FileInfo, api: API) => string | undefined;
|
|
5
|
-
export declare const fn: (file: FileInfo, api: API) => string | undefined;
|
|
6
|
-
export default fn;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface DependencyReport {
|
|
2
|
-
file: string;
|
|
3
|
-
changes: string[];
|
|
4
|
-
warnings: string[];
|
|
5
|
-
errors: string[];
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Upgrades dependencies in a single package.json file for TypeORM v1.
|
|
9
|
-
*/
|
|
10
|
-
export declare const upgradeDependencies: (filePath: string, dry: boolean) => DependencyReport;
|
|
11
|
-
/**
|
|
12
|
-
* Finds all package.json files in the given paths (non-recursive for
|
|
13
|
-
* the given directories, but checks common monorepo patterns).
|
|
14
|
-
*/
|
|
15
|
-
export declare const findPackageJsonFiles: (paths: string[]) => string[];
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.findPackageJsonFiles = exports.upgradeDependencies = void 0;
|
|
7
|
-
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
-
const semver_1 = __importDefault(require("semver"));
|
|
10
|
-
/** Packages to replace (old → new package name + version). */
|
|
11
|
-
const replacements = {
|
|
12
|
-
sqlite3: { replacement: "better-sqlite3", version: "^12.8.0" },
|
|
13
|
-
mysql: { replacement: "mysql2", version: "^3.20.0" },
|
|
14
|
-
};
|
|
15
|
-
/** TypeORM v1 target version. */
|
|
16
|
-
const TYPEORM_VERSION = "^1.0.0-beta.1";
|
|
17
|
-
/** Minimum supported versions from TypeORM v1 peerDependencies. */
|
|
18
|
-
const minimumVersions = {
|
|
19
|
-
typeorm: TYPEORM_VERSION,
|
|
20
|
-
mongodb: "^7.0.0",
|
|
21
|
-
mysql2: "^3.15.3",
|
|
22
|
-
mssql: "^12.0.0",
|
|
23
|
-
"better-sqlite3": "^12.0.0",
|
|
24
|
-
"@google-cloud/spanner": "^8.0.0",
|
|
25
|
-
redis: "^5.0.0",
|
|
26
|
-
ioredis: "^5.0.4",
|
|
27
|
-
"typeorm-aurora-data-api-driver": "^3.0.0",
|
|
28
|
-
};
|
|
29
|
-
/** Packages that are incompatible with TypeORM v1 (hard errors). */
|
|
30
|
-
const incompatiblePackages = {
|
|
31
|
-
"typeorm-typedi-extensions": "`typeorm-typedi-extensions` is incompatible with TypeORM v1 — the IoC container system (`useContainer`) was removed. See migration guide.",
|
|
32
|
-
"typeorm-routing-controllers-extensions": "`typeorm-routing-controllers-extensions` is incompatible with TypeORM v1 — the IoC container system (`useContainer`) was removed. See migration guide.",
|
|
33
|
-
};
|
|
34
|
-
/** Minimum required Node.js version for TypeORM v1. */
|
|
35
|
-
const MIN_NODE_VERSION = "20.0.0";
|
|
36
|
-
/**
|
|
37
|
-
* Upgrades dependencies in a single package.json file for TypeORM v1.
|
|
38
|
-
*/
|
|
39
|
-
const upgradeDependencies = (filePath, dry) => {
|
|
40
|
-
const report = {
|
|
41
|
-
file: filePath,
|
|
42
|
-
changes: [],
|
|
43
|
-
warnings: [],
|
|
44
|
-
errors: [],
|
|
45
|
-
};
|
|
46
|
-
const raw = node_fs_1.default.readFileSync(filePath, "utf8");
|
|
47
|
-
const pkg = JSON.parse(raw);
|
|
48
|
-
let modified = false;
|
|
49
|
-
const depSections = [
|
|
50
|
-
"dependencies",
|
|
51
|
-
"devDependencies",
|
|
52
|
-
"peerDependencies",
|
|
53
|
-
"optionalDependencies",
|
|
54
|
-
];
|
|
55
|
-
// Replace deprecated packages
|
|
56
|
-
for (const [oldPkg, { replacement, version }] of Object.entries(replacements)) {
|
|
57
|
-
for (const section of depSections) {
|
|
58
|
-
if (pkg[section]?.[oldPkg]) {
|
|
59
|
-
delete pkg[section][oldPkg];
|
|
60
|
-
if (!pkg[section][replacement]) {
|
|
61
|
-
pkg[section][replacement] = version;
|
|
62
|
-
report.changes.push(`${section}: replaced \`${oldPkg}\` with \`${replacement}@${version}\``);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
report.changes.push(`${section}: removed \`${oldPkg}\` (${replacement} already present)`);
|
|
66
|
-
}
|
|
67
|
-
modified = true;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
// Bump versions below minimum
|
|
72
|
-
for (const [pkgName, minRange] of Object.entries(minimumVersions)) {
|
|
73
|
-
for (const section of depSections) {
|
|
74
|
-
const current = pkg[section]?.[pkgName];
|
|
75
|
-
if (!current)
|
|
76
|
-
continue;
|
|
77
|
-
const currentMin = semver_1.default.minVersion(current);
|
|
78
|
-
const requiredMin = semver_1.default.minVersion(minRange);
|
|
79
|
-
if (currentMin &&
|
|
80
|
-
requiredMin &&
|
|
81
|
-
semver_1.default.lt(currentMin, requiredMin)) {
|
|
82
|
-
pkg[section][pkgName] = minRange;
|
|
83
|
-
report.changes.push(`${section}: bumped \`${pkgName}\` from \`${current}\` to \`${minRange}\``);
|
|
84
|
-
modified = true;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
// Check for incompatible packages (hard errors)
|
|
89
|
-
for (const [pkgName, message] of Object.entries(incompatiblePackages)) {
|
|
90
|
-
for (const section of depSections) {
|
|
91
|
-
if (pkg[section]?.[pkgName]) {
|
|
92
|
-
report.errors.push(message);
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
// Check Node.js engine requirement
|
|
98
|
-
const engines = pkg.engines?.node;
|
|
99
|
-
if (engines) {
|
|
100
|
-
const currentMin = semver_1.default.minVersion(engines);
|
|
101
|
-
if (currentMin && semver_1.default.lt(currentMin, MIN_NODE_VERSION)) {
|
|
102
|
-
report.warnings.push(`\`engines.node\` is \`${engines}\` — TypeORM v1 requires Node.js ${MIN_NODE_VERSION}+. Update your engines field.`);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
// Check for dotenv (soft warning)
|
|
106
|
-
for (const section of depSections) {
|
|
107
|
-
if (pkg[section]?.dotenv) {
|
|
108
|
-
report.warnings.push(`\`dotenv\` detected — TypeORM v1 no longer auto-loads \`.env\` files. Make sure your app loads environment variables itself (e.g. via \`dotenv/config\` import).`);
|
|
109
|
-
break;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
if (modified && !dry) {
|
|
113
|
-
// Preserve original formatting (detect indent)
|
|
114
|
-
const indent = detectIndent(raw);
|
|
115
|
-
node_fs_1.default.writeFileSync(filePath, JSON.stringify(pkg, null, indent) + "\n", "utf8");
|
|
116
|
-
}
|
|
117
|
-
return report;
|
|
118
|
-
};
|
|
119
|
-
exports.upgradeDependencies = upgradeDependencies;
|
|
120
|
-
/**
|
|
121
|
-
* Finds all package.json files in the given paths (non-recursive for
|
|
122
|
-
* the given directories, but checks common monorepo patterns).
|
|
123
|
-
*/
|
|
124
|
-
const findPackageJsonFiles = (paths) => {
|
|
125
|
-
const results = [];
|
|
126
|
-
for (const p of paths) {
|
|
127
|
-
const stat = node_fs_1.default.statSync(p, { throwIfNoEntry: false });
|
|
128
|
-
if (!stat)
|
|
129
|
-
continue;
|
|
130
|
-
if (stat.isFile() && node_path_1.default.basename(p) === "package.json") {
|
|
131
|
-
results.push(p);
|
|
132
|
-
continue;
|
|
133
|
-
}
|
|
134
|
-
if (stat.isDirectory()) {
|
|
135
|
-
// Check root package.json
|
|
136
|
-
const rootPkg = node_path_1.default.join(p, "package.json");
|
|
137
|
-
if (node_fs_1.default.existsSync(rootPkg))
|
|
138
|
-
results.push(rootPkg);
|
|
139
|
-
// Check packages/*/package.json (monorepo)
|
|
140
|
-
const packagesDir = node_path_1.default.join(p, "packages");
|
|
141
|
-
if (node_fs_1.default.existsSync(packagesDir) &&
|
|
142
|
-
node_fs_1.default.statSync(packagesDir).isDirectory()) {
|
|
143
|
-
for (const entry of node_fs_1.default.readdirSync(packagesDir, {
|
|
144
|
-
withFileTypes: true,
|
|
145
|
-
})) {
|
|
146
|
-
if (!entry.isDirectory())
|
|
147
|
-
continue;
|
|
148
|
-
const pkgFile = node_path_1.default.join(packagesDir, entry.name, "package.json");
|
|
149
|
-
if (node_fs_1.default.existsSync(pkgFile))
|
|
150
|
-
results.push(pkgFile);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
return [...new Set(results)];
|
|
156
|
-
};
|
|
157
|
-
exports.findPackageJsonFiles = findPackageJsonFiles;
|
|
158
|
-
/** Detect indentation from a JSON string. */
|
|
159
|
-
const detectIndent = (json) => {
|
|
160
|
-
const match = json.match(/^( +)"/m);
|
|
161
|
-
return match ? match[1].length : 2;
|
|
162
|
-
};
|
|
163
|
-
//# sourceMappingURL=upgrade-dependencies.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade-dependencies.js","sourceRoot":"","sources":["../../../src/transforms/v1/upgrade-dependencies.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAwB;AACxB,0DAA4B;AAC5B,oDAA2B;AAS3B,8DAA8D;AAC9D,MAAM,YAAY,GAA6D;IAC3E,OAAO,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE;IAC9D,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE;CACvD,CAAA;AAED,iCAAiC;AACjC,MAAM,eAAe,GAAG,eAAe,CAAA;AAEvC,mEAAmE;AACnE,MAAM,eAAe,GAA2B;IAC5C,OAAO,EAAE,eAAe;IACxB,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;IAChB,gBAAgB,EAAE,SAAS;IAC3B,uBAAuB,EAAE,QAAQ;IACjC,KAAK,EAAE,QAAQ;IACf,OAAO,EAAE,QAAQ;IACjB,gCAAgC,EAAE,QAAQ;CAC7C,CAAA;AAED,oEAAoE;AACpE,MAAM,oBAAoB,GAA2B;IACjD,2BAA2B,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AAC,IAAY,EAAU,EAAE;IAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;IACnC,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;AACtC,CAAC,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { API, FileInfo } from "jscodeshift";
|
|
2
|
-
export declare const name: string;
|
|
3
|
-
export declare const description = "remove `useContainer()` and `getFromContainer()` calls";
|
|
4
|
-
export declare const manual = true;
|
|
5
|
-
export declare const useContainer: (file: FileInfo, api: API) => string | undefined;
|
|
6
|
-
export declare const fn: (file: FileInfo, api: API) => string | undefined;
|
|
7
|
-
export default fn;
|