feat: migrated to pnpm

This commit is contained in:
arthurfiorette 2023-02-16 23:52:08 -03:00
parent cf39e9ae73
commit 34842d47f8
No known key found for this signature in database
GPG Key ID: 9D190CD53C53C555
14 changed files with 5399 additions and 152760 deletions

View File

@ -14,10 +14,7 @@ node_modules
.vscode/*
!.vscode/launch.json
# Npm & Yarn
# Npm
package-lock.json
.yarn/*
!.yarn/releases
!.yarn/plugins
benchmark/index.js

View File

@ -13,26 +13,29 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Setup node and restore cached dependencies
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
node-version: '18'
cache: 'pnpm'
- name: Install packages
run: yarn install --prefer-offline
run: pnpm install --frozen-lockfile
- name: Lint
run: yarn lint
run: pnpm lint
- name: Test
run: yarn test --ci --coverage
run: pnpm test --ci --coverage
- name: Build
run: yarn build
run: pnpm build
- name: ESCheck
run: yarn run check
run: pnpm run check
- name: Publish to Codecov
uses: codecov/codecov-action@v3

View File

@ -30,17 +30,20 @@ jobs:
with:
languages: ${{ matrix.language }}
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Setup node and restore cached dependencies
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
node-version: '18'
cache: 'pnpm'
- name: Install packages
run: yarn install --prefer-offline
run: pnpm install --frozen-lockfile
- name: Build
run: yarn build
run: pnpm build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

View File

@ -16,22 +16,21 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Setup node and restore cached dependencies
uses: actions/setup-node@v3
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'
node-version: '18'
cache: 'pnpm'
- name: Install packages
run: yarn install --prefer-offline
run: pnpm install --frozen-lockfile
- name: Build specific version
run: yarn docs:build --base /${{ github.event.inputs.version }}/
run: pnpm docs:build --base /${{ github.event.inputs.version }}/
if: ${{ github.event.inputs.version != 'latest' }}
- name: Deploy to specific version
@ -47,7 +46,7 @@ jobs:
commit-message: 'Deploy docs for ${{ github.event.inputs.version }}'
- name: Build latest
run: yarn docs:build
run: pnpm docs:build
if: ${{ github.event.inputs.version == 'latest' }}
- name: Deploy to latest

View File

@ -16,20 +16,23 @@ jobs:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Setup node and restore cached dependencies
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'
cache: 'pnpm'
- name: Install packages
run: yarn install --prefer-offline
run: pnpm install --frozen-lockfile
- name: Build
run: npm run build
run: pnpm run build
- name: Publish to NPM
run: npm publish --access public
run: pnpm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

2
.gitignore vendored
View File

@ -13,7 +13,6 @@ docs/.vitepress/cache
# Random
/ignore
*.log
benchmark/yarn.lock
# Vscode
.vscode/*
@ -21,6 +20,7 @@ benchmark/yarn.lock
# Npm & Yarn
package-lock.json
benchmark/yarn.lock
.yarn/*
!.yarn/releases
!.yarn/plugins

2
.npmrc Normal file
View File

@ -0,0 +1,2 @@
use-lockfile-v6=true
auto-install-peers=true

View File

@ -11,4 +11,5 @@ node_modules
changelog.md
CHANGELOG.md
_comparison-benchmark.md
_comparison-benchmark.md
pnpm-lock.yaml

View File

@ -1,6 +1,5 @@
// https://github.com/arthurfiorette/prettier-config
module.exports = require('@arthurfiorette/prettier-config')({
tsdoc: true,
plugins: ['prettier-plugin-organize-imports', 'prettier-plugin-jsdoc']
// Any options here will override @arthurfiorette/prettier-config defaults
});

File diff suppressed because one or more lines are too long

View File

@ -1,4 +0,0 @@
version-git-message: "tag: v%s"
version-git-tag: true
yarn-path ".yarn/releases/yarn-1.22.17.cjs"

View File

@ -38,16 +38,17 @@
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"scripts": {
"benchmark": "cd benchmark && yarn start",
"benchmark": "cd benchmark && pnpm start",
"build": "sh build/build.sh",
"check": "sh build/check.sh",
"docs:build": "vitepress build docs",
"docs:dev": "vitepress dev docs --port 1227",
"docs:serve": "vitepress serve docs",
"format": "prettier --write .",
"preinstall": "npx only-allow pnpm",
"lint": "eslint . --ext .ts",
"test": "jest --coverage",
"version": "auto-changelog -p && cp CHANGELOG.md docs/src/others/changelog.md git add CHANGELOG.md docs/src/others/changelog.md"
"version": "auto-changelog -p && cp CHANGELOG.md docs/src/others/changelog.md && git add CHANGELOG.md docs/src/others/changelog.md"
},
"resolutions": {
"colors": "1.4.0"
@ -60,6 +61,7 @@
"devDependencies": {
"@arthurfiorette/prettier-config": "*",
"@types/jest": "^29.2.4",
"@types/node": "^18.13.0",
"@types/webpack": "^5.28.0",
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@typescript-eslint/parser": "^5.50.0",
@ -85,7 +87,7 @@
"peerDependencies": {
"axios": "^1"
},
"packageManager": "yarn@1.22.19",
"packageManager": "pnpm@7.27.0",
"engines": {
"node": ">=12"
},

5354
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

5200
yarn.lock

File diff suppressed because it is too large Load Diff