]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
build: refactor to use multi package
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 17 Aug 2021 14:55:09 +0000 (16:55 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Tue, 17 Aug 2021 14:55:09 +0000 (16:55 +0200)
packages/pinia/api-extractor.json
packages/pinia/package.json
packages/pinia/test-dts/actions.test-d.ts
packages/pinia/test-dts/onAction.test-d.ts
packages/pinia/test-dts/tsconfig.json
packages/pinia/test-dts/typeHelpers.test-d.ts

index ca11cda8373df7a61974ccb43f023cc389712af0..9d27602f6e6084796dfc30b442144d6ac9074a5d 100644 (file)
@@ -1,8 +1,7 @@
-// this the shared base config for all packages.
 {
   "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
 
-  "mainEntryPointFilePath": "./dist/src/index.d.ts",
+  "mainEntryPointFilePath": "./dist/packages/pinia/src/index.d.ts",
 
   "apiReport": {
     "enabled": true,
index dd9759ddaeebb494b0bf093a44bfe88824f6122b..f95464c6c07e30393124a91addb031a1a4c89f45 100644 (file)
   "scripts": {
     "docs": "vitepress dev docs",
     "docs:build": "vitepress build docs",
-    "build": "rimraf dist && rollup -c rollup.config.js",
+    "build": "rimraf dist && rollup -c ../../rollup.config.js --environment TARGET:pinia",
     "build:dts": "api-extractor run --local --verbose",
     "size": "rollup -c size-checks/rollup.config.js && node scripts/check-size.mjs",
     "release": "bash scripts/release.sh",
-    "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
-    "lint": "prettier -c --parser typescript \"{src,__tests__,e2e}/**/*.[jt]s?(x)\"",
-    "lint:fix": "yarn run lint --write",
+    "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --commit-path . -l pinia -r 1",
     "test:dts": "tsc -p ./test-dts/tsconfig.json",
-    "test:types": "tsc --build tsconfig.json",
-    "test:unit": "jest --coverage",
+    "test:types": "tsc --build ../../tsconfig.json",
     "dev": "yarn run test:unit --watchAll",
     "play": "yarn vite",
-    "test": "yarn run test:types && yarn run test:unit && yarn run build && yarn run build:dts && yarn test:dts"
+    "test": "yarn run test:types && yarn run build && yarn run build:dts && yarn test:dts"
   },
   "files": [
     "dist/*.js",
@@ -72,8 +69,6 @@
     "@rollup/plugin-commonjs": "^20.0.0",
     "@rollup/plugin-node-resolve": "^13.0.4",
     "@rollup/plugin-replace": "^3.0.0",
-    "@sucrase/jest-plugin": "^2.1.1",
-    "@types/jest": "^27.0.1",
     "@types/lodash.kebabcase": "^4.1.6",
     "@types/node": "^16.4.3",
     "@vitejs/plugin-vue": "^1.4.0",
@@ -85,8 +80,6 @@
     "codecov": "^3.8.3",
     "conventional-changelog-cli": "^2.1.1",
     "globby": "^12.0.0",
-    "jest": "^27.0.6",
-    "jest-mock-warn": "^1.1.0",
     "lint-staged": "^11.1.2",
     "lodash.kebabcase": "^4.1.1",
     "mande": "^1.0.0",
       "optional": true
     }
   },
-  "gitHooks": {
-    "pre-commit": "lint-staged",
-    "commit-msg": "node scripts/verifyCommit.js"
-  },
-  "lint-staged": {
-    "*.js": [
-      "prettier --write"
-    ],
-    "*.ts?(x)": [
-      "prettier --parser=typescript --write"
-    ]
-  },
   "repository": {
     "type": "git",
     "url": "git+https://github.com/posva/pinia.git"
index d23d720c6868713c8aa96e4c823bf83cab20b984..dcf0002ee9661ea9dfd15fd510d1942c98f3d09f 100644 (file)
@@ -1,4 +1,4 @@
-import { defineStore, expectType } from '.'
+import { defineStore, expectType } from './'
 
 const useStore = defineStore({
   id: 'name',
index 483f9ffac5a5b38bd66b8966d1209b85734ba9d4..c7d7543f6b32c1031d482f2203461453c2c6e377 100644 (file)
@@ -1,4 +1,4 @@
-import { defineStore, expectType } from '.'
+import { defineStore, expectType } from './'
 
 const useStore = defineStore({
   id: 'main',
index 937f56697b104f7a8e3a984a9457434cf9d126f0..ed2449ef074c238f3c2cd81309ebcb786ffd3645 100644 (file)
@@ -1,5 +1,5 @@
 {
-  "extends": "../tsconfig.json",
+  "extends": "../../../tsconfig.json",
   "compilerOptions": {
     "noEmit": true,
     "declaration": true,
index 383c5c41fb431ca6d62f26632f8f35544524e441..2bd7c9eb3788422e7def58514397a5a669f2509f 100644 (file)
@@ -1,4 +1,4 @@
-import { StoreDefinition } from 'dist/pinia'
+import { StoreDefinition } from './'
 import { computed, ref } from 'vue'
 import {
   StoreState,