Skip to content

Commit

Permalink
Convert to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
airhorns committed Sep 17, 2023
1 parent 67e5504 commit b6292c7
Show file tree
Hide file tree
Showing 10 changed files with 5,541 additions and 40 deletions.
12 changes: 6 additions & 6 deletions .github/actions/setup-test-env/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: 'Setup test environment'
description: ''
name: "Setup test environment"
description: ""
inputs: {}
outputs: {}
runs:
using: "composite"
steps:
- name: Install dependencies with yarn install
using: "composite"
steps:
- name: Install dependencies with pnpm install
shell: bash
run: yarn install
run: pnpm install
30 changes: 15 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: ./.github/actions/setup-test-env
- name: Test
shell: bash
run: yarn test
- uses: actions/[email protected]
- uses: ./.github/actions/setup-test-env
- name: Test
shell: bash
run: pnpm test

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: ./.github/actions/setup-test-env
- name: Lint
shell: bash
run: yarn lint
- uses: actions/[email protected]
- uses: ./.github/actions/setup-test-env
- name: Lint
shell: bash
run: pnpm lint

build-js:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: ./.github/actions/setup-test-env
- name: Build
shell: bash
run: yarn build
- uses: actions/[email protected]
- uses: ./.github/actions/setup-test-env
- name: Build
shell: bash
run: pnpm build
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
pkg
pkg
.direnv
8 changes: 4 additions & 4 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Testing

Gotta build the package, which you can do once with `yarn build`, or watch your local development directory and rebuild when things change with `yarn watch`.
Gotta build the package, which you can do once with `pnpm build`, or watch your local development directory and rebuild when things change with `pnpm watch`.

Then gotta use it somewhere, which tends to be easiest in a project. I use `yarn link` for this.
Then gotta use it somewhere, which tends to be easiest in a project. I use `pnpm link` for this.

# Releasing

## Build the package

Run `yarn build`
Run `pnpm build`

## Release the package

Decide what type of new version you're gonna publish and bump the version with `npm version minor|major|patch`

Run `yarn build && npm publish`
Run `pnpm build && npm publish`
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ npm install requirefire
or

```
yarn add requirefire
pnpm add requirefire
```

## Usage
Expand Down
30 changes: 24 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
description = "wds development environment";
description = "requirefire development environment";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
Expand All @@ -21,10 +21,8 @@
packages =
rec {
bash = pkgs.bash;
nodejs = pkgs.nodejs-16_x;
yarn = pkgs.yarn.override {
inherit nodejs;
};
nodejs = pkgs.nodejs-18_x;
pnpm = pkgs.nodePackages.pnpm;
};

devShell = pkgs.mkShell {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"build": "rm -rf pkg && tsc",
"watch": "tsc -w",
"test": "jest",
"lint": "yarn run lint:prettier && yarn run lint:eslint",
"preinstall": "npx only-allow pnpm",
"lint": "pnpm run lint:prettier && pnpm run lint:eslint",
"lint:prettier": "node --max-old-space-size=4096 node_modules/.bin/prettier --check \"src/**/*.{js,ts,tsx}\"",
"lint:eslint": "node --max-old-space-size=4096 node_modules/.bin/eslint --quiet --ext ts,tsx src",
"lint:fix": "node --max-old-space-size=4096 node_modules/.bin/prettier --write --check \"src/**/*.{js,ts,tsx}\" && eslint --ext ts,tsx --fix src",
Expand Down
Loading

0 comments on commit b6292c7

Please sign in to comment.