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:
parent
6efd57d174
commit
467e88e487
1 changed files with 4 additions and 2 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Reference in a new issue