Skip to content

Commit

Permalink
chore: using pnpm (QwikDev#2120)
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat authored Nov 14, 2022
1 parent 7ea10c6 commit 021b12f
Show file tree
Hide file tree
Showing 30 changed files with 6,891 additions and 10,709 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"ghcr.io/devcontainers/features/rust:1": {}
},
"waitFor": "onCreateCommand",
"updateContentCommand": "yarn",
"updateContentCommand": "pnpm install",
"forwardPorts": [3300, 9229],
"customizations": {
"codespaces": {
Expand Down
87 changes: 59 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,24 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/[email protected]
with:
version: 7

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

- run: corepack enable

- name: Install NPM Dependencies
run: yarn install --immutable --network-timeout 300000
run: pnpm install --frozen-lockfile

- name: Build Package
run: yarn tsm scripts/index.ts --tsc --build --cli --api --set-dist-tag="${{ github.event.inputs.disttag }}"
run: pnpm tsm scripts/index.ts --tsc --build --cli --api --set-dist-tag="${{ github.event.inputs.disttag }}"

- name: Print Package Dist Build
run: tree packages/qwik/dist/
Expand All @@ -99,7 +103,7 @@ jobs:
if-no-files-found: error

- name: Build Eslint rules
run: yarn tsm scripts/index.ts --eslint
run: pnpm tsm scripts/index.ts --eslint

- name: Print Eslint rules Dist Build
run: tree packages/eslint-plugin-qwik/dist/
Expand All @@ -126,12 +130,15 @@ jobs:
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
uses: actions/checkout@v3

- uses: pnpm/[email protected]
with:
version: 7
- name: Setup Node
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

- if: ${{ needs.changes.outputs.fullbuild == 'true' }}
Expand Down Expand Up @@ -164,11 +171,15 @@ jobs:

- name: Install NPM Dependencies
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
run: yarn install --immutable --network-timeout 300000
run: pnpm install --frozen-lockfile

- uses: jetli/[email protected]
with:
version: 'v0.10.3'

- name: Build WASM
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
run: yarn tsm scripts/index.ts --wasm --set-dist-tag="${{ github.event.inputs.disttag }}"
run: pnpm tsm scripts/index.ts --wasm --set-dist-tag="${{ github.event.inputs.disttag }}"

- name: Print WASM Dist Build
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
Expand All @@ -189,18 +200,18 @@ jobs:
settings:
- host: macos-latest
target: x86_64-apple-darwin
build: yarn tsm scripts/index.ts --platform-binding
build: pnpm tsm scripts/index.ts --platform-binding

- host: macos-latest
target: aarch64-apple-darwin
build: |
export SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path)
export MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version)
yarn tsm scripts/index.ts --platform-binding --platform-target=aarch64-apple-darwin
pnpm tsm scripts/index.ts --platform-binding --platform-target=aarch64-apple-darwin
- host: windows-latest
target: x86_64-pc-windows-msvc
build: yarn tsm scripts/index.ts --platform-binding
build: pnpm tsm scripts/index.ts --platform-binding

name: Build ${{ matrix.settings.target }}
runs-on: ${{ matrix.settings.host }}
Expand All @@ -212,12 +223,16 @@ jobs:
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
uses: actions/checkout@v3

- uses: pnpm/[email protected]
with:
version: 7

- name: Setup Node
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

- if: ${{ needs.changes.outputs.fullbuild == 'true' }}
Expand Down Expand Up @@ -264,7 +279,7 @@ jobs:

- name: Install NPM Dependencies
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
run: yarn install --immutable --network-timeout 300000
run: pnpm install --frozen-lockfile

- name: Build Platform Binding
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
Expand Down Expand Up @@ -345,11 +360,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/[email protected]
with:
version: 7

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

