@shopify/shop-minis-cli 0.0.89 → 0.0.90
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.
|
@@ -10,9 +10,16 @@ import { SemVer } from 'semver';
|
|
|
10
10
|
*/
|
|
11
11
|
async function applyUpgrade() {
|
|
12
12
|
const existingAppTsxPath = path.join(process.cwd(), 'src', 'App.tsx');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
let existingAppTsxContent = null;
|
|
14
|
+
try {
|
|
15
|
+
existingAppTsxContent = fs.readFileSync(existingAppTsxPath, {
|
|
16
|
+
encoding: 'utf-8',
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
// If the App.tsx file doesn't exist or is unreadable for some reason, we don't need to do anything
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
16
23
|
// Only apply the upgrade if the App.tsx file is still the old blank template
|
|
17
24
|
if (existingAppTsxContent === oldBlankTemplateAppContent) {
|
|
18
25
|
fs.writeFileSync(existingAppTsxPath, newBlankTemplateAppContent, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v0-0-89.js","sourceRoot":"","sources":["../../../../src/commands/codemod/releases/v0-0-89.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAA;AAI7B;;;;;;GAMG;AACH,KAAK,UAAU,YAAY;IACzB,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,CAAA;IACrE,
|
|
1
|
+
{"version":3,"file":"v0-0-89.js","sourceRoot":"","sources":["../../../../src/commands/codemod/releases/v0-0-89.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,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