Skip to content

Commit

Permalink
build: upgrade package manager
Browse files Browse the repository at this point in the history
Upgrade package manager
  • Loading branch information
HaydenOrz authored Aug 9, 2024
2 parents e4a8b66 + 9d7d385 commit e090623
Show file tree
Hide file tree
Showing 14 changed files with 5,087 additions and 3,070 deletions.
3 changes: 0 additions & 3 deletions .czrc

This file was deleted.

70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 9.7.0

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run prettier check
run: pnpm prettier-check

- name: Run tsc check
run: pnpm check-types

build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 9.7.0

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run Build
run: pnpm build
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ package-lock.json
.parcel-cache
.vscode
example
*.tgz
*.tgz
.DS_Store
51 changes: 0 additions & 51 deletions .gitlab-ci.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .lintstagedrc.js

This file was deleted.

16 changes: 0 additions & 16 deletions .npmignore

This file was deleted.

3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ npm-debug.log
debug.log
yarn-error.log
package-lock.json
lib/
lib/
CHANGELOG.md
15 changes: 6 additions & 9 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
"singleQuote": true,
"trailingComma": "es5",
"semi": true,
"tabWidth": 4,
"printWidth": 80,
"overrides": [
{
"files": "**/.prettierrc",
"options": { "parser": "json" }
}
]
"singleQuote": true,
"useTabs": false,
"bracketSpacing": true,
"arrowParens": "always",
"trailingComma": "es5"
}

2 changes: 1 addition & 1 deletion CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

#### 其他

- 🛠 `commonFileEditDelegator` 已经重命名为 `commandDelegator`
- 🛠 `commonFileEditDelegator` 已经重命名为 `commandDelegator`

<br/>

Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2020 - present DTStack

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 21 additions & 0 deletions license
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2020 - present DTStack

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
120 changes: 67 additions & 53 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,55 +1,69 @@
{
"name": "dt-react-monaco-editor",
"version": "1.0.4",
"description": "Monaco editor for React.",
"authors": "DTStack Corporation",
"keywords": [
"react",
"monaco",
"editor"
],
"repository": {
"type": "git",
"url": "https://github.com/DTStack/dt-react-monaco-editor"
},
"main": "lib/index.js",
"module": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"lib/*"
],
"scripts": {
"prepare": "husky install",
"prepublishOnly": "npm run build",
"build": "rm -rf lib && tsc",
"watch": "rm -rf lib && tsc --watch",
"release": "npm run build && node ./scripts/release.js",
"check-types": "tsc --noEmit --skipLibCheck",
"lint": "prettier --check './src/**/*.{js,jsx,tsx,ts,less}'",
"lint-fix": "prettier --write './src/**/*.{js,jsx,tsx,ts,less}'"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
"@commitlint/cli": "^17.6.3",
"@commitlint/config-conventional": "^17.6.3",
"@commitlint/cz-commitlint": "^17.5.0",
"@types/react": "18.x",
"commitizen": "^4.3.0",
"husky": "^8.0.3",
"inquirer": "^8.2.2",
"lint-staged": "^10.0.7",
"monaco-editor": "0.31.1",
"prettier": "^2.2.0",
"react": "18.x",
"standard-version": "^7.0.1",
"tslib": "^2.5.0",
"typescript": "^5.0.4"
},
"peerDependencies": {
"monaco-editor": "^0.31.0",
"react": ">=16.13.1"
},
"license": "MIT"
"name": "dt-react-monaco-editor",
"version": "1.0.4",
"description": "Monaco editor for React.",
"authors": "DTStack Corporation",
"keywords": [
"react",
"monaco",
"editor"
],
"repository": {
"type": "git",
"url": "https://github.com/DTStack/dt-react-monaco-editor.git"
},
"main": "lib/index.js",
"module": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"lib/*"
],
"scripts": {
"prepare": "husky install",
"prepublishOnly": "npm run build",
"build": "rm -rf lib && tsc",
"watch": "rm -rf lib && tsc --watch",
"release": "npm run build && node ./scripts/release.js",
"check-types": "tsc --noEmit --skipLibCheck",
"format": "prettier --write .",
"prettier-check": "prettier --check ."
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
"@commitlint/cli": "^17.6.3",
"@commitlint/config-conventional": "^17.6.3",
"@commitlint/cz-commitlint": "^17.5.0",
"@types/react": "18.x",
"commitizen": "^4.3.0",
"husky": "^8.0.3",
"inquirer": "^8.2.2",
"lint-staged": "^10.0.7",
"monaco-editor": "0.31.1",
"prettier": "^2.2.0",
"react": "18.x",
"standard-version": "^7.0.1",
"tslib": "^2.5.0",
"typescript": "^5.0.4"
},
"peerDependencies": {
"monaco-editor": "^0.31.0",
"react": ">=16.13.1"
},
"license": "MIT",
"engines": {
"node": ">=18"
},
"packageManager": "[email protected]",
"config": {
"commitizen": {
"path": "./node_modules/@commitlint/cz-commitlint"
}
},
"lint-staged": {
"*": [
"prettier --write --ignore-unknown"
]
}
}
Loading

0 comments on commit e090623

Please sign in to comment.