forked from withastro/astro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move from yarn to pnpm (withastro#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 <[email protected]> * 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 <[email protected]>
- Loading branch information
1 parent
2f7a4f8
commit d08ddaf
Showing
161 changed files
with
10,965 additions
and
21,082 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,22 +20,26 @@ defaults: | |
|
||
jobs: | ||
# Lint can run in parallel with Build. | ||
# We also run `yarn install` with the `--prefer-offline` flag to speed things up. | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PNPM | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 6.23.6 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
cache: 'pnpm' | ||
|
||
- name: Install NPM Dependencies | ||
run: yarn install --prefer-offline --frozen-lockfile --ignore-engines --registry https://registry.npmjs.org --network-timeout 300000 | ||
run: pnpm install | ||
env: | ||
CI: true | ||
|
||
|
@@ -45,7 +49,7 @@ jobs: | |
# Lint autofix cannot run on forks, so just skip those! See https://github.com/wearerequired/lint-action/issues/13 | ||
- name: Lint (External) | ||
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != github.repository_owner }} | ||
run: yarn lint | ||
run: pnpm run lint | ||
|
||
# Otherwise, run lint autofixer | ||
- name: Lint | ||
|
@@ -80,39 +84,36 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PNPM | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 6.23.6 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
|
||
- name: Cache Node Modules | ||
id: cache-node | ||
uses: actions/cache@v2 | ||
with: | ||
path: "**/node_modules" | ||
key: cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }} | ||
restore-keys: | | ||
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }} | ||
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}- | ||
cache: 'pnpm' | ||
|
||
- name: Install NPM Dependencies | ||
run: yarn install --prefer-offline --frozen-lockfile --ignore-engines --registry https://registry.npmjs.org --network-timeout 300000 | ||
run: pnpm install | ||
env: | ||
CI: true | ||
|
||
- name: Build Packages | ||
run: yarn build --force | ||
run: pnpm run build | ||
|
||
- name: Upload Package Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: artifacts | ||
path: packages/**/dist/** | ||
path: | | ||
packages/**/dist/** | ||
packages/webapi/mod.js | ||
packages/webapi/mod.js.map | ||
if-no-files-found: error | ||
|
||
# Test depends on Build's output, which allows us to skip any build process! | ||
# We also run `yarn install` with the `--prefer-offline` flag to speed things up. | ||
test: | ||
name: 'Test: ${{ matrix.os }} (node@${{ matrix.node_version }})' | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -132,41 +133,30 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PNPM | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 6.23.6 | ||
|
||
- name: Setup node@${{ matrix.node_version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
cache: 'yarn' | ||
cache: 'pnpm' | ||
|
||
- name: Download Build Artifacts | ||
uses: actions/download-artifact@v2 | ||
|
||
- name: Extract Artifacts | ||
run: ./.github/extract-artifacts.sh | ||
|
||
- name: Cache Node Modules | ||
id: cache-node | ||
uses: actions/cache@v2 | ||
with: | ||
path: "**/node_modules" | ||
key: cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }} | ||
restore-keys: | | ||
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }} | ||
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}- | ||
- name: Install NPM Dependencies | ||
run: yarn install --prefer-offline --frozen-lockfile --ignore-engines --registry https://registry.npmjs.org --network-timeout 300000 | ||
run: pnpm install | ||
env: | ||
CI: true | ||
|
||
- name: Test | ||
if: ${{ matrix.os != 'windows-latest' }} | ||
run: yarn test | ||
|
||
# Turbo seems to make the tests hang on Windows, just run them directly | ||
- name: Test (Windows) | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
run: yarn workspace astro run test | ||
run: pnpm run test | ||
|
||
smoke: | ||
name: 'Test (Smoke) ${{ matrix.os }}' | ||
|
@@ -182,36 +172,31 @@ jobs: | |
with: | ||
submodules: 'recursive' | ||
|
||
- name: Update submodules | ||
run: git submodule update --remote | ||
|
||
- name: Setup PNPM | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 6.23.6 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
cache: 'yarn' | ||
cache: 'pnpm' | ||
|
||
- name: Download Build Artifacts | ||
uses: actions/download-artifact@v2 | ||
|
||
- name: Extract Artifacts | ||
run: ./.github/extract-artifacts.sh | ||
|
||
- name: Cache Node Modules | ||
id: cache-node | ||
uses: actions/cache@v2 | ||
with: | ||
path: "**/node_modules" | ||
key: cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }} | ||
restore-keys: | | ||
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }} | ||
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}- | ||
- name: Install NPM Dependencies | ||
# NOTE: Do NOT use `--frozen-lockfile` here! The lockfile needs to be updated in order to pull the submodules into the monorepo | ||
run: yarn install --prefer-offline --ignore-engines --registry https://registry.npmjs.org --network-timeout 300000 | ||
env: | ||
CI: true | ||
run: pnpm install --frozen-lockfile=false | ||
|
||
- name: Test | ||
run: yarn test:smoke | ||
run: pnpm run test:smoke | ||
|
||
- name: Memory Leak Test | ||
run: | | ||
|
@@ -230,39 +215,34 @@ jobs: | |
- uses: actions/checkout@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup PNPM | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 6.23.6 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
cache: 'pnpm' | ||
|
||
- name: Download Build Artifacts | ||
uses: actions/download-artifact@v2 | ||
|
||
- name: Extract Artifacts | ||
run: ./.github/extract-artifacts.sh | ||
|
||
- name: Cache Node Modules | ||
id: cache-node | ||
uses: actions/cache@v2 | ||
with: | ||
path: "**/node_modules" | ||
key: cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }} | ||
restore-keys: | | ||
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }} | ||
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}- | ||
- name: Install NPM Dependencies | ||
run: yarn install --prefer-offline --frozen-lockfile --ignore-engines --registry https://registry.npmjs.org --network-timeout 300000 | ||
run: pnpm install | ||
env: | ||
CI: true | ||
|
||
- name: Create Release Pull Request or Publish | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: yarn changeset publish | ||
publish: pnpm exec changeset publish | ||
commit: '[ci] release' | ||
title: '[ci] release' | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,21 +40,25 @@ jobs: | |
run_job: ${{ steps.check_files.outputs.run_job }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup PNPM | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 6.23.6 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
cache: 'pnpm' | ||
|
||
- name: Install NPM Dependencies | ||
if: steps.cache-npm.outputs.cache-hit != 'true' | ||
run: yarn install --prefer-offline --frozen-lockfile --ignore-engines --registry https://registry.npmjs.org --network-timeout 300000 | ||
run: pnpm install | ||
env: | ||
CI: true | ||
|
||
- name: Check Modified | ||
run: yarn changeset status --output ./status.json | ||
run: pnpm exec changeset status --output ./status.json | ||
|
||
- name: Check Output | ||
id: check_files | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,13 +13,23 @@ jobs: | |
steps: | ||
- name: Check out code using Git | ||
uses: actions/checkout@v2 | ||
- name: Set Node version to 16 | ||
|
||
- name: Setup PNPM | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 6.23.6 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts | ||
cache: 'pnpm' | ||
|
||
- name: Install NPM Dependencies | ||
run: pnpm install | ||
env: | ||
CI: true | ||
|
||
- name: Collect stats | ||
run: node scripts/stats/index.js | ||
env: | ||
|
@@ -38,17 +48,21 @@ jobs: | |
- name: Check out code using Git | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set Node version to 16 | ||
- name: Setup PNPM | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 6.23.6 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
cache: 'pnpm' | ||
|
||
- name: Clear lockfile | ||
run: rm -rf yarn.lock node_modules | ||
|
||
- name: Install dependencies | ||
run: yarn install --ignore-engines --ignore-scripts | ||
- name: Install NPM Dependencies | ||
run: pnpm upgrade --recursive | ||
env: | ||
CI: true | ||
|
||
- name: Create Pull Request | ||
id: createpr | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Important! Never install `astro` even when new version is in registry | ||
prefer-workspace-packages=true | ||
# Rather than shamefully hoisting everything, just make problematic packages public | ||
public-hoist-pattern[]=autoprefixer | ||
public-hoist-pattern[]=astro | ||
public-hoist-pattern[]=remark-* | ||
public-hoist-pattern[]=rehype-* | ||
public-hoist-pattern[]=react | ||
public-hoist-pattern[]=react-dom | ||
public-hoist-pattern[]=preact | ||
public-hoist-pattern[]=preact-render-to-string | ||
public-hoist-pattern[]=vue | ||
public-hoist-pattern[]=svelte | ||
public-hoist-pattern[]=solid-js | ||
public-hoist-pattern[]=lit | ||
public-hoist-pattern[]=@webcomponents/template-shadowroot |
Oops, something went wrong.