Skip to content

Commit 150c4d4

Browse files
committed
chore: Switch to pnpm & turborepo & vitest
1 parent 83ed016 commit 150c4d4

31 files changed

+5920
-5169
lines changed

.circleci/config.yml

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,34 @@
1-
version: 2.1
2-
orbs:
3-
node: circleci/node@1.1.6
1+
version: 2
42
jobs:
5-
build-and-test:
6-
executor:
7-
name: node/default
3+
setup:
4+
docker:
5+
- image: znck/pnpm:latest
86
steps:
97
- checkout
10-
- node/with-cache:
11-
steps:
12-
- run: npm install
13-
- run: npm test
8+
- restore_cache:
9+
key: dependency-cache-{{ checksum "pnpm-lock.yaml" }}
10+
- run:
11+
name: Install
12+
command: pnpm install --frozen-lockfile
13+
- save_cache:
14+
key: dependency-cache-{{ checksum "pnpm-lock.yaml" }}
15+
paths:
16+
- node_modules
17+
test:
18+
docker:
19+
- image: znck/pnpm:latest
20+
steps:
21+
- checkout
22+
- restore_cache:
23+
key: dependency-cache-{{ checksum "pnpm-lock.yaml" }}
24+
- run:
25+
name: Test and Lint
26+
command: pnpm test
1427
workflows:
15-
build-and-test:
16-
jobs:
17-
- build-and-test
28+
version: 2
29+
build_and_test:
30+
jobs:
31+
- setup
32+
- test:
33+
requires:
34+
- setup

.eslintrc

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,13 @@
1414
],
1515
"extends": [
1616
"eslint:recommended",
17-
"plugin:@typescript-eslint/eslint-recommended",
18-
"plugin:@typescript-eslint/recommended",
19-
"prettier",
20-
"prettier/@typescript-eslint"
17+
"plugin:@typescript-eslint/recommended",
18+
"prettier"
2119
],
2220
"env": {
2321
"es6": true,
2422
"browser": true,
25-
"node": true,
26-
"jest": true
23+
"node": true
2724
},
2825
"rules": {
2926
"func-names": [
@@ -56,5 +53,6 @@
5653
"extendDefaults": true
5754
}
5855
]
59-
}
60-
}
56+
},
57+
"ignorePatterns": ["dist/", "node_modules", "scripts", "examples"]
58+
}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ esm
99
.idea
1010
examples/**/yarn.lock
1111
examples/**/node_modules
12-
package-lock.json
12+
package-lock.json
13+
*/**/.turbo
14+
.turbo
15+
.rollup.cache

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
strict-peer-dependencies=false
2+
shamefully-hoist=true
File renamed without changes.
File renamed without changes.
File renamed without changes.

_internal/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { usePromiseQueue } from './composable/usePromiseQueue'
2+
import { useHistory } from './composable/useHistory'
3+
import { useCache } from './composable/useCache'
4+
import { createEvents } from './utils/createEvents'
5+
6+
export { usePromiseQueue, useHistory, useCache, createEvents }
7+
8+
export * from './utils/common'
9+
export * from './utils/helper'
10+
11+
export * from './types'

_internal/package.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "vue-condition-watcher-internal",
3+
"version": "0.0.1",
4+
"main": "./dist/index.js",
5+
"module": "./dist/index.esm.js",
6+
"types": "./dist/_internal",
7+
"exports": "./dist/index.mjs",
8+
"private": true,
9+
"scripts": {
10+
"build": "bunchee index.ts --no-sourcemap",
11+
"types:check": "tsc --noEmit",
12+
"clean": "rimraf dist"
13+
},
14+
"peerDependencies": {
15+
"vue-demi": "*",
16+
"@vue/composition-api": "^1.1.0",
17+
"@nuxtjs/composition-api": "^0.24.4",
18+
"vue": "^2.6.0 || ^3.2.0"
19+
},
20+
"peerDependenciesMeta": {
21+
"@vue/composition-api": {
22+
"optional": true
23+
},
24+
"@nuxtjs/composition-api": {
25+
"optional": true
26+
}
27+
}
28+
}

_internal/tsconfig.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"rootDir": "..",
5+
"outDir": "./dist"
6+
},
7+
"include": ["./**/*.ts"]
8+
}

0 commit comments

Comments
 (0)