Skip to content

Move from yarn to pnpm #8

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

Merged
merged 1 commit into from
Sep 15, 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
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: b18a505
_commit: 0596834
_src_path: .
add_extension: jupyter
email: 3105306+timkpaine@users.noreply.github.com
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache-dependency-path: js/yarn.lock

- name: Install yarn
run: npm install -g yarn
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
package_json_file: js/package.json

- name: Install dependencies
run: make develop
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ develop-py:
python -m pip install -e .[develop]

develop-js:
cd js; yarn
cd js; pnpm install

develop: develop-js develop-py ## setup project for development

Expand All @@ -15,7 +15,7 @@ build-py:
python -m build -w -n

build-js:
cd js; yarn build
cd js; pnpm build

build: build-js build-py ## build the project

Expand All @@ -32,7 +32,7 @@ lint-py: ## run python linter with ruff
python -m ruff format --check jupyter_template

lint-js: ## run js linter
cd js; yarn lint
cd js; pnpm lint

lint: lint-js lint-py ## run project linters

Expand All @@ -45,7 +45,7 @@ fix-py: ## fix python formatting with ruff
python -m ruff format jupyter_template

fix-js: ## fix js formatting
cd js; yarn fix
cd js; pnpm fix

fix: fix-js fix-py ## run project autoformatters

Expand Down Expand Up @@ -83,7 +83,7 @@ coverage-py: ## run python tests and collect test coverage

.PHONY: test-js tests-js coverage-js
test-js: ## run js tests
cd js; yarn test
cd js; pnpm test

# alias
tests-js: test-js
Expand Down Expand Up @@ -123,7 +123,7 @@ dist-build-py: # build python dists
python -m build -w -s

dist-build-js: # build js dists
cd js; yarn pack
cd js; pnpm pack

dist-check: ## run python dist checker with twine
python -m twine check dist/*
Expand Down
7 changes: 4 additions & 3 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
"build:babel": "babel src/ --source-maps --out-dir lib/",
"build:nbextension": "mkdirp ../jupyter_template/nbextension/static/ && cpy --flat 'src/notebook.js' '../jupyter_template/nbextension/static/'",
"build:labextension": "rimraf ../jupyter_template/labextension && jupyter labextension build .",
"build": "yarn clean && yarn build:babel && yarn build:labextension && yarn build:nbextension",
"build": "pnpm clean && pnpm build:babel && pnpm build:labextension && pnpm build:nbextension",
"clean": "rimraf lib",
"fix": "yarn lint --fix",
"fix": "pnpm lint --fix",
"lint": "eslint -c .eslintrc.js --ext .js src/ tests/",
"prepublishOnly": "yarn run build",
"preinstall": "npx only-allow pnpm",
"prepublishOnly": "pnpm run build",
"test": "jest --coverage --collectCoverageFrom=src/*.{js}"
},
"dependencies": {
Expand Down
Loading
Loading