Skip to content

Commit

Permalink
Migrate to pnpm (#1029)
Browse files Browse the repository at this point in the history
Co-authored-by: Jordan Pittman <[email protected]>
  • Loading branch information
philipp-spiess and thecrypticace authored Aug 6, 2024
1 parent a6a29da commit 82f152d
Show file tree
Hide file tree
Showing 13 changed files with 5,069 additions and 8,418 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ It's never a fun experience to have your pull request declined after investing a
You can build the VSIX package by running these commands in the project root.

```bash
npm install
npx run package --workspace=packages/vscode-tailwindcss
pnpm install
pnpx run package --workspace=packages/vscode-tailwindcss
```
19 changes: 9 additions & 10 deletions .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
version: ^9.6.0
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Cache node_modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-node_modules-${{ hashFiles('**/package-lock.json') }}
cache: 'pnpm'
- name: Install dependencies
run: npm install
run: pnpm install
- name: Run tests
run: >
cd packages/tailwindcss-language-server &&
npm run build &&
npm run test:prepare &&
npm test
pnpm run build &&
pnpm run test:prepare &&
pnpm test
- name: Publish IntelliSense
env:
VSCODE_TOKEN: ${{ secrets.VSCODE_TOKEN }}
run: >
cd packages/vscode-tailwindcss &&
npm run publish -- -p $VSCODE_TOKEN
pnpm run publish -p $VSCODE_TOKEN
25 changes: 12 additions & 13 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
version: ^9.6.0
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Cache node_modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-node_modules-${{ hashFiles('**/package-lock.json') }}
cache: 'pnpm'
- name: Install dependencies
run: npm install
run: pnpm install
- name: Run tests
run: >
cd packages/tailwindcss-language-server &&
npm run build &&
npm run test:prepare &&
npm test
pnpm run build &&
pnpm run test:prepare &&
pnpm test
- name: Bump IntelliSense version
run: >
node .github/workflows/bump-version.mjs &&
Expand All @@ -34,19 +33,19 @@ jobs:
VSCODE_TOKEN: ${{ secrets.VSCODE_TOKEN }}
run: >
cd packages/vscode-tailwindcss &&
npm run publish -- --pre-release -p $VSCODE_TOKEN
pnpm run publish --pre-release -p $VSCODE_TOKEN
- name: Build LSP
run: npm run build --workspace=packages/tailwindcss-language-server
run: pnpm run build --workspace=packages/tailwindcss-language-server
- name: Resolve LSP version
run: |
echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: 'Version LSP based on commit: 0.0.0-insiders.${{ env.SHA_SHORT }}'
run: >
cd packages/tailwindcss-language-server &&
npm version 0.0.0-insiders.${{ env.SHA_SHORT }} --force --no-git-tag-version
pnpm version 0.0.0-insiders.${{ env.SHA_SHORT }} --force --no-git-tag-version
- name: Publish LSP
run: >
cd packages/tailwindcss-language-server &&
npm publish --tag insiders --access public
pnpm publish --tag insiders --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"args": ["--extensionDevelopmentPath=${workspaceRoot}/packages/vscode-tailwindcss"],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/packages/vscode-tailwindcss/dist/**/*.js"]
// "preLaunchTask": "npm: dev"
"outFiles": ["${workspaceRoot}/packages/vscode-tailwindcss/dist/**/*.js"],
"preLaunchTask": "npm: dev"
},
{
"type": "node",
Expand Down
Loading

0 comments on commit 82f152d

Please sign in to comment.