refactor: replace yarn with pnpm as package manager
This commit is contained in:
@@ -4,8 +4,8 @@
|
|||||||
"dockerfile": "Dockerfile",
|
"dockerfile": "Dockerfile",
|
||||||
"context": "../"
|
"context": "../"
|
||||||
},
|
},
|
||||||
"postCreateCommand": "yarn install && yarn build",
|
"postCreateCommand": "npm i -g pnpm && pnpm install && pnpm build",
|
||||||
"postStartCommand": "yarn dev",
|
"postStartCommand": "pnpm dev",
|
||||||
"remoteUser": "node",
|
"remoteUser": "node",
|
||||||
"forwardPorts": [
|
"forwardPorts": [
|
||||||
3000
|
3000
|
||||||
|
|||||||
31
.github/workflows/build-and-test.yml
vendored
31
.github/workflows/build-and-test.yml
vendored
@@ -31,32 +31,39 @@ jobs:
|
|||||||
uses: actions/checkout@master
|
uses: actions/checkout@master
|
||||||
|
|
||||||
- name: Setup node env 🏗
|
- name: Setup node env 🏗
|
||||||
uses: actions/setup-node@v2.1.2
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v2.0.1
|
||||||
|
name: Install pnpm
|
||||||
|
id: pnpm-install
|
||||||
|
with:
|
||||||
|
version: 7
|
||||||
|
run_install: false
|
||||||
|
|
||||||
- name: Get yarn cache directory path 🛠
|
- name: Get yarn cache directory path 🛠
|
||||||
id: yarn-cache-dir-path
|
id: pnpm-cache-dir-path
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
run: echo "::set-output name=dir::$(pnpm cache dir)"
|
||||||
|
|
||||||
- name: Cache node_modules 📦
|
- name: Cache node_modules 📦
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
id: pnpm-cache # use this to check for `cache-hit` (`steps.pnpm-cache.outputs.cache-hit != 'true'`)
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
path: ${{ steps.pnpm-cache-dir-path.outputs.dir }}
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-
|
${{ runner.os }}-pnpm-
|
||||||
|
|
||||||
- name: Install dependencies 👨🏻💻
|
- name: Install dependencies 👨🏻💻
|
||||||
run: yarn install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Run linter 🧹
|
- name: Run linter 🧹
|
||||||
run: yarn lint
|
run: pnpm lint
|
||||||
|
|
||||||
- name: Build Library 👷
|
- name: Build Library 👷
|
||||||
run: yarn build --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}"
|
run: pnpm build --api="http://127.0.0.1:9080" --token="${{ secrets.TURBO_SERVER_TOKEN }}"
|
||||||
|
|
||||||
- name: Run tests 🧪
|
- name: Run tests 🧪
|
||||||
run: yarn test
|
run: pnpm test
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
nodeLinker: 'node-modules'
|
|
||||||
19
README.md
19
README.md
@@ -126,12 +126,21 @@ there is no support for Vue 2, nor will there be any support in the future, sorr
|
|||||||
|
|
||||||
## 🧪 Development
|
## 🧪 Development
|
||||||
|
|
||||||
```bash
|
### Prerequisites
|
||||||
# start (dev)
|
|
||||||
$ yarn dev
|
|
||||||
|
|
||||||
# build dist
|
- [Node.js v12+](https://nodejs.org/)
|
||||||
$ yarn build
|
- [PnPm](https://pnpm.io/)
|
||||||
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# skip if you already have pnpm installed
|
||||||
|
$ npm i -g pnpm
|
||||||
|
|
||||||
|
# start examples
|
||||||
|
$ pnpm dev
|
||||||
|
|
||||||
|
# build all packages
|
||||||
|
$ pnpm build
|
||||||
```
|
```
|
||||||
|
|
||||||
### 🐳 Dev Container
|
### 🐳 Dev Container
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@animxyz/core": "^0.6.6",
|
"@animxyz/core": "^0.6.6",
|
||||||
"@animxyz/vue3": "^0.6.6",
|
"@animxyz/vue3": "^0.6.6",
|
||||||
"@braks/vue-flow": "^0.4.14",
|
"@braks/vue-flow": "workspace:*",
|
||||||
"@stackblitz/sdk": "^1.6.0",
|
"@stackblitz/sdk": "^1.6.0",
|
||||||
"@vue/repl": "1.1.2",
|
"@vue/repl": "1.1.2",
|
||||||
"blobity": "^0.1.7",
|
"blobity": "^0.1.7",
|
||||||
|
|||||||
1
docs/src/.vuepress/auto-imports.d.ts
vendored
1
docs/src/.vuepress/auto-imports.d.ts
vendored
@@ -126,6 +126,7 @@ declare global {
|
|||||||
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
|
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
|
||||||
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
|
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
|
||||||
const useDraggable: typeof import('@vueuse/core')['useDraggable']
|
const useDraggable: typeof import('@vueuse/core')['useDraggable']
|
||||||
|
const useDropZone: typeof import('@vueuse/core')['useDropZone']
|
||||||
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
|
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
|
||||||
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
|
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
|
||||||
const useElementHover: typeof import('@vueuse/core')['useElementHover']
|
const useElementHover: typeof import('@vueuse/core')['useElementHover']
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ export function copyVueFlowPlugin(): Plugin {
|
|||||||
console.log('building')
|
console.log('building')
|
||||||
const filePath = resolve(
|
const filePath = resolve(
|
||||||
__dirname,
|
__dirname,
|
||||||
'../../../node_modules/@braks/vue-flow/dist/vue-flow.es.js'
|
'../../node_modules/@braks/vue-flow/dist/vue-flow.es.js'
|
||||||
)
|
)
|
||||||
if (!existsSync(filePath)) {
|
if (!existsSync(filePath)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`@braks/vue-flow/dist/vue-flow.es.js not built. ` +
|
`@braks/vue-flow/dist/vue-flow.es.js not built. ` +
|
||||||
`Run "yarn build" first.`
|
`Run "pnpm build" first.`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
this.emitFile({
|
this.emitFile({
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
- [Node.js v12+](https://nodejs.org/)
|
- [Node.js v12+](https://nodejs.org/)
|
||||||
- [Vue 3](https://vuejs.org/)
|
- [Vue 3](https://vuejs.org/)
|
||||||
- [Yarn v1 classic](https://classic.yarnpkg.com/en/) (Optional)
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"open": "cypress open-ct"
|
"open": "cypress open-ct"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@braks/vue-flow": "^0.4.6"
|
"@braks/vue-flow": "workspace:*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@cypress/vite-dev-server": "^2.2.1",
|
"@cypress/vite-dev-server": "^2.2.1",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"lint": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix --ignore-path .gitignore ."
|
"lint": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix --ignore-path .gitignore ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@braks/vue-flow": "^0.4.6"
|
"@braks/vue-flow": "workspace:*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/dagre": "^0.7.46",
|
"@types/dagre": "^0.7.46",
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
"packages/**"
|
"packages/**"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "yarn --cwd examples dev",
|
"dev": "pnpm --dir examples dev",
|
||||||
"docs": "yarn --cwd docs dev",
|
"docs": "pnpm --dir docs dev",
|
||||||
"postrelease": "git-cliff --output CHANGELOG.md && git add CHANGELOG.md && git commit -m \"chore: Update CHANGELOG.md\"",
|
"postrelease": "git-cliff --output CHANGELOG.md && git add CHANGELOG.md && git commit -m \"chore: Update CHANGELOG.md\"",
|
||||||
"release": "turbo run release",
|
"release": "turbo run release",
|
||||||
"build": "turbo run build",
|
"build": "turbo run build",
|
||||||
|
|||||||
@@ -21,20 +21,20 @@
|
|||||||
"prepare": "ts-patch install -s",
|
"prepare": "ts-patch install -s",
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"types": "yarn prepare && vue-tsc --declaration --emitDeclarationOnly && shx rm -rf tmp",
|
"types": "pnpm prepare && vue-tsc --declaration --emitDeclarationOnly && shx rm -rf tmp",
|
||||||
"postbuild": "shx rm -rf tmp",
|
"postbuild": "shx rm -rf tmp",
|
||||||
"prepublishOnly": "yarn build",
|
"prepublishOnly": "pnpm build",
|
||||||
"test": "exit 0;",
|
"test": "exit 0;",
|
||||||
"lint:js": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix --ignore-path .gitignore .",
|
"lint:js": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix --ignore-path .gitignore .",
|
||||||
"lint": "yarn lint:js",
|
"lint": "pnpm lint:js",
|
||||||
"release": "yarn np --no-release-draft"
|
"release": "pnpm np --no-release-draft"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pathfinding": "^0.4.18",
|
"pathfinding": "^0.4.18",
|
||||||
"perfect-arrows": "^0.3.7"
|
"perfect-arrows": "^0.3.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@braks/vue-flow": "^0.4.10",
|
"@braks/vue-flow": "workspace:*",
|
||||||
"@types/pathfinding": "^0.0.5",
|
"@types/pathfinding": "^0.0.5",
|
||||||
"@vitejs/plugin-vue": "^2.3.3",
|
"@vitejs/plugin-vue": "^2.3.3",
|
||||||
"np": "^7.5.0",
|
"np": "^7.5.0",
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
"vue-tsc": "^0.35.0"
|
"vue-tsc": "^0.35.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@braks/vue-flow": "^0.4.0",
|
"@braks/vue-flow": "^0.4.15",
|
||||||
"vue": "^3.2.25"
|
"vue": "^3.2.25"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
@@ -55,7 +55,6 @@
|
|||||||
},
|
},
|
||||||
"np": {
|
"np": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"yarn": true,
|
|
||||||
"message": "v%s"
|
"message": "v%s"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -21,20 +21,20 @@
|
|||||||
"prepare": "ts-patch install -s",
|
"prepare": "ts-patch install -s",
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"types": "yarn prepare && vue-tsc --declaration --emitDeclarationOnly && shx rm -rf tmp",
|
"types": "pnpm prepare && vue-tsc --declaration --emitDeclarationOnly && shx rm -rf tmp",
|
||||||
"postbuild": "shx rm -rf tmp",
|
"postbuild": "shx rm -rf tmp",
|
||||||
"prepublishOnly": "yarn build",
|
"prepublishOnly": "pnpm build",
|
||||||
"test": "exit 0;",
|
"test": "exit 0;",
|
||||||
"lint:js": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix --ignore-path .gitignore .",
|
"lint:js": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix --ignore-path .gitignore .",
|
||||||
"lint": "yarn lint:js",
|
"lint": "pnpm lint:js",
|
||||||
"release": "yarn np --no-release-draft"
|
"release": "pnpm np --no-release-draft"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vueuse/core": "^8.4.2",
|
"@vueuse/core": "^8.4.2",
|
||||||
"vue3-moveable": "^0.4.8"
|
"vue3-moveable": "^0.4.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@braks/vue-flow": "^0.4.14",
|
"@braks/vue-flow": "workspace:*",
|
||||||
"@vitejs/plugin-vue": "^2.3.3",
|
"@vitejs/plugin-vue": "^2.3.3",
|
||||||
"np": "^7.5.0",
|
"np": "^7.5.0",
|
||||||
"ts-patch": "^2.0.1",
|
"ts-patch": "^2.0.1",
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
"vue-tsc": "^0.35.0"
|
"vue-tsc": "^0.35.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@braks/vue-flow": "^0.4.0",
|
"@braks/vue-flow": "^0.4.15",
|
||||||
"vue": "^3.2.25"
|
"vue": "^3.2.25"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
@@ -54,7 +54,6 @@
|
|||||||
},
|
},
|
||||||
"np": {
|
"np": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"yarn": true,
|
|
||||||
"message": "v%s"
|
"message": "v%s"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ declare global {
|
|||||||
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
|
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
|
||||||
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
|
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
|
||||||
const useDraggable: typeof import('@vueuse/core')['useDraggable']
|
const useDraggable: typeof import('@vueuse/core')['useDraggable']
|
||||||
|
const useDropZone: typeof import('@vueuse/core')['useDropZone']
|
||||||
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
|
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
|
||||||
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
|
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
|
||||||
const useElementHover: typeof import('@vueuse/core')['useElementHover']
|
const useElementHover: typeof import('@vueuse/core')['useElementHover']
|
||||||
|
|||||||
@@ -24,13 +24,13 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "ts-patch install -s",
|
"prepare": "ts-patch install -s",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"types": "yarn prepare && vue-tsc --declaration --emitDeclarationOnly && tsc -p tsconfig.build.json && shx rm -rf tmp && yarn lint:dist",
|
"types": "pnpm prepare && vue-tsc --declaration --emitDeclarationOnly && tsc -p tsconfig.build.json && shx rm -rf tmp && pnpm lint:dist",
|
||||||
"typedoc": "typedoc --tsconfig tsconfig.docs.json dist/index.d.ts --out typedocs",
|
"typedoc": "typedoc --tsconfig tsconfig.docs.json dist/index.d.ts --out typedocs",
|
||||||
"theme": "postcss src/style.css -o dist/style.css && postcss src/theme-default.css -o dist/theme-default.css",
|
"theme": "postcss src/style.css -o dist/style.css && postcss src/theme-default.css -o dist/theme-default.css",
|
||||||
"lint": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix --ignore-path ../../.gitignore .",
|
"lint": "eslint --ext \".js,.jsx,.ts,.tsx\" --fix --ignore-path ../../.gitignore .",
|
||||||
"lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix ./dist",
|
"lint:dist": "eslint --ext \".ts,.tsx\" -c .eslintrc.js --fix ./dist",
|
||||||
"prepublishOnly": "shx cp ../../README.md .",
|
"prepublishOnly": "shx cp ../../README.md .",
|
||||||
"release": "yarn np",
|
"release": "pnpm np",
|
||||||
"postpublish": "shx rm README.md"
|
"postpublish": "shx rm README.md"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
@@ -67,7 +67,6 @@
|
|||||||
},
|
},
|
||||||
"np": {
|
"np": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"yarn": true,
|
|
||||||
"message": "v%s"
|
"message": "v%s"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1
packages/vue-flow/src/auto-imports.d.ts
vendored
1
packages/vue-flow/src/auto-imports.d.ts
vendored
@@ -133,6 +133,7 @@ declare global {
|
|||||||
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
|
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
|
||||||
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
|
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
|
||||||
const useDraggable: typeof import('@vueuse/core')['useDraggable']
|
const useDraggable: typeof import('@vueuse/core')['useDraggable']
|
||||||
|
const useDropZone: typeof import('@vueuse/core')['useDropZone']
|
||||||
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
|
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
|
||||||
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
|
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
|
||||||
const useElementHover: typeof import('@vueuse/core')['useElementHover']
|
const useElementHover: typeof import('@vueuse/core')['useElementHover']
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
9821
pnpm-lock.yaml
generated
Normal file
9821
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
5
pnpm-workspace.yaml
Normal file
5
pnpm-workspace.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
packages:
|
||||||
|
- packages/*
|
||||||
|
- examples
|
||||||
|
- e2e
|
||||||
|
- docs
|
||||||
Reference in New Issue
Block a user