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 #1029

Merged
merged 6 commits into from
Aug 6, 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
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