2
0
mirror of https://github.com/tenrok/maska.git synced 2026-05-15 11:59:38 +03:00

chore: update dependencies and package.json for v3

This commit is contained in:
Alexander Shabunevich
2024-04-14 12:34:24 +03:00
parent bdcdecc301
commit 6f4836345c
5 changed files with 53 additions and 48 deletions
+24 -24
View File
@@ -1,7 +1,7 @@
{
"name": "maska",
"version": "2.1.11",
"description": "Simple zero-dependency input mask for Vue 2/3 or Vanilla JS",
"version": "3.0.0",
"description": "Simple zero-dependency input mask for Vue or Vanilla JS",
"keywords": [
"mask",
"inputmask",
@@ -18,20 +18,19 @@
"files": [
"dist"
],
"types": "./dist/types/index.d.ts",
"main": "./dist/maska.umd.js",
"main": "./dist/maska.umd.cjs",
"module": "./dist/maska.js",
"types": "./dist/maska.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"types": "./dist/maska.d.ts",
"import": "./dist/maska.js",
"require": "./dist/maska.umd.js"
"require": "./dist/maska.umd.cjs"
}
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build:watch": "vite build --watch",
"build": "vue-tsc && vite build",
"build:demo": "vite build --config vite.config.demo.ts",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
@@ -40,21 +39,22 @@
"version": "npm run build && npm test"
},
"devDependencies": {
"@testing-library/dom": "^9.2.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/user-event": "^14.4.3",
"@types/node": "^18.6.4",
"@vitejs/plugin-vue": "^4.2.1",
"@vitest/coverage-c8": "^0.30.1",
"@vue/test-utils": "^2.2.1",
"happy-dom": "^14.6.2",
"ts-standard": "^12.0.0",
"typescript": "^4.6.4",
"vite": "^4.3.3",
"vite-plugin-banner": "^0.7.0",
"vite-plugin-dts": "^2.3.0",
"vitest": "^0.30.1",
"vue": "^3.2.41",
"vue-live": "^2.1.0"
"@testing-library/dom": "^10.0.0",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/user-event": "^14.5.2",
"@types/node": "^20.12.7",
"@vitejs/plugin-vue": "^5.0.4",
"@vitest/coverage-v8": "^1.5.0",
"@vue/test-utils": "^2.4.5",
"happy-dom": "^14.7.1",
"ts-standard": "^12.0.2",
"typescript": "^5.4.5",
"vite": "^5.2.8",
"vite-plugin-banner": "^0.7.1",
"vite-plugin-dts": "^3.8.2",
"vitest": "^1.5.0",
"vue": "^3.2.45",
"vue-live": "^2.5.4",
"vue-tsc": "^2.0.13"
}
}
+1 -5
View File
@@ -1,5 +1 @@
import matchers from '@testing-library/jest-dom/matchers'
import { expect } from 'vitest'
// src: https://markus.oberlehner.net/blog/using-testing-library-jest-dom-with-vitest/
expect.extend(matchers)
import '@testing-library/jest-dom/vitest'
+13 -12
View File
@@ -1,18 +1,19 @@
{
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"module": "ESNext",
"moduleResolution": "node",
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"skipLibCheck": true,
"strict": true,
"target": "ESNext",
"useDefineForClassFields": true,
"module": "ESNext",
"moduleResolution": "Node",
"strict": true,
"jsx": "preserve",
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
"lib": ["ESNext", "DOM"],
"skipLibCheck": true,
"noEmit": true,
"types": ["vite/client"]
},
"include": ["src"]
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "demo/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }]
}
+10
View File
@@ -0,0 +1,10 @@
{
"compilerOptions": {
"composite": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}
+5 -7
View File
@@ -1,26 +1,24 @@
import { resolve } from 'path'
import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
import banner from 'vite-plugin-banner'
import dts from 'vite-plugin-dts'
import pkg from './package.json'
// https://vitejs.dev/config/
export default defineConfig({
build: {
lib: {
entry: resolve(__dirname, 'src/index.ts'),
name: 'Maska',
fileName: (format) =>
format !== 'es' ? `${pkg.name}.${format}.js` : `${pkg.name}.js`
fileName: 'maska'
}
},
plugins: [
vue(),
dts({
outputDir: 'dist/types',
exclude: 'src/demo'
}),
dts({ rollupTypes: true }),
banner(
`/*! ${pkg.name} v${pkg.version} | (c) ${pkg.author} | Released under the ${pkg.license} license */`
)
@@ -29,7 +27,7 @@ export default defineConfig({
setupFiles: 'test/setup.ts',
environment: 'happy-dom',
coverage: {
provider: 'c8',
provider: 'v8',
reporter: ['text', 'json-summary']
}
}