@shopify/create-app 3.65.3 → 3.66.0
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-2RSJVBMF.js +5625 -0
- package/dist/{chunk-Z65QJ5D7.js → chunk-4DRC2PSU.js} +17 -30
- package/dist/chunk-4OD45DDO.js +31508 -0
- package/dist/chunk-522OB3EU.js +45 -0
- package/dist/{chunk-S57LLFKK.js → chunk-5U24TEX5.js} +5434 -10324
- package/dist/{chunk-GJPZCXGT.js → chunk-6A7MXLVB.js} +159 -405
- package/dist/{chunk-FUPW7TWB.js → chunk-7ZCQLP5Y.js} +3 -3
- package/dist/{chunk-5LBEKXRW.js → chunk-FIJKOZJF.js} +19 -55
- package/dist/{chunk-2JG3TU4D.js → chunk-FT6PCF6E.js} +2441 -5551
- package/dist/chunk-GIUM5DCQ.js +2144 -0
- package/dist/chunk-HIAKHDLR.js +54 -0
- package/dist/chunk-LLSRDN3T.js +15352 -0
- package/dist/chunk-LTDD2GRL.js +111 -0
- package/dist/{chunk-56H6ULTJ.js → chunk-NGBYQF44.js} +9 -9
- package/dist/chunk-NLC7NBUB.js +80 -0
- package/dist/{chunk-FMKVOTQK.js → chunk-O5K4AU7Q.js} +18 -34
- package/dist/chunk-OMDEA7TV.js +10615 -0
- package/dist/chunk-PNN7RS7Y.js +105 -0
- package/dist/{chunk-ZPL24Y2D.js → chunk-POZ5MGPT.js} +13 -18
- package/dist/chunk-T7T35H4F.js +108 -0
- package/dist/chunk-UBB7JKND.js +55 -0
- package/dist/chunk-VSLR7ET4.js +3034 -0
- package/dist/{chunk-SAO7C4LP.js → chunk-VZVGAREJ.js} +46821 -101962
- package/dist/{chunk-C34SFNV7.js → chunk-WBQF4CSV.js} +12 -22
- package/dist/chunk-XVNW332R.js +524 -0
- package/dist/{chunk-AB7PVDZA.js → chunk-Y4ECGRAF.js} +13 -23
- package/dist/chunk-ZAUZQLNO.js +3774 -0
- package/dist/chunk-ZULFH3SL.js +1847 -0
- package/dist/commands/init.d.ts +0 -1
- package/dist/commands/init.js +27 -27
- package/dist/commands/init.test.js +51 -70
- package/dist/{constants-24TFXZKQ.js → constants-WG7I7G3O.js} +5 -5
- package/dist/custom-oclif-loader-JKRJZ56E.js +47 -0
- package/dist/del-NW5KFKFP.js +1820 -0
- package/dist/devtools-UBOREV57.js +2572 -0
- package/dist/error-handler-26SLAJTC.js +35 -0
- package/dist/hooks/postrun.js +35 -42
- package/dist/hooks/prerun.js +58 -36
- package/dist/index.js +7 -7
- package/dist/lib-3K5QYF3J.js +9 -0
- package/dist/{local-IEMPZHFX.js → local-H6TW5MNX.js} +13 -13
- package/dist/magic-string.es-3RXPUXZF.js +843 -0
- package/dist/multipart-parser-QKUAJJP5.js +193 -0
- package/dist/{node-package-manager-LYYU5SQZ.js → node-package-manager-QAUN6HGS.js} +16 -14
- package/dist/open-MZGVNFZO.js +197 -0
- package/dist/out-KDGAD475.js +6 -0
- package/dist/{path-CFPIDSWV.js → path-L375JOQ2.js} +4 -4
- package/dist/prompts/init.js +13 -13
- package/dist/prompts/init.test.js +42 -59
- package/dist/services/init.js +20 -20
- package/dist/services/init.test.js +5 -5
- package/dist/system-ZI2HKAKO.js +26 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-SSXOUA2N.js → ui-727JEZUX.js} +13 -13
- package/dist/utils/template/cleanup.js +13 -13
- package/dist/utils/template/cleanup.test.js +18 -30
- package/dist/utils/template/npm.js +15 -15
- package/dist/utils/template/npm.test.js +48 -87
- package/oclif.manifest.json +1 -1
- package/package.json +3 -4
- package/dist/chunk-3G24M6S4.js +0 -3185
- package/dist/chunk-44DJDCJW.js +0 -7843
- package/dist/chunk-B3EA2BEZ.js +0 -22131
- package/dist/chunk-DL3MKXVR.js +0 -4754
- package/dist/chunk-EJ67NGP2.js +0 -105
- package/dist/chunk-G4XEYGTB.js +0 -63
- package/dist/chunk-IKO7JBOJ.js +0 -14788
- package/dist/chunk-LSCXQWNO.js +0 -822
- package/dist/chunk-M2VKB6RG.js +0 -146
- package/dist/chunk-MCED27CG.js +0 -5626
- package/dist/chunk-NSNRZPBN.js +0 -145
- package/dist/chunk-P5J3HFWZ.js +0 -44962
- package/dist/chunk-RAQ4Z7GU.js +0 -2477
- package/dist/chunk-SWNRLCC6.js +0 -61
- package/dist/chunk-T5LLJYYS.js +0 -195
- package/dist/chunk-YC4FLMDD.js +0 -74
- package/dist/custom-oclif-loader-B7KCOFFE.js +0 -83
- package/dist/del-ZCPTGWOA.js +0 -2847
- package/dist/devtools-5N4JAP3R.js +0 -3588
- package/dist/error-handler-6K3LQUFG.js +0 -35
- package/dist/lib-CTSCLPNV.js +0 -9
- package/dist/magic-string.es-ATGURXGQ.js +0 -1353
- package/dist/multipart-parser-KYOHF24X.js +0 -360
- package/dist/open-JRS7RW22.js +0 -291
- package/dist/out-OKI3G7I5.js +0 -6
- package/dist/system-23HIJRP3.js +0 -26
|
@@ -17,18 +17,18 @@ import {
|
|
|
17
17
|
renderText,
|
|
18
18
|
renderTextPrompt,
|
|
19
19
|
renderWarning
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-4OD45DDO.js";
|
|
21
|
+
import "./chunk-XVNW332R.js";
|
|
22
|
+
import "./chunk-FIJKOZJF.js";
|
|
23
|
+
import "./chunk-4DRC2PSU.js";
|
|
24
|
+
import "./chunk-LTDD2GRL.js";
|
|
25
|
+
import "./chunk-VZVGAREJ.js";
|
|
26
|
+
import "./chunk-6A7MXLVB.js";
|
|
27
|
+
import "./chunk-ZAUZQLNO.js";
|
|
28
|
+
import "./chunk-UBB7JKND.js";
|
|
29
|
+
import "./chunk-522OB3EU.js";
|
|
30
|
+
import "./chunk-PNN7RS7Y.js";
|
|
31
|
+
import "./chunk-POZ5MGPT.js";
|
|
32
32
|
export {
|
|
33
33
|
handleCtrlC,
|
|
34
34
|
isTTY,
|
|
@@ -49,4 +49,4 @@ export {
|
|
|
49
49
|
renderTextPrompt,
|
|
50
50
|
renderWarning
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=ui-
|
|
52
|
+
//# sourceMappingURL=ui-727JEZUX.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cleanup
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
15
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-NGBYQF44.js";
|
|
4
|
+
import "../../chunk-4OD45DDO.js";
|
|
5
|
+
import "../../chunk-XVNW332R.js";
|
|
6
|
+
import "../../chunk-FIJKOZJF.js";
|
|
7
|
+
import "../../chunk-4DRC2PSU.js";
|
|
8
|
+
import "../../chunk-LTDD2GRL.js";
|
|
9
|
+
import "../../chunk-VZVGAREJ.js";
|
|
10
|
+
import "../../chunk-6A7MXLVB.js";
|
|
11
|
+
import "../../chunk-ZAUZQLNO.js";
|
|
12
|
+
import "../../chunk-UBB7JKND.js";
|
|
13
|
+
import "../../chunk-522OB3EU.js";
|
|
14
|
+
import "../../chunk-PNN7RS7Y.js";
|
|
15
|
+
import "../../chunk-POZ5MGPT.js";
|
|
16
16
|
export {
|
|
17
17
|
cleanup as default
|
|
18
18
|
};
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cleanup
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-NGBYQF44.js";
|
|
4
4
|
import {
|
|
5
5
|
fileExists,
|
|
6
6
|
inTemporaryDirectory,
|
|
7
7
|
mkdir,
|
|
8
8
|
writeFile
|
|
9
|
-
} from "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
9
|
+
} from "../../chunk-4OD45DDO.js";
|
|
10
|
+
import "../../chunk-XVNW332R.js";
|
|
11
|
+
import "../../chunk-FIJKOZJF.js";
|
|
12
12
|
import {
|
|
13
13
|
joinPath
|
|
14
|
-
} from "../../chunk-
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-
|
|
17
|
-
import "../../chunk-
|
|
18
|
-
import "../../chunk-
|
|
19
|
-
import "../../chunk-
|
|
14
|
+
} from "../../chunk-4DRC2PSU.js";
|
|
15
|
+
import "../../chunk-LTDD2GRL.js";
|
|
16
|
+
import "../../chunk-VZVGAREJ.js";
|
|
17
|
+
import "../../chunk-6A7MXLVB.js";
|
|
18
|
+
import "../../chunk-ZAUZQLNO.js";
|
|
19
|
+
import "../../chunk-UBB7JKND.js";
|
|
20
20
|
import {
|
|
21
21
|
describe,
|
|
22
22
|
globalExpect,
|
|
23
23
|
test
|
|
24
|
-
} from "../../chunk-
|
|
25
|
-
import "../../chunk-
|
|
26
|
-
import "../../chunk-
|
|
24
|
+
} from "../../chunk-OMDEA7TV.js";
|
|
25
|
+
import "../../chunk-522OB3EU.js";
|
|
26
|
+
import "../../chunk-PNN7RS7Y.js";
|
|
27
27
|
import {
|
|
28
28
|
init_cjs_shims
|
|
29
|
-
} from "../../chunk-
|
|
29
|
+
} from "../../chunk-POZ5MGPT.js";
|
|
30
30
|
|
|
31
31
|
// src/utils/template/cleanup.test.ts
|
|
32
32
|
init_cjs_shims();
|
|
@@ -42,8 +42,7 @@ describe("cleanup", () => {
|
|
|
42
42
|
mkdir(joinPath(tmpDir, ".gitmodules")),
|
|
43
43
|
mkdir(joinPath(tmpDir, "frontend")),
|
|
44
44
|
mkdir(joinPath(tmpDir, "package.json.cli2"))
|
|
45
|
-
])
|
|
46
|
-
await Promise.all([
|
|
45
|
+
]), await Promise.all([
|
|
47
46
|
// should keep these
|
|
48
47
|
writeFile(joinPath(tmpDir, "frontend", "server.js"), "console.log()"),
|
|
49
48
|
// should delete these
|
|
@@ -53,22 +52,11 @@ describe("cleanup", () => {
|
|
|
53
52
|
}
|
|
54
53
|
test("cleans up template files in web directory", async () => {
|
|
55
54
|
await inTemporaryDirectory(async (tmpDir) => {
|
|
56
|
-
await mockProjectFolder(tmpDir);
|
|
57
|
-
await cleanup(tmpDir);
|
|
58
|
-
await globalExpect(fileExists(joinPath(tmpDir, ".git"))).resolves.toBe(false);
|
|
59
|
-
await globalExpect(fileExists(joinPath(tmpDir, ".github"))).resolves.toBe(false);
|
|
60
|
-
await globalExpect(fileExists(joinPath(tmpDir, ".gitmodules"))).resolves.toBe(false);
|
|
61
|
-
await globalExpect(fileExists(joinPath(tmpDir, "frontend", ".git"))).resolves.toBe(false);
|
|
62
|
-
await globalExpect(fileExists(joinPath(tmpDir, "package.json.cli2"))).resolves.toBe(false);
|
|
55
|
+
await mockProjectFolder(tmpDir), await cleanup(tmpDir), await globalExpect(fileExists(joinPath(tmpDir, ".git"))).resolves.toBe(!1), await globalExpect(fileExists(joinPath(tmpDir, ".github"))).resolves.toBe(!1), await globalExpect(fileExists(joinPath(tmpDir, ".gitmodules"))).resolves.toBe(!1), await globalExpect(fileExists(joinPath(tmpDir, "frontend", ".git"))).resolves.toBe(!1), await globalExpect(fileExists(joinPath(tmpDir, "package.json.cli2"))).resolves.toBe(!1);
|
|
63
56
|
});
|
|
64
|
-
})
|
|
65
|
-
test("keeps non-template files", async () => {
|
|
57
|
+
}), test("keeps non-template files", async () => {
|
|
66
58
|
await inTemporaryDirectory(async (tmpDir) => {
|
|
67
|
-
await mockProjectFolder(tmpDir);
|
|
68
|
-
await cleanup(tmpDir);
|
|
69
|
-
await globalExpect(fileExists(joinPath(tmpDir, "server.js"))).resolves.toBe(true);
|
|
70
|
-
await globalExpect(fileExists(joinPath(tmpDir, "node_modules"))).resolves.toBe(true);
|
|
71
|
-
await globalExpect(fileExists(joinPath(tmpDir, "frontend", "node_modules"))).resolves.toBe(true);
|
|
59
|
+
await mockProjectFolder(tmpDir), await cleanup(tmpDir), await globalExpect(fileExists(joinPath(tmpDir, "server.js"))).resolves.toBe(!0), await globalExpect(fileExists(joinPath(tmpDir, "node_modules"))).resolves.toBe(!0), await globalExpect(fileExists(joinPath(tmpDir, "frontend", "node_modules"))).resolves.toBe(!0);
|
|
72
60
|
});
|
|
73
61
|
});
|
|
74
62
|
});
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDeepInstallNPMTasks,
|
|
3
3
|
updateCLIDependencies
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-
|
|
17
|
-
import "../../chunk-
|
|
18
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-HIAKHDLR.js";
|
|
5
|
+
import "../../chunk-7ZCQLP5Y.js";
|
|
6
|
+
import "../../chunk-LLSRDN3T.js";
|
|
7
|
+
import "../../chunk-4OD45DDO.js";
|
|
8
|
+
import "../../chunk-XVNW332R.js";
|
|
9
|
+
import "../../chunk-FIJKOZJF.js";
|
|
10
|
+
import "../../chunk-4DRC2PSU.js";
|
|
11
|
+
import "../../chunk-LTDD2GRL.js";
|
|
12
|
+
import "../../chunk-VZVGAREJ.js";
|
|
13
|
+
import "../../chunk-6A7MXLVB.js";
|
|
14
|
+
import "../../chunk-ZAUZQLNO.js";
|
|
15
|
+
import "../../chunk-UBB7JKND.js";
|
|
16
|
+
import "../../chunk-522OB3EU.js";
|
|
17
|
+
import "../../chunk-PNN7RS7Y.js";
|
|
18
|
+
import "../../chunk-POZ5MGPT.js";
|
|
19
19
|
export {
|
|
20
20
|
getDeepInstallNPMTasks,
|
|
21
21
|
updateCLIDependencies
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDeepInstallNPMTasks,
|
|
3
3
|
updateCLIDependencies
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-HIAKHDLR.js";
|
|
5
|
+
import "../../chunk-7ZCQLP5Y.js";
|
|
6
6
|
import {
|
|
7
7
|
installNodeModules
|
|
8
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-LLSRDN3T.js";
|
|
9
9
|
import {
|
|
10
10
|
inTemporaryDirectory,
|
|
11
11
|
mkdir,
|
|
12
12
|
readFile,
|
|
13
13
|
writeFile
|
|
14
|
-
} from "../../chunk-
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-
|
|
14
|
+
} from "../../chunk-4OD45DDO.js";
|
|
15
|
+
import "../../chunk-XVNW332R.js";
|
|
16
|
+
import "../../chunk-FIJKOZJF.js";
|
|
17
17
|
import {
|
|
18
18
|
joinPath,
|
|
19
19
|
moduleDirectory,
|
|
20
20
|
normalizePath
|
|
21
|
-
} from "../../chunk-
|
|
22
|
-
import "../../chunk-
|
|
23
|
-
import "../../chunk-
|
|
24
|
-
import "../../chunk-
|
|
25
|
-
import "../../chunk-
|
|
26
|
-
import "../../chunk-
|
|
21
|
+
} from "../../chunk-4DRC2PSU.js";
|
|
22
|
+
import "../../chunk-LTDD2GRL.js";
|
|
23
|
+
import "../../chunk-VZVGAREJ.js";
|
|
24
|
+
import "../../chunk-6A7MXLVB.js";
|
|
25
|
+
import "../../chunk-ZAUZQLNO.js";
|
|
26
|
+
import "../../chunk-UBB7JKND.js";
|
|
27
27
|
import {
|
|
28
28
|
describe,
|
|
29
29
|
globalExpect,
|
|
30
30
|
test,
|
|
31
31
|
vi
|
|
32
|
-
} from "../../chunk-
|
|
33
|
-
import "../../chunk-
|
|
34
|
-
import "../../chunk-
|
|
32
|
+
} from "../../chunk-OMDEA7TV.js";
|
|
33
|
+
import "../../chunk-522OB3EU.js";
|
|
34
|
+
import "../../chunk-PNN7RS7Y.js";
|
|
35
35
|
import {
|
|
36
36
|
init_cjs_shims
|
|
37
|
-
} from "../../chunk-
|
|
37
|
+
} from "../../chunk-POZ5MGPT.js";
|
|
38
38
|
|
|
39
39
|
// src/utils/template/npm.test.ts
|
|
40
40
|
init_cjs_shims();
|
|
@@ -44,59 +44,31 @@ vi.mock("@shopify/cli-kit/node/node-package-manager");
|
|
|
44
44
|
vi.mock("@shopify/cli-kit/common/version", () => ({ CLI_KIT_VERSION: "1.2.3" }));
|
|
45
45
|
describe("updateCLIDependencies", () => {
|
|
46
46
|
test("updates @shopify/cli and deletes @shopify/app if not using global CLI", async () => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
globalExpect(mockPackageJSON.dependencies["@shopify/app"]).toBeUndefined();
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
});
|
|
60
|
-
test("does not update overrides or resolutions if local is false", async () => {
|
|
61
|
-
const mockPackageJSON = { overrides: {}, resolutions: {} };
|
|
62
|
-
const directory = moduleDirectory(import.meta.url);
|
|
63
|
-
await updateCLIDependencies({ packageJSON: mockPackageJSON, local: false, directory, useGlobalCLI: false });
|
|
64
|
-
globalExpect(mockPackageJSON.overrides["@shopify/cli"]).toBeUndefined();
|
|
65
|
-
globalExpect(mockPackageJSON.overrides["@shopify/app"]).toBeUndefined();
|
|
66
|
-
globalExpect(mockPackageJSON.overrides["@shopify/cli-kit"]).toBeUndefined();
|
|
67
|
-
globalExpect(mockPackageJSON.resolutions["@shopify/cli"]).toBeUndefined();
|
|
68
|
-
globalExpect(mockPackageJSON.resolutions["@shopify/app"]).toBeUndefined();
|
|
69
|
-
globalExpect(mockPackageJSON.resolutions["@shopify/cli-kit"]).toBeUndefined();
|
|
70
|
-
});
|
|
71
|
-
test("updates overrides for @shopify/cli if local is true", async () => {
|
|
72
|
-
const mockPackageJSON = {};
|
|
73
|
-
const directory = moduleDirectory(import.meta.url);
|
|
74
|
-
await updateCLIDependencies({ packageJSON: mockPackageJSON, local: true, directory, useGlobalCLI: false });
|
|
75
|
-
const dependencyOveride = mockPackageJSON.overrides["@shopify/cli"];
|
|
76
|
-
const dependencyPath = joinPath(dependencyOveride.replace("file:", ""), "package.json");
|
|
77
|
-
const dependencyJSON = JSON.parse(await readFile(dependencyPath));
|
|
47
|
+
let mockPackageJSON = {}, directory = moduleDirectory(import.meta.url);
|
|
48
|
+
await updateCLIDependencies({ packageJSON: mockPackageJSON, local: !1, directory, useGlobalCLI: !1 }), globalExpect(mockPackageJSON.dependencies["@shopify/cli"]).toBe("1.2.3"), globalExpect(mockPackageJSON.dependencies["@shopify/app"]).toBeUndefined();
|
|
49
|
+
}), test("removes @shopify/cli and @shopify/app if using global CLI", async () => {
|
|
50
|
+
let mockPackageJSON = {}, directory = moduleDirectory(import.meta.url);
|
|
51
|
+
await updateCLIDependencies({ packageJSON: mockPackageJSON, local: !1, directory, useGlobalCLI: !0 }), globalExpect(mockPackageJSON.dependencies["@shopify/cli"]).toBeUndefined(), globalExpect(mockPackageJSON.dependencies["@shopify/app"]).toBeUndefined();
|
|
52
|
+
}), test("does not update overrides or resolutions if local is false", async () => {
|
|
53
|
+
let mockPackageJSON = { overrides: {}, resolutions: {} }, directory = moduleDirectory(import.meta.url);
|
|
54
|
+
await updateCLIDependencies({ packageJSON: mockPackageJSON, local: !1, directory, useGlobalCLI: !1 }), globalExpect(mockPackageJSON.overrides["@shopify/cli"]).toBeUndefined(), globalExpect(mockPackageJSON.overrides["@shopify/app"]).toBeUndefined(), globalExpect(mockPackageJSON.overrides["@shopify/cli-kit"]).toBeUndefined(), globalExpect(mockPackageJSON.resolutions["@shopify/cli"]).toBeUndefined(), globalExpect(mockPackageJSON.resolutions["@shopify/app"]).toBeUndefined(), globalExpect(mockPackageJSON.resolutions["@shopify/cli-kit"]).toBeUndefined();
|
|
55
|
+
}), test("updates overrides for @shopify/cli if local is true", async () => {
|
|
56
|
+
let mockPackageJSON = {}, directory = moduleDirectory(import.meta.url);
|
|
57
|
+
await updateCLIDependencies({ packageJSON: mockPackageJSON, local: !0, directory, useGlobalCLI: !1 });
|
|
58
|
+
let dependencyOveride = mockPackageJSON.overrides["@shopify/cli"], dependencyPath = joinPath(dependencyOveride.replace("file:", ""), "package.json"), dependencyJSON = JSON.parse(await readFile(dependencyPath));
|
|
78
59
|
globalExpect(dependencyJSON.name).toBe("@shopify/cli");
|
|
79
|
-
})
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
await updateCLIDependencies({ packageJSON: mockPackageJSON, local: true, directory, useGlobalCLI: false });
|
|
84
|
-
const dependencyResolution = mockPackageJSON.resolutions["@shopify/cli"];
|
|
85
|
-
const dependencyPath = joinPath(dependencyResolution.replace("file:", ""), "package.json");
|
|
86
|
-
const dependencyJSON = JSON.parse(await readFile(dependencyPath));
|
|
60
|
+
}), test("updates resolutions for @shopify/cli if local is true", async () => {
|
|
61
|
+
let mockPackageJSON = {}, directory = moduleDirectory(import.meta.url);
|
|
62
|
+
await updateCLIDependencies({ packageJSON: mockPackageJSON, local: !0, directory, useGlobalCLI: !1 });
|
|
63
|
+
let dependencyResolution = mockPackageJSON.resolutions["@shopify/cli"], dependencyPath = joinPath(dependencyResolution.replace("file:", ""), "package.json"), dependencyJSON = JSON.parse(await readFile(dependencyPath));
|
|
87
64
|
globalExpect(dependencyJSON.name).toBe("@shopify/cli");
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
await updateCLIDependencies({ packageJSON: mockPackageJSON, local: true, directory, useGlobalCLI: false });
|
|
93
|
-
const dependencyResolution = mockPackageJSON.dependencies["@shopify/cli"];
|
|
94
|
-
const dependencyPath = joinPath(dependencyResolution.replace("file:", ""), "package.json");
|
|
95
|
-
const dependencyJSON = JSON.parse(await readFile(dependencyPath));
|
|
65
|
+
}), test("updates dependency for @shopify/cli if local is true", async () => {
|
|
66
|
+
let mockPackageJSON = {}, directory = moduleDirectory(import.meta.url);
|
|
67
|
+
await updateCLIDependencies({ packageJSON: mockPackageJSON, local: !0, directory, useGlobalCLI: !1 });
|
|
68
|
+
let dependencyResolution = mockPackageJSON.dependencies["@shopify/cli"], dependencyPath = joinPath(dependencyResolution.replace("file:", ""), "package.json"), dependencyJSON = JSON.parse(await readFile(dependencyPath));
|
|
96
69
|
globalExpect(dependencyJSON.name).toBe("@shopify/cli");
|
|
97
|
-
})
|
|
98
|
-
|
|
99
|
-
const mockPackageJSON = {
|
|
70
|
+
}), test("does not change existing values", async () => {
|
|
71
|
+
let mockPackageJSON = {
|
|
100
72
|
name: "",
|
|
101
73
|
author: "",
|
|
102
74
|
scripts: {},
|
|
@@ -112,38 +84,27 @@ describe("updateCLIDependencies", () => {
|
|
|
112
84
|
overrides: {
|
|
113
85
|
mock: "value"
|
|
114
86
|
}
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
await updateCLIDependencies({ packageJSON: mockPackageJSON, local: false, directory, useGlobalCLI: false });
|
|
118
|
-
globalExpect(mockPackageJSON.dependencies.mock).toBe("value");
|
|
119
|
-
globalExpect(mockPackageJSON.overrides.mock).toBe("value");
|
|
120
|
-
globalExpect(mockPackageJSON.resolutions.mock).toBe("value");
|
|
87
|
+
}, directory = moduleDirectory(import.meta.url);
|
|
88
|
+
await updateCLIDependencies({ packageJSON: mockPackageJSON, local: !1, directory, useGlobalCLI: !1 }), globalExpect(mockPackageJSON.dependencies.mock).toBe("value"), globalExpect(mockPackageJSON.overrides.mock).toBe("value"), globalExpect(mockPackageJSON.resolutions.mock).toBe("value");
|
|
121
89
|
});
|
|
122
90
|
});
|
|
123
91
|
describe("getDeepInstallNPMTasks", () => {
|
|
124
92
|
async function mockAppFolder(callback) {
|
|
125
|
-
await inTemporaryDirectory(async (tmpDir) =>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
writeFile(joinPath(tmpDir, "web", "package.json"), "{}"),
|
|
131
|
-
writeFile(joinPath(tmpDir, "web", "frontend", "package.json"), "{}")
|
|
132
|
-
]);
|
|
133
|
-
return callback(tmpDir);
|
|
134
|
-
});
|
|
93
|
+
await inTemporaryDirectory(async (tmpDir) => (await mkdir(joinPath(tmpDir, "web")), await mkdir(joinPath(tmpDir, "web", "frontend")), await Promise.all([
|
|
94
|
+
writeFile(joinPath(tmpDir, "package.json"), "{}"),
|
|
95
|
+
writeFile(joinPath(tmpDir, "web", "package.json"), "{}"),
|
|
96
|
+
writeFile(joinPath(tmpDir, "web", "frontend", "package.json"), "{}")
|
|
97
|
+
]), callback(tmpDir)));
|
|
135
98
|
}
|
|
136
|
-
|
|
99
|
+
let defaultArgs = {
|
|
137
100
|
packageManager: "npm",
|
|
138
101
|
didInstallEverything: () => {
|
|
139
102
|
}
|
|
140
103
|
};
|
|
141
104
|
test.each([["darwin"], ["win32"]])("each task installs dependencies when the os is %s", async (operativeSystem) => {
|
|
142
105
|
await mockAppFolder(async (tmpDir) => {
|
|
143
|
-
|
|
144
|
-
vi.mocked(platform).mockReturnValue(operativeSystem)
|
|
145
|
-
await getDeepInstallNPMTasks({ ...defaultArgs, packageManager: "yarn", from: tmpDir });
|
|
146
|
-
globalExpect(installNodeModules).toHaveBeenCalledWith({
|
|
106
|
+
let expectedArgs = operativeSystem === "win32" ? ["--network-concurrency", "1"] : [];
|
|
107
|
+
vi.mocked(platform).mockReturnValue(operativeSystem), await getDeepInstallNPMTasks({ ...defaultArgs, packageManager: "yarn", from: tmpDir }), globalExpect(installNodeModules).toHaveBeenCalledWith({
|
|
147
108
|
directory: `${normalizePath(tmpDir)}`,
|
|
148
109
|
packageManager: "yarn",
|
|
149
110
|
args: expectedArgs
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/create-app",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.66.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A CLI tool to create a new Shopify app.",
|
|
6
6
|
"keywords": [
|
|
@@ -45,11 +45,10 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@oclif/core": "3.26.5",
|
|
48
|
-
"@shopify/cli-kit": "3.
|
|
48
|
+
"@shopify/cli-kit": "3.66.0",
|
|
49
49
|
"@types/node": "18.19.3",
|
|
50
50
|
"esbuild-plugin-copy": "^2.1.1",
|
|
51
|
-
"@vitest/coverage-istanbul": "^1.6.0"
|
|
52
|
-
"vitest": "^1.6.0"
|
|
51
|
+
"@vitest/coverage-istanbul": "^1.6.0"
|
|
53
52
|
},
|
|
54
53
|
"engines": {
|
|
55
54
|
"node": "^18.20.0 || >=20.10.0"
|