summaryrefslogtreecommitdiff
path: root/scripts/smoke/index.js
diff options
context:
space:
mode:
authorGravatar Nate Moore <natemoo-re@users.noreply.github.com> 2022-03-08 15:46:11 -0600
committerGravatar GitHub <noreply@github.com> 2022-03-08 15:46:11 -0600
commitd08ddaf5b933033564e1312df49ace8364033f79 (patch)
treecd35b7f32146a0762fb1ede3eb4551288f574c80 /scripts/smoke/index.js
parent2f7a4f8eaeac3e66fab64e24d05b803abf0d8804 (diff)
downloadastro-d08ddaf5b933033564e1312df49ace8364033f79.tar.gz
astro-d08ddaf5b933033564e1312df49ace8364033f79.tar.zst
astro-d08ddaf5b933033564e1312df49ace8364033f79.zip
Move from yarn to pnpm (#2455)
* chore: `yarn` => `pnpm` * docs: `yarn` => `pnpm` * chore(ci): yarn => pnpm * chore(ci): update pnpm cache path * fix: add missing deps * fix: add missing deps * test: add package.json to all test fixtures * chore: improve hoisting behavior * chore: move turbo into package.json * chore: update npmrc * fix: add missing `debug` dependency * chore: remove prepare script * test: fix new tests * fix: fully resolve renderer paths and `astro/internal` path * chore: update lockfile * chore: remove log * fix: resolve renderers in vite-plugin-jsx * fix: prefer public-hoist-pattern to shamefully-hoist * chore: ignore @babel/core peer warning * chore: update dependencies * test: add autoprefixer as explicit dep * chore: update `.npmrc` file in examples * chore: update dependencies * fix: resolve renderer dependencies in static build * fix: static build renderer resolution * chore: fix smoke tests * chore: hoist autoprefixer * chore: update lockfile * attempt: use full file:// path on Windows * attempt: use astro/internal * attempt: optimize astro/internal * attempt: expose ./internal.js * chore: add missing package.json files * attempt: resolve astro/internal path * chore: tidy package.json * chore: update lockfile * chore: update deps * chore: update deps * chore: yarn -> pnpm * attempt: explicit /@fs urls * attempt: explicit /@fs urls * chore: update all examples for pnpm * chore: fix hoisting for with-vite-plugin-pwa * chore(ci): fix sharp install * chore: update with-vite-plugin-pwa example * fix: pin vite-plugin-pwa to 0.11.11 * fix: add workbox-window to vite-plugin-pwa deps * refactor: use pnpm update --recursive Co-authored-by: JuanM04 <me@juanm04.com> * chore: yarn => pnpm * chore: yarn => pnpm * fix: update smoke test to skip examples which don't work in static build * update lockfile * chore: update .npmrc files * chore: update lockfile * fix: smoke script * chore: update .npmrc file * fix: return to shamefully-hoist (shamefully) * chore: update lockfile * fix(smoke): ignore scripts for smoke tests * fix: update example to disable renderers * chore: bump version * chore(ci): fix smoke tests * attempt: disable --frozen-lockfile for smoke tests * chore: update smoke test * chore: fix rebase issue * chore: update lockfile * fix: smoke tests * fix(ci): run external smoke tests first * fix(ci): run syntax * chore: update lockfile * fix(ci): ensure submodules are up-to-date * fix(ci): ensure submodules are up-to-date * chore: update lockfile * chore: update for webapi * chore: silence node:* warnings * chore: update deps * fix(ci): persist generated webapi assets * fix(ci): webapi build script * chore(ci): remove custom node caching * chore: keep turbo.json * chore: update turbo, ignore create-astro * chore: update deps * fix(ci): test command * chore(ci): update test script Co-authored-by: JuanM04 <me@juanm04.com>
Diffstat (limited to 'scripts/smoke/index.js')
-rw-r--r--scripts/smoke/index.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/scripts/smoke/index.js b/scripts/smoke/index.js
index ec56e0a09..26ca3632d 100644
--- a/scripts/smoke/index.js
+++ b/scripts/smoke/index.js
@@ -1,4 +1,5 @@
-/** @file Runs all smoke tests and may add extra smoke-test dependencies to `yarn.lock`. */
+/** @file Runs all smoke tests and may add extra smoke-test dependencies to `pnpm-lock.yaml`. */
+
// @ts-check
import { execa } from 'execa';
@@ -33,29 +34,32 @@ const getChildDirectories = async (/** @type {URL} */ dir) => {
async function run() {
console.log('');
- const directories = [...(await getChildDirectories(exampleDir)), ...(await getChildDirectories(smokeDir))];
+ const directories = [...(await getChildDirectories(smokeDir)), ...(await getChildDirectories(exampleDir))];
- console.log('🤖', 'Preparing', 'yarn');
+ console.log('🤖', 'Preparing', 'pnpm');
- await execa('yarn', [], { cwd: fileURLToPath(rootDir), stdio: 'inherit' });
+ await execa('pnpm', ['install', '--frozen-lockfile=false'], { cwd: fileURLToPath(rootDir), stdio: 'inherit' });
for (const directory of directories) {
- console.log('🤖', 'Testing', directory.pathname.split('/').at(-1));
+ const name = directory.pathname.split('/').at(-1) ?? "";
+ const isExternal = directory.pathname.includes(smokeDir.pathname);
+ console.log('🤖', 'Testing', name);
try {
- await execa('yarn', ['run', 'build'], { cwd: fileURLToPath(directory), stdio: 'inherit' });
+ await execa('pnpm', ['install', '--ignore-scripts', '--frozen-lockfile=false', isExternal ? '--shamefully-hoist' : ''].filter(x => x), { cwd: fileURLToPath(directory), stdio: 'inherit' });
+ await execa('pnpm', ['run', 'build'], { cwd: fileURLToPath(directory), stdio: 'inherit' });
} catch (err) {
console.log(err);
process.exit(1);
}
// Run with the static build too (skip for remote repos)
- if (directory.pathname.includes(smokeDir.pathname)) {
+ if (isExternal) {
continue;
}
try {
- await execa('yarn', ['build', '--', '--experimental-static-build'], { cwd: fileURLToPath(directory), stdout: 'inherit', stderr: 'inherit' });
+ await execa('pnpm', ['run', 'build', '--', '--experimental-static-build'], { cwd: fileURLToPath(directory), stdout: 'inherit', stderr: 'inherit' });
} catch (err) {
console.log(err);
process.exit(1);