0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-04-14 23:51:49 -05:00

fix: examples script for release (#13305)

This commit is contained in:
Florian Lefebvre 2025-02-24 14:47:13 +01:00 committed by GitHub
parent 6efd57d174
commit 467e88e487
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,7 @@
// @ts-check
import fs from 'node:fs/promises';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { glob } from 'tinyglobby';
/*
@ -19,7 +21,7 @@ const packageToVersions = new Map();
// published through this field, so this file also respects this field when updating the versions.
const workspaceDirs = await glob(rootPackageJson.workspaces, {
onlyDirectories: true,
cwd: rootUrl,
cwd: fileURLToPath(rootUrl),
});
for (const workspaceDir of workspaceDirs) {
const packageJsonPath = path.join(workspaceDir, './package.json');
@ -41,7 +43,7 @@ for (const workspaceDir of workspaceDirs) {
// Update all examples' package.json
const exampleDirs = await glob('examples/*', {
onlyDirectories: true,
cwd: rootUrl,
cwd: fileURLToPath(rootUrl),
});
for (const exampleDir of exampleDirs) {
const packageJsonPath = path.join(exampleDir, './package.json');