mirror of
https://github.com/withastro/astro.git
synced 2025-12-05 18:56:38 -06:00
fix: examples script for release (#13305)
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user