Browse Source

chore: pnpm => bun (#11358)

pull/11359/head
afc163 1 year ago
committed by GitHub
parent
commit
c971df4399
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      .github/dependabot.yml
  2. 11
      .github/workflows/ci.yml
  3. 12
      .github/workflows/codeql.yml
  4. 33
      .github/workflows/pnpm.yml
  5. 5
      .lintstagedrc
  6. 30
      package.json
  7. 24661
      pnpm-lock.yaml

6
.github/dependabot.yml

@ -5,7 +5,7 @@
version: 2 version: 2
updates: updates:
- package-ecosystem: "" # See documentation for possible values - package-ecosystem: '' # See documentation for possible values
directory: "/" # Location of package manifests directory: '/' # Location of package manifests
schedule: schedule:
interval: "weekly" interval: 'weekly'

11
.github/workflows/ci.yml

@ -1,4 +1,4 @@
name: Node CI name: CI
on: [push, pull_request] on: [push, pull_request]
@ -19,10 +19,11 @@ jobs:
with: with:
node-version: ${{ matrix.node_version }} node-version: ${{ matrix.node_version }}
- run: echo ${{github.ref}} - run: echo ${{github.ref}}
- run: npm install - uses: oven-sh/setup-bun@v2
- run: yarn run lint - run: bun install
- run: yarn run tsc - run: bun run lint
- run: yarn run build - run: bun run tsc
- run: bun run build
env: env:
CI: true CI: true
PROGRESS: none PROGRESS: none

12
.github/workflows/codeql.yml

@ -1,12 +1,12 @@
name: "CodeQL" name: 'CodeQL'
on: on:
push: push:
branches: [ "master" ] branches: ['master']
pull_request: pull_request:
branches: [ "master" ] branches: ['master']
schedule: schedule:
- cron: "48 12 * * 2" - cron: '48 12 * * 2'
jobs: jobs:
analyze: analyze:
@ -20,7 +20,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
language: [ javascript ] language: [javascript]
steps: steps:
- name: Checkout - name: Checkout
@ -38,4 +38,4 @@ jobs:
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2 uses: github/codeql-action/analyze@v2
with: with:
category: "/language:${{ matrix.language }}" category: '/language:${{ matrix.language }}'

33
.github/workflows/pnpm.yml

@ -1,33 +0,0 @@
name: Node pnpm CI
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [16.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- run: echo ${{github.ref}}
- run: curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7
- run: pnpm config set store-dir ~/.pnpm-store
- run: pnpm install --strict-peer-dependencies=false
- run: pnpm run lint
- run: pnpm run tsc
- run: pnpm run build
- run: pnpm run test
env:
CI: true
PROGRESS: none
NODE_ENV: test
NODE_OPTIONS: --max_old_space_size=4096

5
.lintstagedrc

@ -1,3 +1,6 @@
{ {
"*": "prettier --ignore-unknown --write" "**/*.{js,jsx,ts,tsx}": "npm run lint-staged:js",
"**/*.{js,jsx,tsx,ts,less,md,json,yml}": [
"prettier --write"
]
} }

30
package.json

@ -35,21 +35,14 @@
"test:update": "npm run jest -- -u", "test:update": "npm run jest -- -u",
"tsc": "tsc --noEmit" "tsc": "tsc --noEmit"
}, },
"lint-staged": {
"**/*.{js,jsx,ts,tsx}": "npm run lint-staged:js",
"**/*.{js,jsx,tsx,ts,less,md,json}": [
"prettier --write"
]
},
"browserslist": [ "browserslist": [
"defaults" "defaults"
], ],
"dependencies": { "dependencies": {
"@ant-design/icons": "^4.8.3", "@ant-design/icons": "^4.8.3",
"@ant-design/pro-components": "^2.7.9", "@ant-design/pro-components": "^2.7.19",
"@testing-library/dom": "^10.4.0", "antd": "^5.21.2",
"antd": "^5.18.0", "antd-style": "^3.7.0",
"antd-style": "^3.6.2",
"classnames": "^2.5.1", "classnames": "^2.5.1",
"dayjs": "^1.11.13", "dayjs": "^1.11.13",
"querystring": "^0.2.1", "querystring": "^0.2.1",
@ -60,21 +53,22 @@
"@ant-design/pro-cli": "^3.3.0", "@ant-design/pro-cli": "^3.3.0",
"@commitlint/cli": "^19.5.0", "@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0", "@commitlint/config-conventional": "^19.5.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/react": "^16.0.1", "@testing-library/react": "^16.0.1",
"@types/classnames": "^2.3.1", "@types/classnames": "^2.3.1",
"@types/express": "^4.17.21", "@types/express": "^4.17.21",
"@types/history": "^4.7.11", "@types/history": "^4.7.11",
"@types/jest": "^29.5.12", "@types/jest": "^29.5.13",
"@types/lodash": "^4.17.4", "@types/lodash": "^4.17.10",
"@types/react": "^18.3.3", "@types/react": "^18.3.11",
"@types/react-dom": "^18.3.0", "@types/react-dom": "^18.3.0",
"@types/react-helmet": "^6.1.11", "@types/react-helmet": "^6.1.11",
"@umijs/fabric": "^2.14.1", "@umijs/fabric": "^2.14.1",
"@umijs/lint": "^4.2.9", "@umijs/lint": "^4.3.24",
"@umijs/max": "^4.2.9", "@umijs/max": "^4.3.24",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^8.57.0", "eslint": "^8.57.1",
"express": "^4.19.2", "express": "^4.21.1",
"gh-pages": "^3.2.3", "gh-pages": "^3.2.3",
"husky": "^9.1.6", "husky": "^9.1.6",
"jest": "^29.7.0", "jest": "^29.7.0",
@ -85,7 +79,7 @@
"react-dev-inspector": "^1.9.0", "react-dev-inspector": "^1.9.0",
"swagger-ui-dist": "^4.19.1", "swagger-ui-dist": "^4.19.1",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"typescript": "^5.4.5", "typescript": "^5.6.3",
"umi-presets-pro": "^2.0.3", "umi-presets-pro": "^2.0.3",
"umi-serve": "^1.9.11" "umi-serve": "^1.9.11"
}, },

24661
pnpm-lock.yaml

File diff suppressed because it is too large
Loading…
Cancel
Save