@take-out/scripts 0.0.41 ā 0.0.42
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/package.json +2 -2
- package/src/build-initial.ts +3 -3
- package/src/update-deps.ts +12 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@take-out/scripts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.42",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@take-out/helpers": "0.0.
|
|
27
|
+
"@take-out/helpers": "0.0.42"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"vxrn": "*"
|
package/src/build-initial.ts
CHANGED
|
@@ -20,11 +20,11 @@ if (!(await exists(`./node_modules/.bin/tko`))) {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
// check if critical packages are built - both helpers and
|
|
23
|
+
// check if critical packages are built - both helpers and cli are needed for tko to work
|
|
24
24
|
if (hasPackages) {
|
|
25
25
|
const needsBuild =
|
|
26
26
|
!(await exists(`./packages/helpers/dist`)) ||
|
|
27
|
-
!(await exists(`./packages/
|
|
27
|
+
!(await exists(`./packages/cli/dist/esm`))
|
|
28
28
|
|
|
29
29
|
if (needsBuild) {
|
|
30
30
|
// build helpers first as other packages depend on it
|
|
@@ -69,7 +69,7 @@ function symlinkBins() {
|
|
|
69
69
|
// workaround for https://github.com/oven-sh/bun/issues/19782
|
|
70
70
|
// bun doesn't create symlinks for workspace packages properly
|
|
71
71
|
const packagesWithCLI = [
|
|
72
|
-
{ name: '
|
|
72
|
+
{ name: 'cli', cliFile: 'cli.mjs', alias: 'tko' },
|
|
73
73
|
{ name: 'postgres', cliFile: 'cli.cjs' },
|
|
74
74
|
]
|
|
75
75
|
|
package/src/update-deps.ts
CHANGED
|
@@ -193,17 +193,18 @@ async function updatePackages(packagesToUpdate: string[], cwd: string) {
|
|
|
193
193
|
if (globalTag) {
|
|
194
194
|
// check which packages actually have the tag
|
|
195
195
|
console.info(`š Checking which packages have tag '${globalTag}'...\n`)
|
|
196
|
-
const packagesWithTag
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
196
|
+
const packagesWithTag = await Promise.all(
|
|
197
|
+
packagesToUpdate.flatMap(async (pkg) => {
|
|
198
|
+
try {
|
|
199
|
+
await $`npm view ${pkg}@${globalTag} version --json`.quiet()
|
|
200
|
+
console.info(` ā ${pkg}@${globalTag} exists`)
|
|
201
|
+
return [pkg]
|
|
202
|
+
} catch {
|
|
203
|
+
console.info(` ā ${pkg}@${globalTag} not found, skipping`)
|
|
204
|
+
return []
|
|
205
|
+
}
|
|
206
|
+
})
|
|
207
|
+
)
|
|
207
208
|
|
|
208
209
|
if (packagesWithTag.length === 0) {
|
|
209
210
|
console.info(`\nā ļø No packages found with tag '${globalTag}'`)
|