- run: corepack enable
Expand All @@ -373,18 +392,18 @@ jobs:
mv dist-dev-eslint-plugin-qwik/* packages/eslint-plugin-qwik/dist/
- name: Install NPM Dependencies
run: yarn install --immutable --network-timeout 300000
run: pnpm install --frozen-lockfile

- name: Dry-Run Publish @builder.io/qwik
if: ${{ github.event_name != 'workflow_dispatch' }}
run: yarn tsm scripts/index.ts --set-dist-tag="${{ github.event.inputs.disttag }}" --release --dry-run
run: pnpm tsm scripts/index.ts --set-dist-tag="${{ github.event.inputs.disttag }}" --release --dry-run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish @builder.io/qwik
if: ${{ github.event_name == 'workflow_dispatch' }}
run: yarn tsm scripts/index.ts --set-dist-tag="${{ github.event.inputs.disttag }}" --release
run: pnpm tsm scripts/index.ts --set-dist-tag="${{ github.event.inputs.disttag }}" --release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -393,7 +412,7 @@ jobs:
if: ${{ needs.changes.outputs.fullbuild == 'true' && github.event_name == 'push' }}
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
run: yarn run qwik-save-artifacts
run: pnpm run qwik-save-artifacts

############ E2E TEST ############
test-e2e:
Expand All @@ -419,12 +438,16 @@ jobs:
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
uses: actions/checkout@v3

- uses: pnpm/[email protected]
with:
version: 7

- name: Setup Node ${{ matrix.settings.node }}
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.settings.node }}
cache: 'yarn'
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

- if: ${{ needs.changes.outputs.fullbuild == 'true' }}
Expand All @@ -447,19 +470,19 @@ jobs:
- name: Install NPM Dependencies
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
run: yarn install --immutable --network-timeout 300000
run: pnpm install --frozen-lockfile

- name: Install Playwright
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
run: npx playwright install ${{ matrix.settings.browser }} && npx playwright install-deps ${{ matrix.settings.browser }}

- name: Playwright E2E Tests
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
run: yarn run test.e2e.${{ matrix.settings.browser }}
run: pnpm run test.e2e.${{ matrix.settings.browser }}

- name: Validate Create Qwik Cli
if: ${{ needs.changes.outputs.fullbuild == 'true' }}
run: yarn cli.validate
run: pnpm cli.validate

############ UNIT TEST ############
test-unit:
Expand All @@ -472,20 +495,24 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/[email protected]
with:
version: 7

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

- run: corepack enable

- name: Install NPM Dependencies
run: yarn install --immutable --network-timeout 300000
run: pnpm install --frozen-lockfile

- name: Unit Tests
run: yarn run test.unit
run: pnpm run test.unit

########### VALIDATE RUST ############
validate-rust:
Expand Down Expand Up @@ -560,22 +587,26 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/[email protected]
with:
version: 7

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

- run: corepack enable

- name: Install NPM Dependencies
run: yarn install --immutable --network-timeout 300000
run: pnpm install --frozen-lockfile

- name: Prettier Check
if: ${{ always() }}
run: yarn run lint.prettier
run: pnpm run lint.prettier

- name: ESLint Check
if: ${{ always() }}
run: yarn run lint.eslint
run: pnpm run lint.eslint
14 changes: 9 additions & 5 deletions .github/workflows/release-qwik-city.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,29 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/[email protected]
with:
version: 7

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
cache: 'pnpm'
registry-url: https://registry.npmjs.org/

- run: corepack enable

- name: Install NPM Dependencies
run: yarn install --immutable --network-timeout 300000
run: pnpm install --frozen-lockfile

- name: Test Qwik City
run: cd packages/qwik-city && yarn test
run: cd packages/qwik-city && pnpm test

- name: Build Qwik City
run: cd packages/qwik-city && yarn build
run: cd packages/qwik-city && pnpm build

- name: Publish Qwik City
run: cd packages/qwik-city && yarn tsm scripts/release.ts --set-dist-tag="${{ github.event.inputs.disttag }}"
run: cd packages/qwik-city && pnpm tsm scripts/release.ts --set-dist-tag="${{ github.event.inputs.disttag }}"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.history
.yarn
.yarnrc.yml
pnpm-lock.yaml
.mf
dist
dist-dev
Expand All @@ -26,4 +27,4 @@ packages/docs/src/routes/**/*.mdx
starters/**/*.js

# TODO: Figure out why this doesn't pass in CI
packages/qwik/src/core/props/props.ts
packages/qwik/src/core/props/props.ts
Loading

0 comments on commit 021b12f

Please sign in to comment.