skuba 10.0.0-node-22-20250219000751 → 10.0.0-node-22-20250226231811
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/lib/cli/migrate/nodeVersion/checks.d.ts +10 -1
- package/lib/cli/migrate/nodeVersion/checks.js +58 -21
- package/lib/cli/migrate/nodeVersion/checks.js.map +2 -2
- package/lib/cli/migrate/nodeVersion/getNodeTypesVersion.js +8 -5
- package/lib/cli/migrate/nodeVersion/getNodeTypesVersion.js.map +2 -2
- package/lib/cli/migrate/nodeVersion/index.js +52 -66
- package/lib/cli/migrate/nodeVersion/index.js.map +2 -2
- package/package.json +2 -2
- package/template/greeter/package.json +1 -1
- package/template/lambda-sqs-worker-cdk/package.json +1 -1
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { type ZodRawShape, z } from 'zod';
|
|
2
|
-
export declare const extractFromParentPackageJson: <T extends ZodRawShape>(schema: z.ZodObject<T>) => Promise<
|
|
2
|
+
export declare const extractFromParentPackageJson: <T extends ZodRawShape>(schema: z.ZodObject<T>) => Promise<{
|
|
3
|
+
packageJson: undefined;
|
|
4
|
+
packageJsonRelativePath: undefined;
|
|
5
|
+
} | {
|
|
6
|
+
packageJson: undefined;
|
|
7
|
+
packageJsonRelativePath: string;
|
|
8
|
+
} | {
|
|
9
|
+
packageJson: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>[k]; } : never;
|
|
10
|
+
packageJsonRelativePath: string;
|
|
11
|
+
}>;
|
|
3
12
|
export declare const isPatchableServerlessVersion: () => Promise<boolean>;
|
|
4
13
|
export declare const isPatchableSkubaType: () => Promise<boolean>;
|
|
5
14
|
export declare const isPatchableNodeVersion: (targetNodeVersion: number) => Promise<boolean>;
|
|
@@ -42,80 +42,117 @@ var import_logging = require("../../../utils/logging");
|
|
|
42
42
|
const getParentFile = async (file) => {
|
|
43
43
|
const path = await (0, import_find_up.default)(file, { cwd: process.cwd() });
|
|
44
44
|
if (!path) {
|
|
45
|
-
|
|
45
|
+
return void 0;
|
|
46
46
|
}
|
|
47
|
-
return
|
|
47
|
+
return {
|
|
48
|
+
fileContent: await import_fs_extra.default.readFile(path, "utf-8"),
|
|
49
|
+
path
|
|
50
|
+
};
|
|
48
51
|
};
|
|
49
52
|
const extractFromParentPackageJson = async (schema) => {
|
|
50
|
-
const
|
|
53
|
+
const file = await getParentFile("package.json");
|
|
54
|
+
if (!file) {
|
|
55
|
+
return { packageJson: void 0, packageJsonRelativePath: void 0 };
|
|
56
|
+
}
|
|
57
|
+
const { fileContent: packageJson, path } = file;
|
|
51
58
|
let rawJSON;
|
|
52
59
|
try {
|
|
53
60
|
rawJSON = JSON.parse(packageJson);
|
|
54
61
|
} catch {
|
|
55
|
-
throw new Error(
|
|
62
|
+
throw new Error(`${path} is not valid JSON`);
|
|
56
63
|
}
|
|
57
64
|
const result = schema.safeParse(rawJSON);
|
|
58
65
|
if (!result.success) {
|
|
59
|
-
return void 0;
|
|
66
|
+
return { packageJson: void 0, packageJsonRelativePath: path };
|
|
60
67
|
}
|
|
61
|
-
return result.data;
|
|
68
|
+
return { packageJson: result.data, packageJsonRelativePath: path };
|
|
62
69
|
};
|
|
63
70
|
const isPatchableServerlessVersion = async () => {
|
|
64
|
-
const
|
|
71
|
+
const { packageJson, packageJsonRelativePath } = await extractFromParentPackageJson(
|
|
65
72
|
import_zod.z.object({
|
|
66
73
|
devDependencies: import_zod.z.object({
|
|
67
|
-
serverless: import_zod.z.string()
|
|
74
|
+
serverless: import_zod.z.string().optional()
|
|
68
75
|
})
|
|
69
76
|
})
|
|
70
|
-
)
|
|
77
|
+
);
|
|
78
|
+
if (!packageJson) {
|
|
79
|
+
throw new Error(
|
|
80
|
+
"package.json not found, ensure it is in the correct location"
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
const serverlessVersion = packageJson?.devDependencies.serverless;
|
|
71
84
|
if (!serverlessVersion) {
|
|
72
|
-
import_logging.log.subtle(
|
|
85
|
+
import_logging.log.subtle(
|
|
86
|
+
`Serverless version not found in ${packageJsonRelativePath}, assuming it is not a dependency`
|
|
87
|
+
);
|
|
73
88
|
return true;
|
|
74
89
|
}
|
|
75
90
|
if (!(0, import_semver.satisfies)(serverlessVersion, "4.x.x")) {
|
|
76
91
|
import_logging.log.warn(
|
|
77
|
-
|
|
92
|
+
`Serverless version ${serverlessVersion} cannot be migrated; use Serverless 4.x to automatically migrate Serverless files`
|
|
78
93
|
);
|
|
79
94
|
return false;
|
|
80
95
|
}
|
|
81
|
-
import_logging.log.ok(
|
|
96
|
+
import_logging.log.ok(
|
|
97
|
+
`Proceeding with migration of Serverless version ${serverlessVersion}`
|
|
98
|
+
);
|
|
82
99
|
return true;
|
|
83
100
|
};
|
|
84
101
|
const isPatchableSkubaType = async () => {
|
|
85
|
-
const
|
|
102
|
+
const { packageJson, packageJsonRelativePath } = await extractFromParentPackageJson(
|
|
86
103
|
import_zod.z.object({
|
|
87
104
|
skuba: import_zod.z.object({
|
|
88
|
-
type: import_zod.z.string()
|
|
105
|
+
type: import_zod.z.string().optional()
|
|
89
106
|
})
|
|
90
107
|
})
|
|
91
|
-
)
|
|
108
|
+
);
|
|
109
|
+
if (!packageJson) {
|
|
110
|
+
throw new Error(
|
|
111
|
+
"package.json not found, ensure it is in the correct location"
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
const type = packageJson?.skuba.type;
|
|
92
115
|
if (!type) {
|
|
93
116
|
import_logging.log.warn(
|
|
94
|
-
|
|
117
|
+
`skuba project type not found in ${packageJsonRelativePath}; add a package.json#/skuba/type to ensure the correct migration can be applied`
|
|
95
118
|
);
|
|
96
119
|
return false;
|
|
97
120
|
}
|
|
98
121
|
if (type === "package") {
|
|
99
122
|
import_logging.log.warn(
|
|
100
|
-
"
|
|
123
|
+
"Migrations are not supported for packages; update manually to ensure major runtime deprecations are intended"
|
|
101
124
|
);
|
|
102
125
|
return false;
|
|
103
126
|
}
|
|
104
|
-
import_logging.log.ok(
|
|
127
|
+
import_logging.log.ok(`Proceeding with migration of skuba project type ${type}`);
|
|
105
128
|
return true;
|
|
106
129
|
};
|
|
107
130
|
const isPatchableNodeVersion = async (targetNodeVersion) => {
|
|
108
|
-
const
|
|
131
|
+
const nvmrcFile = await getParentFile(".nvmrc");
|
|
132
|
+
const nodeVersionFile = await getParentFile(".node-version");
|
|
133
|
+
const { packageJson } = await extractFromParentPackageJson(
|
|
134
|
+
import_zod.z.object({
|
|
135
|
+
engines: import_zod.z.object({
|
|
136
|
+
node: import_zod.z.string()
|
|
137
|
+
})
|
|
138
|
+
})
|
|
139
|
+
);
|
|
140
|
+
const nvmrcNodeVersion = nvmrcFile?.fileContent;
|
|
141
|
+
const nodeVersion = nodeVersionFile?.fileContent;
|
|
142
|
+
const engineVersion = packageJson?.engines.node;
|
|
143
|
+
const currentNodeVersion = nvmrcNodeVersion || nodeVersion || engineVersion;
|
|
109
144
|
const coercedTargetVersion = (0, import_semver.coerce)(targetNodeVersion.toString())?.version;
|
|
110
145
|
const coercedCurrentVersion = (0, import_semver.coerce)(currentNodeVersion)?.version;
|
|
111
146
|
const isNodeVersionValid = coercedTargetVersion && coercedCurrentVersion && (0, import_semver.lte)(coercedCurrentVersion, coercedTargetVersion);
|
|
112
147
|
if (!isNodeVersionValid) {
|
|
113
148
|
import_logging.log.warn(
|
|
114
|
-
`Node
|
|
149
|
+
`Node.js version ${coercedCurrentVersion ?? "unknown"} cannot be migrated to ${coercedTargetVersion}`
|
|
115
150
|
);
|
|
116
151
|
return false;
|
|
117
152
|
}
|
|
118
|
-
import_logging.log.ok(
|
|
153
|
+
import_logging.log.ok(
|
|
154
|
+
`Proceeding with migration from Node.js ${coercedCurrentVersion} to ${coercedTargetVersion}`
|
|
155
|
+
);
|
|
119
156
|
return true;
|
|
120
157
|
};
|
|
121
158
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/migrate/nodeVersion/checks.ts"],
|
|
4
|
-
"sourcesContent": ["import findUp from 'find-up';\nimport fs from 'fs-extra';\nimport { coerce, lte, satisfies } from 'semver';\nimport { type ZodRawShape, z } from 'zod';\n\nimport { log } from '../../../utils/logging';\n\nconst getParentFile = async (file: string) => {\n const path = await findUp(file, { cwd: process.cwd() });\n if (!path) {\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAmB;AACnB,sBAAe;AACf,oBAAuC;AACvC,iBAAoC;AAEpC,qBAAoB;AAEpB,MAAM,gBAAgB,OAAO,SAAiB;AAC5C,QAAM,OAAO,UAAM,eAAAA,SAAO,MAAM,EAAE,KAAK,QAAQ,IAAI,EAAE,CAAC;AACtD,MAAI,CAAC,MAAM;AACT,
|
|
4
|
+
"sourcesContent": ["import findUp from 'find-up';\nimport fs from 'fs-extra';\nimport { coerce, lte, satisfies } from 'semver';\nimport { type ZodRawShape, z } from 'zod';\n\nimport { log } from '../../../utils/logging';\n\nconst getParentFile = async (file: string) => {\n const path = await findUp(file, { cwd: process.cwd() });\n if (!path) {\n return undefined;\n }\n return {\n fileContent: await fs.readFile(path, 'utf-8'),\n path,\n };\n};\n\nexport const extractFromParentPackageJson = async <T extends ZodRawShape>(\n schema: z.ZodObject<T>,\n) => {\n const file = await getParentFile('package.json');\n if (!file) {\n return { packageJson: undefined, packageJsonRelativePath: undefined };\n }\n const { fileContent: packageJson, path } = file;\n let rawJSON;\n try {\n rawJSON = JSON.parse(packageJson) as unknown;\n } catch {\n throw new Error(`${path} is not valid JSON`);\n }\n const result = schema.safeParse(rawJSON);\n if (!result.success) {\n return { packageJson: undefined, packageJsonRelativePath: path };\n }\n\n return { packageJson: result.data, packageJsonRelativePath: path };\n};\n\nexport const isPatchableServerlessVersion = async (): Promise<boolean> => {\n const { packageJson, packageJsonRelativePath } =\n await extractFromParentPackageJson(\n z.object({\n devDependencies: z.object({\n serverless: z.string().optional(),\n }),\n }),\n );\n if (!packageJson) {\n throw new Error(\n 'package.json not found, ensure it is in the correct location',\n );\n }\n\n const serverlessVersion = packageJson?.devDependencies.serverless;\n\n if (!serverlessVersion) {\n log.subtle(\n `Serverless version not found in ${packageJsonRelativePath}, assuming it is not a dependency`,\n );\n return true;\n }\n\n if (!satisfies(serverlessVersion, '4.x.x')) {\n log.warn(\n `Serverless version ${serverlessVersion} cannot be migrated; use Serverless 4.x to automatically migrate Serverless files`,\n );\n return false;\n }\n\n log.ok(\n `Proceeding with migration of Serverless version ${serverlessVersion}`,\n );\n return true;\n};\n\nexport const isPatchableSkubaType = async (): Promise<boolean> => {\n const { packageJson, packageJsonRelativePath } =\n await extractFromParentPackageJson(\n z.object({\n skuba: z.object({\n type: z.string().optional(),\n }),\n }),\n );\n\n if (!packageJson) {\n throw new Error(\n 'package.json not found, ensure it is in the correct location',\n );\n }\n\n const type = packageJson?.skuba.type;\n\n if (!type) {\n log.warn(\n `skuba project type not found in ${packageJsonRelativePath}; add a package.json#/skuba/type to ensure the correct migration can be applied`,\n );\n return false;\n }\n if (type === 'package') {\n log.warn(\n 'Migrations are not supported for packages; update manually to ensure major runtime deprecations are intended',\n );\n return false;\n }\n\n log.ok(`Proceeding with migration of skuba project type ${type}`);\n return true;\n};\n\nexport const isPatchableNodeVersion = async (\n targetNodeVersion: number,\n): Promise<boolean> => {\n const nvmrcFile = await getParentFile('.nvmrc');\n const nodeVersionFile = await getParentFile('.node-version');\n const { packageJson } = await extractFromParentPackageJson(\n z.object({\n engines: z.object({\n node: z.string(),\n }),\n }),\n );\n\n const nvmrcNodeVersion = nvmrcFile?.fileContent;\n const nodeVersion = nodeVersionFile?.fileContent;\n const engineVersion = packageJson?.engines.node;\n\n const currentNodeVersion = nvmrcNodeVersion || nodeVersion || engineVersion;\n\n const coercedTargetVersion = coerce(targetNodeVersion.toString())?.version;\n const coercedCurrentVersion = coerce(currentNodeVersion)?.version;\n\n const isNodeVersionValid =\n coercedTargetVersion &&\n coercedCurrentVersion &&\n lte(coercedCurrentVersion, coercedTargetVersion);\n\n if (!isNodeVersionValid) {\n log.warn(\n `Node.js version ${coercedCurrentVersion ?? 'unknown'} cannot be migrated to ${coercedTargetVersion}`,\n );\n return false;\n }\n\n log.ok(\n `Proceeding with migration from Node.js ${coercedCurrentVersion} to ${coercedTargetVersion}`,\n );\n return true;\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAmB;AACnB,sBAAe;AACf,oBAAuC;AACvC,iBAAoC;AAEpC,qBAAoB;AAEpB,MAAM,gBAAgB,OAAO,SAAiB;AAC5C,QAAM,OAAO,UAAM,eAAAA,SAAO,MAAM,EAAE,KAAK,QAAQ,IAAI,EAAE,CAAC;AACtD,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,SAAO;AAAA,IACL,aAAa,MAAM,gBAAAC,QAAG,SAAS,MAAM,OAAO;AAAA,IAC5C;AAAA,EACF;AACF;AAEO,MAAM,+BAA+B,OAC1C,WACG;AACH,QAAM,OAAO,MAAM,cAAc,cAAc;AAC/C,MAAI,CAAC,MAAM;AACT,WAAO,EAAE,aAAa,QAAW,yBAAyB,OAAU;AAAA,EACtE;AACA,QAAM,EAAE,aAAa,aAAa,KAAK,IAAI;AAC3C,MAAI;AACJ,MAAI;AACF,cAAU,KAAK,MAAM,WAAW;AAAA,EAClC,QAAQ;AACN,UAAM,IAAI,MAAM,GAAG,IAAI,oBAAoB;AAAA,EAC7C;AACA,QAAM,SAAS,OAAO,UAAU,OAAO;AACvC,MAAI,CAAC,OAAO,SAAS;AACnB,WAAO,EAAE,aAAa,QAAW,yBAAyB,KAAK;AAAA,EACjE;AAEA,SAAO,EAAE,aAA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C,sBACqB;AACrB,QAAM,YAAY,MAAM,cAAc,QAAQ;AAC9C,QAAM,kBAAkB,MAAM,cAAc,eAAe;AAC3D,QAAM,EAAE,YAAY,IAAI,MAAM;AAAA,IAC5B,aAAE,OAAO;AAAA,MACP,SAAS,aAAE,OAAO;AAAA,QAChB,MAAM,aAAE,OAAO;AAAA,MACjB,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AAEA,QAAM,mBAAmB,WAAW;AACpC,QAAM,cAAc,iBAAiB;AACrC,QAAM,gBAAgB,aAAa,QAAQ;AAE3C,QAAM,qBAAqB,oBAAoB,eAAe;AAE9D,QAAM,2BAAuB,sBAAO,kBAAkB,SAAS,CAAC,GAAG;AACnE,QAAM,4BAAwB,sBAAO,kBAAkB,GAAG;AAE1D,QAAM,qBACJ,wBACA,6BACA,mBAAI,uBAAuB,oBAAoB;AAEjD,MAAI,CAAC,oBAAoB;AACvB,uBAAI;AAAA,MACF,mBAAmB,yBAAyB,SAAS,0BAA0B,oBAAoB;AAAA,IACrG;AACA,WAAO;AAAA,EACT;AAEA,qBAAI;AAAA,IACF,0CAA0C,qBAAqB,OAAO,oBAAoB;AAAA,EAC5F;AACA,SAAO;AACT;",
|
|
6
6
|
"names": ["findUp", "fs"]
|
|
7
7
|
}
|
|
@@ -31,9 +31,11 @@ __export(getNodeTypesVersion_exports, {
|
|
|
31
31
|
getNodeTypesVersion: () => getNodeTypesVersion
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(getNodeTypesVersion_exports);
|
|
34
|
+
var import_util = require("util");
|
|
34
35
|
var import_npm_registry_fetch = __toESM(require("npm-registry-fetch"));
|
|
35
36
|
var import_semver = require("semver");
|
|
36
37
|
var import_zod = require("zod");
|
|
38
|
+
var import_logging = require("../../../utils/logging");
|
|
37
39
|
const NpmFetchResponse = import_zod.z.object({
|
|
38
40
|
versions: import_zod.z.record(
|
|
39
41
|
import_zod.z.string(),
|
|
@@ -53,18 +55,19 @@ const getNodeTypesVersion = async (major, defaultVersion) => {
|
|
|
53
55
|
});
|
|
54
56
|
const parsedVersions = NpmFetchResponse.safeParse(response);
|
|
55
57
|
if (!parsedVersions.success) {
|
|
56
|
-
throw new Error("Failed to parse response");
|
|
58
|
+
throw new Error("Failed to parse @types/node response from npm");
|
|
57
59
|
}
|
|
58
|
-
const version = Object.values(parsedVersions.data.versions).filter(
|
|
60
|
+
const { version } = Object.values(parsedVersions.data.versions).filter(
|
|
59
61
|
(v) => (0, import_semver.valid)(v.version) && (0, import_semver.satisfies)(v.version, `${major}.x.x`) && !v.deprecated
|
|
60
|
-
).reduce((a, b) => (0, import_semver.gt)(a.version, b.version) ? a : b)
|
|
62
|
+
).reduce((a, b) => (0, import_semver.gt)(a.version, b.version) ? a : b);
|
|
61
63
|
return {
|
|
62
64
|
version
|
|
63
65
|
};
|
|
64
|
-
} catch {
|
|
66
|
+
} catch (err) {
|
|
67
|
+
import_logging.log.subtle((0, import_util.inspect)(err));
|
|
65
68
|
return {
|
|
66
69
|
version: defaultVersion,
|
|
67
|
-
err:
|
|
70
|
+
err: `Failed to fetch latest @types/node version, using fallback version ${defaultVersion}`
|
|
68
71
|
};
|
|
69
72
|
}
|
|
70
73
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/migrate/nodeVersion/getNodeTypesVersion.ts"],
|
|
4
|
-
"sourcesContent": ["import npmFetch from 'npm-registry-fetch';\nimport { gt, satisfies, valid } from 'semver';\nimport { z } from 'zod';\n\ntype VersionResult = {\n version: string;\n err?: string;\n};\n\nconst NpmFetchResponse = z.object({\n versions: z.record(\n z.string(),\n z.object({\n name: z.string(),\n version: z.string(),\n deprecated: z.string().optional(),\n }),\n ),\n});\n\nexport const getNodeTypesVersion = async (\n major: number,\n defaultVersion: string,\n): Promise<VersionResult> => {\n try {\n const response = await npmFetch.json('@types/node', {\n headers: {\n Accept:\n 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*',\n },\n });\n\n const parsedVersions = NpmFetchResponse.safeParse(response);\n if (!parsedVersions.success) {\n throw new Error('Failed to parse response');\n }\n\n const version = Object.values(parsedVersions.data.versions)\n .filter(\n (v) =>\n valid(v.version) &&\n satisfies(v.version, `${major}.x.x`) &&\n !v.deprecated,\n )\n .reduce((a, b) => (gt(a.version, b.version) ? a : b))
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAqB;AACrB,oBAAqC;AACrC,iBAAkB;
|
|
4
|
+
"sourcesContent": ["import { inspect } from 'util';\n\nimport npmFetch from 'npm-registry-fetch';\nimport { gt, satisfies, valid } from 'semver';\nimport { z } from 'zod';\n\nimport { log } from '../../../utils/logging';\n\ntype VersionResult = {\n version: string;\n err?: string;\n};\n\nconst NpmFetchResponse = z.object({\n versions: z.record(\n z.string(),\n z.object({\n name: z.string(),\n version: z.string(),\n deprecated: z.string().optional(),\n }),\n ),\n});\n\nexport const getNodeTypesVersion = async (\n major: number,\n defaultVersion: string,\n): Promise<VersionResult> => {\n try {\n const response = await npmFetch.json('@types/node', {\n headers: {\n Accept:\n 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*',\n },\n });\n\n const parsedVersions = NpmFetchResponse.safeParse(response);\n if (!parsedVersions.success) {\n throw new Error('Failed to parse @types/node response from npm');\n }\n\n const { version } = Object.values(parsedVersions.data.versions)\n .filter(\n (v) =>\n valid(v.version) &&\n satisfies(v.version, `${major}.x.x`) &&\n !v.deprecated,\n )\n .reduce((a, b) => (gt(a.version, b.version) ? a : b));\n\n return {\n version,\n };\n } catch (err) {\n log.subtle(inspect(err));\n return {\n version: defaultVersion,\n err: `Failed to fetch latest @types/node version, using fallback version ${defaultVersion}`,\n };\n }\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA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gm,
|
|
56
56
|
replace: `FROM$1 gcr.io/distroless/nodejs${nodeVersion}-debian$2$4$5$6`
|
|
57
57
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
{
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
{
|
|
79
|
-
|
|
80
|
-
regex: /(target:\s*'node)(\d+)(.+)$/gm,
|
|
81
|
-
replace: `$1${nodeVersion}$3`
|
|
82
|
-
}
|
|
83
|
-
],
|
|
58
|
+
{
|
|
59
|
+
files: "**/serverless*.y*ml",
|
|
60
|
+
regex: /\bnodejs\d+.x\b/gm,
|
|
61
|
+
tests: [import_checks.isPatchableServerlessVersion],
|
|
62
|
+
replace: `nodejs${nodeVersion}.x`
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
files: "**/serverless*.y*ml",
|
|
66
|
+
regex: /\bnode\d+\b/gm,
|
|
67
|
+
tests: [import_checks.isPatchableServerlessVersion],
|
|
68
|
+
replace: `node${nodeVersion}`
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
files: "**/infra/**/*.ts",
|
|
72
|
+
regex: /NODEJS_\d+_X/g,
|
|
73
|
+
replace: `NODEJS_${nodeVersion}_X`
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
files: "**/infra/**/*.ts",
|
|
77
|
+
regex: /(target:\s*'node)(\d+)(.+)$/gm,
|
|
78
|
+
replace: `$1${nodeVersion}$3`
|
|
79
|
+
},
|
|
84
80
|
{
|
|
85
81
|
files: "**/.buildkite/*",
|
|
86
82
|
regex: /(image: )(public.ecr.aws\/docker\/library\/)?(node:)[0-9.]+(\.[^- \n]+)?(-[^ \n]+)?$/gm,
|
|
@@ -88,37 +84,33 @@ const subPatches = ({
|
|
|
88
84
|
},
|
|
89
85
|
{
|
|
90
86
|
files: ".node-version*",
|
|
91
|
-
regex: /(
|
|
92
|
-
replace: `$
|
|
87
|
+
regex: /(\d+(?:\.\d+)*)/g,
|
|
88
|
+
replace: `${nodeVersion}`
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
files: "**/package.json",
|
|
92
|
+
regex: /(\\?"@types\/node\\?": \\?")(\^)?[0-9.]+(\\?(",?)\\?n?)/gm,
|
|
93
|
+
tests: [import_checks.isPatchableServerlessVersion],
|
|
94
|
+
replace: `$1$2${nodeTypesVersion}$4`
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
files: "**/package.json",
|
|
98
|
+
regex: /(\\?"engines\\?":\s*{\\?n?[^}]*\\?"node\\?":\s*\\?">=)(\d+(?:\.\d+)*)\\?("[^}]*})(?![^}]*\\?"skuba\\?":\s*{\\?n?[^}]*\\?"type\\?":\s*\\?"package\\?")/gm,
|
|
99
|
+
tests: [import_checks.isPatchableServerlessVersion, import_checks.isPatchableSkubaType],
|
|
100
|
+
replace: `$1${nodeVersion}$3`
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
files: "**/tsconfig*.json",
|
|
104
|
+
regex: /("target":\s*")(ES\d+)"/gim,
|
|
105
|
+
tests: [import_checks.isPatchableServerlessVersion, import_checks.isPatchableSkubaType],
|
|
106
|
+
replace: `$1${ECMAScriptVersion}"`
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
files: "**/tsconfig*.json",
|
|
110
|
+
regex: /("lib":\s*\[)([\S\s]*?)(ES\d+)([\S\s]*?)(\])/gim,
|
|
111
|
+
tests: [import_checks.isPatchableServerlessVersion, import_checks.isPatchableSkubaType],
|
|
112
|
+
replace: `$1$2${ECMAScriptVersion}$4$5`
|
|
93
113
|
},
|
|
94
|
-
[
|
|
95
|
-
{
|
|
96
|
-
files: "**/package.json",
|
|
97
|
-
regex: /(\\?"@types\/node\\?": \\?")(\^)?[0-9.]+(\\?(",?)\\?n?)/gm,
|
|
98
|
-
tests: [import_checks.isPatchableServerlessVersion],
|
|
99
|
-
replace: `$1$2${nodeTypesVersion}$4`
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
files: "**/package.json",
|
|
103
|
-
regex: /(\\?"engines\\?":\s*{\\?n?[^}]*\\?"node\\?":\s*\\?">=)(\d+)\\?("[^}]*})(?![^}]*\\?"skuba\\?":\s*{\\?n?[^}]*\\?"type\\?":\s*\\?"package\\?")/gm,
|
|
104
|
-
tests: [import_checks.isPatchableServerlessVersion, import_checks.isPatchableSkubaType],
|
|
105
|
-
replace: `$1${nodeVersion}$3`
|
|
106
|
-
}
|
|
107
|
-
],
|
|
108
|
-
[
|
|
109
|
-
{
|
|
110
|
-
files: "**/tsconfig*.json",
|
|
111
|
-
regex: /("target":\s*")(ES\d+)"/gim,
|
|
112
|
-
tests: [import_checks.isPatchableServerlessVersion, import_checks.isPatchableSkubaType],
|
|
113
|
-
replace: `$1${ECMAScriptVersion}"`
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
files: "**/tsconfig*.json",
|
|
117
|
-
regex: /("lib":\s*\[)([\S\s]*?)(ES\d+)([\S\s]*?)(\])/gim,
|
|
118
|
-
tests: [import_checks.isPatchableServerlessVersion, import_checks.isPatchableSkubaType],
|
|
119
|
-
replace: `$1$2${ECMAScriptVersion}$4$5`
|
|
120
|
-
}
|
|
121
|
-
],
|
|
122
114
|
{
|
|
123
115
|
files: "**/docker-compose*.y*ml",
|
|
124
116
|
regex: /(image: )(public.ecr.aws\/docker\/library\/)?(node:)[0-9.]+(\.[^- \n]+)?(-[^ \n]+)?$/gm,
|
|
@@ -126,12 +118,6 @@ const subPatches = ({
|
|
|
126
118
|
}
|
|
127
119
|
];
|
|
128
120
|
const runSubPatch = async (dir, patch) => {
|
|
129
|
-
if (Array.isArray(patch)) {
|
|
130
|
-
for (const subPatch of patch) {
|
|
131
|
-
await runSubPatch(dir, subPatch);
|
|
132
|
-
}
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
121
|
const readFile = (0, import_project.createDestinationFileReader)(dir);
|
|
136
122
|
const paths = patch.file ? [patch.file] : await (0, import_fast_glob.glob)(patch.files ?? [], { cwd: dir });
|
|
137
123
|
await Promise.all(
|
|
@@ -171,9 +157,9 @@ const writePatchedContents = async ({
|
|
|
171
157
|
regex ? contents.replaceAll(regex, templated) : templated
|
|
172
158
|
);
|
|
173
159
|
const upgrade = async (versions, dir) => {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
160
|
+
for (const subPatch of subPatches(versions)) {
|
|
161
|
+
await runSubPatch(dir, subPatch);
|
|
162
|
+
}
|
|
177
163
|
};
|
|
178
164
|
const nodeVersionMigration = async ({
|
|
179
165
|
nodeVersion,
|
|
@@ -183,7 +169,7 @@ const nodeVersionMigration = async ({
|
|
|
183
169
|
import_logging.log.ok(`Upgrading to Node.js ${nodeVersion}`);
|
|
184
170
|
try {
|
|
185
171
|
if (!await (0, import_checks.isPatchableNodeVersion)(nodeVersion)) {
|
|
186
|
-
throw new Error("Node version is not patchable");
|
|
172
|
+
throw new Error("Node.js version is not patchable");
|
|
187
173
|
}
|
|
188
174
|
const { version: nodeTypesVersion, err } = await (0, import_getNodeTypesVersion.getNodeTypesVersion)(
|
|
189
175
|
nodeVersion,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/migrate/nodeVersion/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { inspect } from 'util';\n\nimport { glob } from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { log } from '../../../utils/logging';\nimport { createDestinationFileReader } from '../../configure/analysis/project';\n\nimport {\n isPatchableNodeVersion,\n isPatchableServerlessVersion,\n isPatchableSkubaType,\n} from './checks';\nimport { getNodeTypesVersion } from './getNodeTypesVersion';\n\ntype FileSelector =\n | { files: string; file?: never }\n | { file: string; files?: never };\n\ntype SubPatch = FileSelector & {\n tests?: Array<() => Promise<boolean>>;\n regex?: RegExp;\n replace: string;\n};\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAqB;AACrB,sBAAe;AAEf,qBAAoB;AACpB,qBAA4C;AAE5C,oBAIO;AACP,iCAAoC;
|
|
4
|
+
"sourcesContent": ["import { inspect } from 'util';\n\nimport { glob } from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { log } from '../../../utils/logging';\nimport { createDestinationFileReader } from '../../configure/analysis/project';\n\nimport {\n isPatchableNodeVersion,\n isPatchableServerlessVersion,\n isPatchableSkubaType,\n} from './checks';\nimport { getNodeTypesVersion } from './getNodeTypesVersion';\n\ntype FileSelector =\n | { files: string; file?: never }\n | { file: string; files?: never };\n\ntype SubPatch = FileSelector & {\n tests?: Array<() => Promise<boolean>>;\n regex?: RegExp;\n replace: string;\n};\n\nconst subPatches = ({\n nodeVersion,\n nodeTypesVersion,\n ECMAScriptVersion,\n}: Versions): SubPatch[] => [\n { file: '.nvmrc', replace: `${nodeVersion}\\n` },\n {\n files: '**/Dockerfile*',\n\n regex:\n /^FROM(.*) (public.ecr.aws\\/docker\\/library\\/)?node:([0-9]+(?:\\.[0-9]+(?:\\.[0-9]+)?)?)(-[a-z0-9]+)?(@sha256:[a-f0-9]{64})?( .*)?$/gm,\n replace: `FROM$1 $2node:${nodeVersion}$4$6`,\n },\n {\n files: '**/Dockerfile*',\n regex:\n /^FROM(.*) gcr.io\\/distroless\\/nodejs\\d+-debian(\\d+)(@sha256:[a-f0-9]{64})?(\\.[^- \\n]+)?(-[^ \\n]+)?( .+|)$/gm,\n replace: `FROM$1 gcr.io/distroless/nodejs${nodeVersion}-debian$2$4$5$6`,\n },\n\n {\n files: '**/serverless*.y*ml',\n regex: /\\bnodejs\\d+.x\\b/gm,\n tests: [isPatchableServerlessVersion],\n replace: `nodejs${nodeVersion}.x`,\n },\n {\n files: '**/serverless*.y*ml',\n regex: /\\bnode\\d+\\b/gm,\n tests: [isPatchableServerlessVersion],\n replace: `node${nodeVersion}`,\n },\n\n {\n files: '**/infra/**/*.ts',\n regex: /NODEJS_\\d+_X/g,\n replace: `NODEJS_${nodeVersion}_X`,\n },\n {\n files: '**/infra/**/*.ts',\n regex: /(target:\\s*'node)(\\d+)(.+)$/gm,\n replace: `$1${nodeVersion}$3`,\n },\n\n {\n files: '**/.buildkite/*',\n regex:\n /(image: )(public.ecr.aws\\/docker\\/library\\/)?(node:)[0-9.]+(\\.[^- \\n]+)?(-[^ \\n]+)?$/gm,\n replace: `$1$2$3${nodeVersion}$5`,\n },\n {\n files: '.node-version*',\n regex: /(\\d+(?:\\.\\d+)*)/g,\n replace: `${nodeVersion}`,\n },\n\n {\n files: '**/package.json',\n regex: /(\\\\?\"@types\\/node\\\\?\": \\\\?\")(\\^)?[0-9.]+(\\\\?(\",?)\\\\?n?)/gm,\n tests: [isPatchableServerlessVersion],\n replace: `$1$2${nodeTypesVersion}$4`,\n },\n {\n files: '**/package.json',\n regex:\n /(\\\\?\"engines\\\\?\":\\s*{\\\\?n?[^}]*\\\\?\"node\\\\?\":\\s*\\\\?\">=)(\\d+(?:\\.\\d+)*)\\\\?(\"[^}]*})(?![^}]*\\\\?\"skuba\\\\?\":\\s*{\\\\?n?[^}]*\\\\?\"type\\\\?\":\\s*\\\\?\"package\\\\?\")/gm,\n tests: [isPatchableServerlessVersion, isPatchableSkubaType],\n replace: `$1${nodeVersion}$3`,\n },\n\n {\n files: '**/tsconfig*.json',\n regex: /(\"target\":\\s*\")(ES\\d+)\"/gim,\n tests: [isPatchableServerlessVersion, isPatchableSkubaType],\n replace: `$1${ECMAScriptVersion}\"`,\n },\n {\n files: '**/tsconfig*.json',\n regex: /(\"lib\":\\s*\\[)([\\S\\s]*?)(ES\\d+)([\\S\\s]*?)(\\])/gim,\n tests: [isPatchableServerlessVersion, isPatchableSkubaType],\n replace: `$1$2${ECMAScriptVersion}$4$5`,\n },\n\n {\n files: '**/docker-compose*.y*ml',\n regex:\n /(image: )(public.ecr.aws\\/docker\\/library\\/)?(node:)[0-9.]+(\\.[^- \\n]+)?(-[^ \\n]+)?$/gm,\n\n replace: `$1$2$3${nodeVersion}$5`,\n },\n];\n\ntype Versions = {\n nodeVersion: number;\n nodeTypesVersion: string;\n ECMAScriptVersion: string;\n};\n\nconst runSubPatch = async (dir: string, patch: SubPatch) => {\n const readFile = createDestinationFileReader(dir);\n const paths = patch.file\n ? [patch.file]\n : await glob(patch.files ?? [], { cwd: dir });\n\n await Promise.all(\n paths.map(async (path) => {\n if (path.includes('node_modules')) {\n return;\n }\n const contents = await readFile(path);\n if (!contents) {\n return;\n }\n\n if (patch.regex && !patch.regex.test(contents)) {\n return;\n }\n\n if (patch.tests) {\n const results = await Promise.all(patch.tests.map((test) => test()));\n if (!results.every(Boolean)) {\n return;\n }\n }\n\n await writePatchedContents({\n path,\n contents,\n templated: patch.replace,\n regex: patch.regex,\n });\n }),\n );\n};\n\nconst writePatchedContents = async ({\n path,\n contents,\n templated,\n regex,\n}: {\n path: string;\n contents: string;\n templated: string;\n regex?: RegExp;\n}) =>\n await fs.promises.writeFile(\n path,\n regex ? contents.replaceAll(regex, templated) : templated,\n );\n\nconst upgrade = async (versions: Versions, dir: string) => {\n for (const subPatch of subPatches(versions)) {\n await runSubPatch(dir, subPatch);\n }\n};\n\nexport const nodeVersionMigration = async (\n {\n nodeVersion,\n ECMAScriptVersion,\n defaultNodeTypesVersion,\n }: {\n nodeVersion: number;\n ECMAScriptVersion: string;\n defaultNodeTypesVersion: string;\n },\n dir = process.cwd(),\n) => {\n log.ok(`Upgrading to Node.js ${nodeVersion}`);\n try {\n if (!(await isPatchableNodeVersion(nodeVersion))) {\n throw new Error('Node.js version is not patchable');\n }\n\n const { version: nodeTypesVersion, err } = await getNodeTypesVersion(\n nodeVersion,\n defaultNodeTypesVersion,\n );\n if (err) {\n log.warn(err);\n }\n await upgrade({ nodeVersion, nodeTypesVersion, ECMAScriptVersion }, dir);\n log.ok('Upgraded to Node.js', nodeVersion);\n } catch (error) {\n log.err('Failed to upgrade');\n log.subtle(inspect(error));\n process.exitCode = 1;\n }\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAqB;AACrB,sBAAe;AAEf,qBAAoB;AACpB,qBAA4C;AAE5C,oBAIO;AACP,iCAAoC;AAYpC,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AACF,MAA4B;AAAA,EAC1B,EAAE,MAAM,UAAU,SAAS,GAAG,WAAW;AAAA,EAAK;AAAA,EAC9C;AAAA,IACE,OAAO;AAAA,IAEP,OACE;AAAA,IACF,SAAS,iBAAiB,WAAW;AAAA,EACvC;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OACE;AAAA,IACF,SAAS,kCAAkC,WAAW;AAAA,EACxD;AAAA,EAEA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO,CAAC,0CAA4B;AAAA,IACpC,SAAS,SAAS,WAAW;AAAA,EAC/B;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO,CAAC,0CAA4B;AAAA,IACpC,SAAS,OAAO,WAAW;AAAA,EAC7B;AAAA,EAEA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,SAAS,UAAU,WAAW;AAAA,EAChC;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,SAAS,KAAK,WAAW;AAAA,EAC3B;AAAA,EAEA;AAAA,IACE,OAAO;AAAA,IACP,OACE;AAAA,IACF,SAAS,SAAS,WAAW;AAAA,EAC/B;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO;AAAA,IACP,SAAS,GAAG,WAAW;AAAA,EACz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ACF;AAEA,YAAM,qBAAqB;AAAA,QACzB;AAAA,QACA;AAAA,QACA,WAAW,MAAM;AAAA,QACjB,OAAO,MAAM;AAAA,MACf,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF;AAEA,MAAM,uBAAuB,OAAO;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAME,MAAM,gBAAAA,QAAG,SAAS;AAAA,EAChB;AAAA,EACA,QAAQ,SAAS,WAAW,OAAO,SAAS,IAAI;AAClD;AAEF,MAAM,UAAU,OAAO,UAAoB,QAAgB;AACzD,aAAW,YAAY,WAAW,QAAQ,GAAG;AAC3C,UAAM,YAAY,KAAK,QAAQ;AAAA,EACjC;AACF;AAEO,MAAM,uBAAuB,OAClC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF,GAKA,MAAM,QAAQ,IAAI,MACf;AACH,qBAAI,GAAG,wBAAwB,WAAW,EAAE;AAC5C,MAAI;AACF,QAAI,CAAE,UAAM,sCAAuB,WAAW,GAAI;AAChD,YAAM,IAAI,MAAM,kCAAkC;AAAA,IACpD;AAEA,UAAM,EAAE,SAAS,kBAAkB,IAAI,IAAI,UAAM;AAAA,MAC/C;AAAA,MACA;AAAA,IACF;AACA,QAAI,KAAK;AACP,yBAAI,KAAK,GAAG;AAAA,IACd;AACA,UAAM,QAAQ,EAAE,aAAa,kBAAkB,kBAAkB,GAAG,GAAG;AACvE,uBAAI,GAAG,uBAAuB,WAAW;AAAA,EAC3C,SAAS,OAAO;AACd,uBAAI,IAAI,mBAAmB;AAC3B,uBAAI,WAAO,qBAAQ,KAAK,CAAC;AACzB,YAAQ,WAAW;AAAA,EACrB;AACF;",
|
|
6
6
|
"names": ["fs"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skuba",
|
|
3
|
-
"version": "10.0.0-node-22-
|
|
3
|
+
"version": "10.0.0-node-22-20250226231811",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "SEEK development toolkit for backend applications and packages",
|
|
6
6
|
"homepage": "https://github.com/seek-oss/skuba#readme",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"typescript": "~5.7.0",
|
|
101
101
|
"validate-npm-package-name": "^6.0.0",
|
|
102
102
|
"zod": "^3.22.4",
|
|
103
|
-
"eslint-config-skuba": "5.1.0-node-22-
|
|
103
|
+
"eslint-config-skuba": "5.1.0-node-22-20250226231811"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@changesets/cli": "2.27.12",
|