Skip to content

Commit

Permalink
build(pnpm): yarn to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
CruuzAzul committed Nov 13, 2023
1 parent e8ac803 commit f564b9c
Show file tree
Hide file tree
Showing 11 changed files with 22,878 additions and 22,898 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Enhancement suggestions are tracked as [GitHub issues](https://github.com/Bedroc

### Your First Code Contribution

- Make sure you have yarn and node (>= 12) installed
- Make sure you have pnpm and node (>= 12) installed
- Your Pull Request must include both unit tests and functional (cypress) tests when possible.

### Improving The Documentation
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
# Install and build Docusaurus website
- name: Build Docusaurus website
run: |
yarn install --no-progress --frozen-lockfile
yarn lint docsite
yarn build docsite
yarn e2e docsite-e2e
pnpm install --no-progress --frozen-lockfile
pnpm lint docsite
pnpm build docsite
pnpm e2e docsite-e2e
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: yarn
- run: yarn install --frozen-lockfile --non-interactive --no-progress --prefer-offline
cache: pnpm
- run: pnpm install --frozen-lockfile --non-interactive --no-progress --prefer-offline
- run: npx nx affected --target=lint --parallel --max-parallel=3
- run: npx nx affected --target=build --parallel --max-parallel=3
- run: npx nx affected --target=test --parallel --max-parallel=2 --code-coverage
Expand Down Expand Up @@ -50,15 +50,15 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: yarn
- run: yarn install --frozen-lockfile --non-interactive --no-progress --prefer-offline
cache: pnpm
- run: pnpm install --frozen-lockfile --non-interactive --no-progress --prefer-offline
- run: npx nx affected --base=origin/master --target=lint --parallel --max-parallel=3
- run: npx nx affected --base=origin/master --target=build --parallel --max-parallel=3
- run: npx nx affected --base=origin/master --target=test --parallel --max-parallel=2 --code-coverage
- run: npx nx affected --base=origin/master --target=e2e --parallel --max-parallel=2

- name: Clean before merge
run: yarn cleanBeforeMerge
run: pnpm cleanBeforeMerge

- name: Codecov upload
uses: codecov/codecov-action@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ jobs:
ref: ${{ github.event.inputs.branch }}
- uses: actions/setup-node@v2
with:
cache: yarn
cache: pnpm
node-version: "14"
registry-url: https://registry.npmjs.org
- run: yarn install --frozen-lockfile --non-interactive --no-progress --prefer-offline
- run: pnpm install --frozen-lockfile --non-interactive --no-progress --prefer-offline
- name: Setup git user to "🤖 Release Bot"
run: git config user.email "-" && git config user.name "🤖 Release Bot"
- name: Version
id: version
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Use npx instead of yarn because yarn auto-magically sets NPM_* environment variables
# Use npx instead of pnpm because pnpm auto-magically sets NPM_* environment variables
# like NPM_CONFIG_REGISTRY so npm publish ends up ignoring the .npmrc file
# which is set up by `setup-node` action.
# run: npx nx affected --base=master --releaseAs=minor --target=version
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: "14"
cache: yarn
cache: pnpm
- name: Install
shell: bash
run: yarn install --frozen-lockfile --non-interactive --no-progress --prefer-offline
run: pnpm install --frozen-lockfile --non-interactive --no-progress --prefer-offline
- name: Commit lint
shell: bash
run: yarn commitlint --from=last-release
run: pnpm commitlint --from=last-release
- name: Lint
run: yarn nx affected:lint --base=last-release
run: pnpm nx affected:lint --base=last-release
- name: Build
run: yarn nx affected:build --base=last-release
run: pnpm nx affected:build --base=last-release
- name: Unit tests
run: yarn nx affected:test --base=last-release --code-coverage
run: pnpm nx affected:test --base=last-release --code-coverage
- name: Codecov upload
uses: codecov/codecov-action@v2
with:
Expand All @@ -50,17 +50,17 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
cache: yarn
cache: pnpm
node-version: "14"
registry-url: https://registry.npmjs.org
- run: yarn install --frozen-lockfile --non-interactive --no-progress --prefer-offline
- run: pnpm install --frozen-lockfile --non-interactive --no-progress --prefer-offline
- name: Setup git user to "🤖 Release Bot"
run: git config user.email "-" && git config user.name "🤖 Release Bot"
- name: Version
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Use npx instead of yarn because yarn auto-magically sets NPM_* environment variables
# Use npx instead of pnpm because pnpm auto-magically sets NPM_* environment variables
# like NPM_CONFIG_REGISTRY so npm publish ends up ignoring the .npmrc file
# which is set up by `setup-node` action.
# run: npx nx affected --base=master --releaseAs=minor --target=version
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/out-tsc

# dependencies
/node_modules
node_modules

# IDEs and editors
/.idea
Expand All @@ -31,7 +31,7 @@
coverage-final.json
/libpeerconnection.log
npm-debug.log
yarn-error.log
pnpm-error.log
testem.log
/typings

Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ The `demo` project is there to smoothe the dev experience
The `docsite` project is the one used on https://bedrockstreaming.github.io/forms/

In order to start on the project, you can start with the demo project:
`yarn start demo`
`pnpm start demo`

### Generate an application

Run `yarn nx g @nrwl/react:app my-app` to generate an application.
Run `pnpm nx g @nrwl/react:app my-app` to generate an application.

> You can use any of the plugins above to generate applications as well.
When using Nx, you can create multiple applications and libraries in the same workspace.

### Generate a library

Run `yarn nx g @nrwl/react:lib my-lib` to generate a react library.
Run `yarn nx g @nrwl/react:web my-lib` to generate a web library.
Run `yarn nx g @nrwl/react:node my-lib` to generate a node library.
Run `pnpm nx g @nrwl/react:lib my-lib` to generate a react library.
Run `pnpm nx g @nrwl/react:web my-lib` to generate a web library.
Run `pnpm nx g @nrwl/react:node my-lib` to generate a node library.

> You can also use any of the plugins above to generate libraries as well.
Expand All @@ -73,36 +73,36 @@ Libraries are shareable across libraries and applications. They can be imported
If you want the library to be publishable use:

```bash
yarn nx g @nrwl/react:lib my-lib --publishable --importPath="@bedrockstreaming/form-foo"
pnpm nx g @nrwl/react:lib my-lib --publishable --importPath="@bedrockstreaming/form-foo"
```

### Development server

Run `yarn nx serve my-app` for a dev server. Navigate to [http://localhost:4200/](http://localhost:4200/). The app will automatically reload if you change any of the source files.
Run `pnpm nx serve my-app` for a dev server. Navigate to [http://localhost:4200/](http://localhost:4200/). The app will automatically reload if you change any of the source files.

### Code scaffolding

Run `yarn nx g @nrwl/react:component my-component --project=my-app` to generate a new component.
Run `pnpm nx g @nrwl/react:component my-component --project=my-app` to generate a new component.

### Build

Run `yarn nx build my-app` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
Run `pnpm nx build my-app` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.

### Running unit tests

Run `yarn nx test my-app` to execute the unit tests via [Jest](https://jestjs.io).
Run `pnpm nx test my-app` to execute the unit tests via [Jest](https://jestjs.io).

Run `yarn nx affected:test` to execute the unit tests affected by a change.
Run `pnpm nx affected:test` to execute the unit tests affected by a change.

### Running end-to-end tests

Run `yarn nx e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io).
Run `pnpm nx e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io).

Run `yarn nx affected:e2e` to execute the end-to-end tests affected by a change.
Run `pnpm nx affected:e2e` to execute the end-to-end tests affected by a change.

### Understand your workspace

Run `yarn nx dep-graph` to see a diagram of the dependencies of your projects.
Run `pnpm nx dep-graph` to see a diagram of the dependencies of your projects.

### Further help

Expand Down
6 changes: 3 additions & 3 deletions apps/docsite/docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ There are two applications in this NX workspace `demo` and `docsite`. We are usi
Start the server

```bash
yarn start demo
pnpm start demo
```

Then start editing the libraries and demo app.
Expand All @@ -27,15 +27,15 @@ Then start editing the libraries and demo app.

### Generate an application

Run `yarn nx g @nrwl/react:app my-app` to generate an application.
Run `pnpm nx g @nrwl/react:app my-app` to generate an application.

> You can use any of the plugins above to generate applications as well.
When using Nx, you can create multiple applications and libraries in the same workspace.

### Generate a library

Run `yarn nx g @nrwl/react:lib my-lib` to generate a react library.
Run `pnpm nx g @nrwl/react:lib my-lib` to generate a react library.
Run `yarn nx g @nrwl/react:web my-lib` to generate a web library.
Run `yarn nx g @nrwl/react:node my-lib` to generate a node library.

Expand Down
Loading

0 comments on commit f564b9c

Please sign in to comment.