@sebspark/spanner-migrate 1.1.2 → 1.1.4
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/dist/{chunk-JLU5DVQC.mjs → chunk-YL5IK6VK.mjs} +3 -3
- package/dist/cli.js +1 -1
- package/dist/cli.mjs +3 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +8 -8
|
@@ -168,8 +168,8 @@ var getAppliedMigrations = async (db) => {
|
|
|
168
168
|
};
|
|
169
169
|
|
|
170
170
|
// src/files.ts
|
|
171
|
-
import { access, mkdir,
|
|
172
|
-
import { join, resolve } from "
|
|
171
|
+
import { access, mkdir, readdir, readFile, writeFile } from "fs/promises";
|
|
172
|
+
import { join, resolve } from "path";
|
|
173
173
|
var getMigrationFiles = async (path) => {
|
|
174
174
|
try {
|
|
175
175
|
const files = await readdir(path);
|
|
@@ -186,7 +186,7 @@ var getMigration = async (path, id) => {
|
|
|
186
186
|
const filePath = resolve(process.cwd(), join(path, `${id}.sql`));
|
|
187
187
|
try {
|
|
188
188
|
await access(filePath);
|
|
189
|
-
} catch
|
|
189
|
+
} catch {
|
|
190
190
|
throw new Error(`Migration file not found: ${filePath}`);
|
|
191
191
|
}
|
|
192
192
|
const migrationText = await readFile(filePath, "utf8");
|
package/dist/cli.js
CHANGED
|
@@ -218,7 +218,7 @@ var getMigration = async (path, id) => {
|
|
|
218
218
|
const filePath = (0, import_node_path.resolve)(process.cwd(), (0, import_node_path.join)(path, `${id}.sql`));
|
|
219
219
|
try {
|
|
220
220
|
await (0, import_promises.access)(filePath);
|
|
221
|
-
} catch
|
|
221
|
+
} catch {
|
|
222
222
|
throw new Error(`Migration file not found: ${filePath}`);
|
|
223
223
|
}
|
|
224
224
|
const migrationText = await (0, import_promises.readFile)(filePath, "utf8");
|
package/dist/cli.mjs
CHANGED
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
init,
|
|
6
6
|
status,
|
|
7
7
|
up
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YL5IK6VK.mjs";
|
|
9
9
|
|
|
10
10
|
// src/cli.ts
|
|
11
|
-
import fs from "
|
|
12
|
-
import { join } from "
|
|
11
|
+
import fs from "fs/promises";
|
|
12
|
+
import { join } from "path";
|
|
13
13
|
import { input, select } from "@inquirer/prompts";
|
|
14
14
|
import yargs from "yargs";
|
|
15
15
|
import { hideBin } from "yargs/helpers";
|
package/dist/index.js
CHANGED
|
@@ -214,7 +214,7 @@ var getMigration = async (path, id) => {
|
|
|
214
214
|
const filePath = (0, import_node_path.resolve)(process.cwd(), (0, import_node_path.join)(path, `${id}.sql`));
|
|
215
215
|
try {
|
|
216
216
|
await (0, import_promises.access)(filePath);
|
|
217
|
-
} catch
|
|
217
|
+
} catch {
|
|
218
218
|
throw new Error(`Migration file not found: ${filePath}`);
|
|
219
219
|
}
|
|
220
220
|
const migrationText = await (0, import_promises.readFile)(filePath, "utf8");
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebspark/spanner-migrate",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -18,25 +18,25 @@
|
|
|
18
18
|
"typecheck": "tsc --noEmit "
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@google-cloud/spanner": "8.
|
|
21
|
+
"@google-cloud/spanner": "8.2.1",
|
|
22
22
|
"@sebspark/cli-tester": "*",
|
|
23
23
|
"@sebspark/spanner-mock": "*",
|
|
24
24
|
"@types/jest": "29.5.14",
|
|
25
25
|
"@types/yargs": "17.0.33",
|
|
26
26
|
"jest": "29.7.0",
|
|
27
|
-
"testcontainers": "
|
|
28
|
-
"ts-jest": "29.
|
|
27
|
+
"testcontainers": "11.7.0",
|
|
28
|
+
"ts-jest": "29.4.4",
|
|
29
29
|
"tsconfig": "*"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@google-cloud/spanner": "*"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@inquirer/prompts": "7.
|
|
35
|
+
"@inquirer/prompts": "7.8.6",
|
|
36
36
|
"@jest/globals": "29.7.0",
|
|
37
|
-
"@types/node": "20.17
|
|
38
|
-
"typescript": "5.
|
|
39
|
-
"vitest": "3.
|
|
37
|
+
"@types/node": "20.19.17",
|
|
38
|
+
"typescript": "5.9.2",
|
|
39
|
+
"vitest": "3.2.4",
|
|
40
40
|
"yargs": "17.7.2"
|
|
41
41
|
}
|
|
42
42
|
}
|