codeplay-common 4.10.4 → 4.10.5
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/CHANGELOG.md +10 -0
- package/RELEASE_NOTES.md +10 -0
- package/package.json +1 -1
- package/scripts/sync-files.js +26 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.10.5 — 2026-10-23
|
|
4
|
+
|
|
5
|
+
Version name: 4.10.5. Version code/build number: not applicable to this npm package.
|
|
6
|
+
|
|
7
|
+
Files changed: `package.json`, `scripts/sync-files.js`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
|
|
8
|
+
|
|
9
|
+
- Migrate known legacy filename lookups in an existing app configurator after installing shared scripts.
|
|
10
|
+
- Prefer unversioned pre-build and package-ID helpers while retaining the versioned fallback.
|
|
11
|
+
- Correct the known old sync-hook folder assignment without replacing app-specific configuration or adding a configurator to apps that do not have one.
|
|
12
|
+
|
|
3
13
|
## 4.10.4 — 2026-10-23
|
|
4
14
|
|
|
5
15
|
Version name: 4.10.4. Version code/build number: not applicable to this npm package.
|
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Release notes
|
|
2
2
|
|
|
3
|
+
## 4.10.5 — 2026-10-23
|
|
4
|
+
|
|
5
|
+
Version name: 4.10.5. Version code/build number: not applicable to this npm package.
|
|
6
|
+
|
|
7
|
+
Files changed: `package.json`, `scripts/sync-files.js`, `CHANGELOG.md`, `RELEASE_NOTES.md`.
|
|
8
|
+
|
|
9
|
+
- Prevent app postinstall failures after shared scripts switch to unversioned filenames.
|
|
10
|
+
- Repair the known old sync-hook path during plugin installation.
|
|
11
|
+
- Preserve each app's custom configuration and leave apps without the affected configurator unchanged.
|
|
12
|
+
|
|
3
13
|
## 4.10.4 — 2026-10-23
|
|
4
14
|
|
|
5
15
|
Version name: 4.10.4. Version code/build number: not applicable to this npm package.
|
package/package.json
CHANGED
package/scripts/sync-files.js
CHANGED
|
@@ -30,6 +30,30 @@ function migrateAppScripts(projectRoot) {
|
|
|
30
30
|
move(source, destination);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
function migrateAppConfigurator(projectRoot) {
|
|
34
|
+
const filePath = path.join(projectRoot, 'scripts-common', 'configure-codeplay-common.js');
|
|
35
|
+
if (!fs.existsSync(filePath)) return;
|
|
36
|
+
const original = fs.readFileSync(filePath, 'utf8');
|
|
37
|
+
let updated = original;
|
|
38
|
+
// Preserve app-specific configuration; extend only the known legacy lookups.
|
|
39
|
+
for (const [variable, script] of [
|
|
40
|
+
['buildFile', 'codeplayBeforeBuild.js'],
|
|
41
|
+
['packageIdFile', 'packageidBaseModification.js'],
|
|
42
|
+
]) {
|
|
43
|
+
updated = updated.replace(
|
|
44
|
+
`const ${variable} = fs.readdirSync(buildDir)`,
|
|
45
|
+
`const ${variable} = fs.existsSync(path.join(buildDir, '${script}'))\n` +
|
|
46
|
+
` ? '${script}'\n` +
|
|
47
|
+
` : fs.readdirSync(buildDir)`
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
updated = updated.replace(
|
|
51
|
+
"packageJson.scripts['capacitor:sync:after'] = 'node scripts/run-codeplay-sync-after.js';",
|
|
52
|
+
"packageJson.scripts['capacitor:sync:after'] = 'node scripts-common/run-codeplay-sync-after.js';"
|
|
53
|
+
);
|
|
54
|
+
if (updated !== original) fs.writeFileSync(filePath, updated, 'utf8');
|
|
55
|
+
}
|
|
56
|
+
|
|
33
57
|
function findProjectRoot() {
|
|
34
58
|
// npm may execute a file: dependency's lifecycle in its source directory.
|
|
35
59
|
// INIT_CWD identifies the app that invoked npm in that case.
|
|
@@ -72,6 +96,7 @@ function install(options = {}) {
|
|
|
72
96
|
fs.cpSync(path.join(commonFiles, name), path.join(projectRoot, name), { recursive: true });
|
|
73
97
|
}
|
|
74
98
|
}
|
|
99
|
+
migrateAppConfigurator(projectRoot);
|
|
75
100
|
pkg.scripts = scripts;
|
|
76
101
|
fs.writeFileSync(packagePath, JSON.stringify(pkg, null, 2) + '\n');
|
|
77
102
|
// Cleanup happens only after replacement assets and package commands exist.
|
|
@@ -80,7 +105,7 @@ function install(options = {}) {
|
|
|
80
105
|
// Coupled IAP/AdMob/Home migrations run together during before-build.
|
|
81
106
|
return pkg;
|
|
82
107
|
}
|
|
83
|
-
module.exports = { install, findProjectRoot, migrateAppScripts };
|
|
108
|
+
module.exports = { install, findProjectRoot, migrateAppScripts, migrateAppConfigurator };
|
|
84
109
|
if (require.main === module) {
|
|
85
110
|
try { install(); } catch (error) { console.error(error.message); process.exitCode = 1; }
|
|
86
111
|
}
|