Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to pnpm #238

Merged
merged 2 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: '1.18'
- name: Enable pnpm
run: corepack enable pnpm
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
registry-url: 'https://npm.pkg.github.com'
scope: '@seqsense'
cache: pnpm

- name: Run go vet
run: GOOS=js GOARCH=wasm go vet ./...
Expand All @@ -38,15 +41,10 @@ jobs:
file: ./cover.out
token: ${{ secrets.CODECOV_TOKEN }}

- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Install
run: npm install
run: pnpm install
- name: Type check
run: npm run typecheck
run: pnpm typecheck
- name: Set PACKAGE_VERSION
run: |
if [ -z "${PACKAGE_VERSION}" ]; then
Expand All @@ -57,10 +55,10 @@ jobs:
PACKAGE_VERSION: ${{ github.event.release.tag_name }}
- name: Pack
run: |
npm version ${PACKAGE_VERSION} --no-git-tag-version --allow-same-version
pnpm version ${PACKAGE_VERSION} --no-git-tag-version --allow-same-version
make pack
- name: Publish
if: github.event_name == 'release'
run: npm publish seqsense-pcdeditor-${PACKAGE_VERSION}.tgz
run: pnpm publish seqsense-pcdeditor-${PACKAGE_VERSION}.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 4 additions & 2 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Enable pnpm
run: corepack enable pnpm
- uses: actions/setup-node@v4
with:
node-version: '18.13'
cache: npm
node-version-file: .node-version
cache: pnpm
- name: eslint
uses: reviewdog/action-eslint@v1
with:
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pcdeditor.esm.js: pcdeditor.js
sed 's/module\.exports = /export default /' $< > $@

ReactPCDEditor/index.js: ReactPCDEditor/index.tsx package.json tsconfig.json
npm run-script tsc
pnpm tsc

pcdeditor.wasm: *.go go.*
GOOS=js GOARCH=wasm go build \
Expand All @@ -27,12 +27,12 @@ target-files: $(TARGET_FILES)

.PHONY: pack
pack: target-files
npm pack
pnpm pack

.PHONY: version
version-$(VERSION):
npm version $(VERSION) --allow-same-version --no-git-tag-version
pnpm version $(VERSION) --allow-same-version --no-git-tag-version

.PHONY: publish
publish-$(VERSION):
npm publish seqsense-pcdeditor-$(VERSION).tgz
pnpm publish seqsense-pcdeditor-$(VERSION).tgz
Loading