Skip to content

chore: yarn to pnpm #477

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 18 commits into from
May 14, 2023
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
5 changes: 0 additions & 5 deletions .codesandbox/ci.json

This file was deleted.

3 changes: 0 additions & 3 deletions .commitlintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "yarn install",
"postCreateCommand": "pnpm install",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
Expand Down
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ module.exports = {
js: "espree",
},
},
rules: {
"no-use-before-define": "off",
},
Comment on lines +77 to +79
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find right fix but after installing pnpm, I got few no-use-before-define errors in Svelte files.
Please tell me some advice if you have a solution🙏

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems it was an old eslint v8.0 issue. Just upgrading to 8.10 solves it.
I will make a PR to change the version of eslint.

},
{
files: ["*.ts", "*.mts"],
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/GHPages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
- name: Install And Build
run: |+
yarn install
yarn update
yarn build
pnpm install
pnpm run update
pnpm run build
export NODE_OPTIONS="--max-old-space-size=8192"
yarn docs:build
pnpm run docs:build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
Expand Down
33 changes: 18 additions & 15 deletions .github/workflows/NodeCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
- name: Install Packages
run: yarn install
run: pnpm install
- name: Lint
run: |+
yarn build
yarn lint
pnpm run build
pnpm run lint
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
- name: Install Packages
run: yarn install
run: pnpm install
- name: Build
run: |+
yarn update
yarn build
pnpm run update
pnpm run build
test:
name: "Test for ESLint ${{ matrix.eslint }} on ${{ matrix.node }} OS: ${{matrix.os}}"
runs-on: ${{ matrix.os }}
Expand All @@ -40,38 +42,39 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Remove @sveltejs/kit # Remove @sveltejs/kit because postinstall fails on old node.
# Use npm because yarn remove needs the lock file.
run: |+
npm uninstall @sveltejs/kit --legacy-peer-deps
pnpm rm @sveltejs/kit
rm -rf node_modules
- name: Install ESLint ${{ matrix.eslint }}
run: |+
yarn add -D eslint@${{ matrix.eslint }} --ignore-engines
pnpm install -D eslint@${{ matrix.eslint }}
rm -rf node_modules
rm -rf yarn.lock
rm -rf pnpm-lock.yaml
if: matrix.eslint != 8
- name: Install Packages
run: yarn install --ignore-engines
run: pnpm install
- name: Test
run: yarn test
run: pnpm run test
- name: Type Coverage
run: yarn typecov
run: pnpm run typecov
update-resources:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Packages
run: yarn install --ignore-engines
run: pnpm install
- name: Update resources
run: yarn update
run: pnpm run update
- name: Check changes
run: |
git add --all && \
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,25 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v2

- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install Dependencies
run: yarn
run: pnpm install

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# this expects you to have a npm script called version that runs some logic and then calls `changeset version`.
version: yarn version:ci
version: pnpm run version:ci
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
publish: pnpm run release
commit: "chore: release eslint-plugin-svelte"
title: "chore: release eslint-plugin-svelte"
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ dist

## repo
/yarn.lock
/pnpm-lock.yaml
/lib
/.svelte-kit
/.type-coverage
Expand Down
3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
package-lock=false
package-lock=false
enable-pre-post-scripts=true
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.type-coverage
build
/lib
.npmrc
7 changes: 0 additions & 7 deletions .remarkrc.json

This file was deleted.

Loading