⬆️ (lite-note) migrate to pnpm and upgrade every outdated libs

This commit is contained in:
Julien Calixte
2023-07-01 22:39:04 +02:00
parent 54e9694fc6
commit e0618e0df6
15 changed files with 10369 additions and 12431 deletions

View File

@@ -1 +1 @@
14.18.2
16.13.2

View File

@@ -1,6 +1,6 @@
[build]
publish = "dist"
command = "yarn build --modern"
command = "pnpm build --modern"
[[redirects]]
from = "/*"

View File

@@ -5,7 +5,7 @@
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit",
"test": "vitest",
"lint": "vue-cli-service lint",
"pwa:asset": "npx vue-pwa-asset-generator -a public/img/logo.png --no-manifest"
},
@@ -22,7 +22,7 @@
"markdown-it-checkbox": "^1.1.0",
"markdown-it-footnote": "^3.0.3",
"markdown-it-svg-code-copy": "^1.0.0",
"nanoid": "^3.1.30",
"nanoid": "^4.0.2",
"notyf": "^3.10.0",
"pinia": "^2.0.6",
"pouchdb-adapter-indexeddb": "^7.2.2",
@@ -36,20 +36,20 @@
"vuex": "^4.0.0-rc.1"
},
"devDependencies": {
"@types/jest": "^27.0.3",
"@babel/core": "^7.0.0",
"@types/markdown-it": "^12.2.3",
"@types/node": "^20.3.3",
"@types/pouchdb-browser": "^6.1.3",
"@types/sanitize-html": "^2.6.0",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0",
"@vue/cli-plugin-babel": "~4.5.15",
"@vue/cli-plugin-eslint": "~4.5.15",
"@vue/cli-plugin-pwa": "~4.5.15",
"@vue/cli-plugin-router": "~4.5.15",
"@vue/cli-plugin-typescript": "~4.5.15",
"@vue/cli-plugin-unit-jest": "~4.5.15",
"@vue/cli-plugin-vuex": "~4.5.15",
"@vue/cli-service": "~4.5.15",
"@vue/cli-plugin-babel": "~5.0.8",
"@vue/cli-plugin-eslint": "~5.0.8",
"@vue/cli-plugin-pwa": "~5.0.8",
"@vue/cli-plugin-router": "~5.0.8",
"@vue/cli-plugin-typescript": "~5.0.8",
"@vue/cli-plugin-vuex": "~5.0.8",
"@vue/cli-service": "~5.0.8",
"@vue/compiler-sfc": "^3.2.24",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/eslint-config-typescript": "^9.1.0",
@@ -59,10 +59,11 @@
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-prettier-vue": "^3.1.0",
"eslint-plugin-vue": "^8.2.0",
"node-sass": "^4.14.1",
"node-sass": "^9.0.0",
"prettier": "^2.5.1",
"sass-loader": "^10.1.1",
"sass-loader": "^13.3.2",
"typescript": "~4.5.3",
"vue-jest": "^5.0.0-0"
"vitest": "^0.32.2",
"webpack": "^5.0.0"
}
}
}

10325
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -99,7 +99,15 @@ class Data {
keys: keys.map((key) => this.generateId(prefix, key))
})
return response.rows.map((row) => row.doc).filter((doc) => !!doc) as T[]
return response.rows
.map((row) => {
if ('error' in row) {
return null
}
return row.doc
})
.filter((doc) => !!doc) as T[]
}
const response = await this.locale.allDocs({

View File

@@ -1,4 +1,4 @@
import { ref } from '@vue/reactivity'
import { ref } from 'vue'
import { useRouter } from 'vue-router'
export const useForm = () => {

View File

@@ -1,7 +1,7 @@
import { noteEventBus } from '@/bus/noteEventBus'
import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
import { isExternalLink } from '@/utils/link'
import { onUnmounted } from '@vue/runtime-core'
import { onUnmounted } from 'vue'
export const useLinks = (className: string, sha?: string) => {
const store = useUserRepoStore()

View File

@@ -1,4 +1,4 @@
import { computed, onMounted, onUnmounted, watch } from '@vue/runtime-core'
import { computed, onMounted, onUnmounted, watch } from 'vue'
import { NOTE_WIDTH } from '@/constants/note-width'
import { noteEventBus } from '@/bus/noteEventBus'

View File

@@ -1,4 +1,4 @@
import { computed, onMounted, ref } from '@vue/runtime-core'
import { computed, onMounted, ref } from 'vue'
import { NOTE_WIDTH } from '@/constants/note-width'
import { useOverlay } from '@/hooks/useOverlay.hook'

View File

@@ -1,7 +1,7 @@
import { NOTE_WIDTH } from '@/constants/note-width'
import { useOverlay } from '@/hooks/useOverlay.hook'
import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
import { readonly, ref } from '@vue/reactivity'
import { readonly, ref } from 'vue'
import { useWindowSize } from '@vueuse/core'
import { nextTick } from 'vue'

View File

@@ -2,7 +2,7 @@ import { DataType } from '@/data/DataType.enum'
import { Model } from '@/data/models/Model'
import { Backlink } from '@/modules/note/models/Backlink'
export interface BacklinkNote extends Model<DataType.Backlink> {
export interface BacklinkNote extends Model<DataType.BacklinkNote> {
sha: string
links: Backlink[]
}

View File

@@ -1,4 +1,5 @@
import { resolvePath } from '@/modules/repo/services/resolvePath'
import { describe, expect, it } from 'vitest'
describe('resolve path service', () => {
it('set the absolute path if path to resolve is empty', () => {

View File

@@ -12,7 +12,7 @@
"sourceMap": true,
"baseUrl": ".",
"resolveJsonModule": true,
"types": ["webpack-env", "jest"],
"types": ["node"],
"paths": {
"@/*": ["src/*"]
},

9
vitest.config.ts Normal file
View File

@@ -0,0 +1,9 @@
import path from 'path'
export default {
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
}
}

12406
yarn.lock

File diff suppressed because it is too large Load Diff