Skip to content

Commit 9dfbc6e

Browse files
committed
chore: setup monorepo with separate package for tests
1 parent e6ee478 commit 9dfbc6e

34 files changed

+376
-346
lines changed

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/dist/
1+
dist/

.eslintrc.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@ module.exports = {
1010
},
1111
},
1212
rules: {
13-
'import/no-extraneous-dependencies': ['error', {
14-
devDependencies: [
15-
'src/**/*.spec.ts',
16-
'tests/**/*.ts',
17-
'vite.config.js',
18-
],
19-
}],
13+
'import/no-extraneous-dependencies': 'off',
2014

2115
'no-void': 'off',
2216
},

.github/workflows/checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ jobs:
7070
- name: Install dependencies
7171
run: corepack pnpm install
7272
- name: Run tests
73-
run: npm run test
73+
run: npm run test:all

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Build package
3333
run: npm run build
3434
- name: Publish package
35-
run: npm run publish
35+
run: corepack pnpm publish --no-git-checks
3636
- name: Create github release
3737
run: npm run release:github
3838
env:

.versionrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"packageFiles": ["packages/core/package.json"],
3+
"bumpFiles": ["packages/core/package.json"],
4+
"infile": "packages/core/CHANGELOG.md"
5+
}

CHANGELOG.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./packages/core/CHANGELOG.md

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./packages/core/LICENSE

README.md

Lines changed: 0 additions & 102 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./packages/core/README.md

package.json

Lines changed: 12 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,38 @@
11
{
2-
"name": "vue-use-route-query",
3-
"version": "0.0.1",
4-
"author": "Kirill Romanov",
5-
"license": "MIT",
6-
"repository": {
7-
"type": "git",
8-
"url": "https://github.com/Djaler/vue-use-route-query"
9-
},
10-
"keywords": [
11-
"vue",
12-
"router",
13-
"vue-router",
14-
"query",
15-
"composition-api",
16-
"vue-composition-api"
17-
],
2+
"name": "vue-use-route-query-monorepo",
3+
"private": true,
184
"scripts": {
195
"preinstall": "npx only-allow pnpm",
206
"lint": "eslint .",
217
"lint:fix": "npm run lint -- --fix",
22-
"test": "vitest run",
23-
"test:watch": "vitest watch",
24-
"check-es6": "es-check es2017 dist/index.js",
25-
"check-treeshake": "agadoo dist/index.mjs",
26-
"build": "vite build",
27-
"postbuild": "npm run check-es6 && npm run check-treeshake",
28-
"prerelease": "npm run lint && npm run test && npm run build",
8+
"test:core": "cd packages/core && npm run test",
9+
"test:vue2": "cd packages/tests-vue2 && npm run test",
10+
"test:all": "npm run test:core && npm run test:vue2",
11+
"build": "cd packages/core && npm run build",
12+
"prerelease": "npm run lint && npm run test:all && npm run build",
2913
"release": "standard-version --preset @djaler/standard",
3014
"release:github": "conventional-github-releaser --preset @djaler/standard",
31-
"publish": "clean-publish"
15+
"prepublishOnly": "cd packages/core && npm run publish"
3216
},
33-
"files": [
34-
"dist"
35-
],
36-
"main": "dist/index.js",
37-
"module": "dist/index.mjs",
38-
"types": "dist/index.d.ts",
39-
"sideEffects": false,
4017
"packageManager": "[email protected]",
41-
"dependencies": {
42-
"async-queue-chain": "^1.0.1"
43-
},
44-
"peerDependencies": {
45-
"@vue/composition-api": "^1.1.0",
46-
"vue": "^2.6.10",
47-
"vue-router": "^3.0.0"
48-
},
4918
"devDependencies": {
5019
"@djaler/conventional-changelog-standard": "1.2.0",
5120
"@djaler/eslint-config-typescript": "0.0.7",
52-
"@vue/composition-api": "1.4.9",
53-
"@vue/test-utils": "1.3.0",
54-
"agadoo": "2.0.0",
55-
"clean-publish": "4.0.0",
5621
"conventional-github-releaser": "3.1.5",
57-
"es-check": "6.2.1",
5822
"eslint": "7.32.0",
5923
"eslint-import-resolver-typescript": "2.7.1",
60-
"jsdom": "^19.0.0",
6124
"nano-staged": "0.6.0",
6225
"simple-git-hooks": "2.7.0",
63-
"simple-promise-mock": "^1.0.0",
6426
"standard-version": "9.3.2",
65-
"typescript": "4.6.3",
66-
"vite": "2.9.1",
67-
"vite-plugin-dts": "1.0.5",
68-
"vitest": "0.9.3",
69-
"vue": "2.6.14",
70-
"vue-router": "3.1.3",
71-
"vue-template-compiler": "2.6.14"
27+
"typescript": "4.6.3"
7228
},
7329
"simple-git-hooks": {
7430
"pre-commit": "./node_modules/.bin/simple-git-hooks && ./node_modules/.bin/nano-staged"
7531
},
7632
"nano-staged": {
7733
"*.{js,ts}": "eslint --fix"
34+
},
35+
"publishConfig": {
36+
"directory": "packages/core/publishDirectory"
7837
}
7938
}

packages/core/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
publishDirectory/

packages/core/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4+
5+
### 0.0.1 (2022-04-13)
6+
7+
8+
### Features
9+
10+
* initial ([059bdb5](https://github.com/Djaler/vue-use-route-query/commit/059bdb570113e3164e12903a8204ee378e93735e))

packages/core/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Kirill Romanov
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)