@linagora/linid-im-front-corelib 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/tsconfig.json CHANGED
@@ -1,30 +1,14 @@
1
1
  {
2
- "compilerOptions": {
3
- "target": "ESNext",
4
- "module": "ESNext",
5
- "moduleResolution": "bundler",
6
- "lib": [
7
- "ESNext",
8
- "DOM"
9
- ],
10
- "allowJs": true,
11
- "esModuleInterop": true,
12
- "strict": true,
13
- "skipLibCheck": true,
14
- "forceConsistentCasingInFileNames": true,
15
- "resolveJsonModule": true,
16
- "types": [
17
- "node",
18
- "vite/client",
19
- "vue"
20
- ],
21
- "declaration": true,
22
- "declarationDir": "dist/types",
23
- "outDir": "dist"
24
- },
25
- "include": [
26
- "src/**/*.ts",
27
- "src/**/*.vue",
28
- "vite.config.ts"
2
+ "files": [],
3
+ "references": [
4
+ {
5
+ "path": "./tsconfig.node.json"
6
+ },
7
+ {
8
+ "path": "./tsconfig.lib.json"
9
+ },
10
+ {
11
+ "path": "./tsconfig.spec.json"
12
+ }
29
13
  ]
30
14
  }
@@ -0,0 +1,20 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "target": "ESNext",
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "lib": ["ESNext", "DOM"],
8
+ "esModuleInterop": true,
9
+ "strict": true,
10
+ "skipLibCheck": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "resolveJsonModule": true,
13
+ "types": ["node", "vite/client", "vue"],
14
+ "declaration": true,
15
+ "declarationDir": "dist/types",
16
+ "outDir": "dist"
17
+ },
18
+ "include": ["src"],
19
+ "exclude": ["vite.config.ts", "tests", "vitest.config.ts"]
20
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "module": "nodenext",
5
+ "strict": true,
6
+ "types": ["node"]
7
+ },
8
+ "include": ["vite.config.ts", "vitest.config.ts"]
9
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "baseUrl": ".",
5
+ "outDir": "./out-tsc/vitest",
6
+ "allowJs": true,
7
+ "module": "esnext",
8
+ "moduleResolution": "bundler"
9
+ },
10
+ "include": ["tests", "src"],
11
+ "references": [
12
+ {
13
+ "path": "./tsconfig.lib.json"
14
+ }
15
+ ]
16
+ }
package/vite.config.ts CHANGED
@@ -1,22 +1,17 @@
1
- /// <reference types="node" />
2
- import {defineConfig} from "vite";
3
- import vue from "@vitejs/plugin-vue";
4
- import path from "path";
5
- import fs from "fs";
6
- import {fileURLToPath} from "url";
7
-
8
- const __filename = fileURLToPath(import.meta.url);
9
- const __dirname = path.dirname(__filename);
1
+ import vue from '@vitejs/plugin-vue';
2
+ import fs from 'fs';
3
+ import path from 'path';
4
+ import { defineConfig } from 'vite';
10
5
 
11
6
  export default defineConfig({
12
7
  plugins: [
13
8
  vue(),
14
9
 
15
10
  {
16
- name: "copy-package-json",
11
+ name: 'copy-package-json',
17
12
  closeBundle() {
18
- const src = path.resolve(__dirname, "package.json");
19
- const dest = path.resolve(__dirname, "dist", "package.json");
13
+ const src = path.resolve(__dirname, 'package.json');
14
+ const dest = path.resolve(__dirname, 'dist', 'package.json');
20
15
  if (fs.existsSync(src)) {
21
16
  fs.copyFileSync(src, dest);
22
17
  }
@@ -26,15 +21,15 @@ export default defineConfig({
26
21
 
27
22
  build: {
28
23
  lib: {
29
- entry: path.resolve(__dirname, "src/index.ts"),
30
- name: "CoreLib",
24
+ entry: path.resolve(__dirname, 'src/index.ts'),
25
+ name: 'CoreLib',
31
26
  fileName: (format) => `core-lib.${format}.js`,
32
27
  },
33
28
  rollupOptions: {
34
- external: ["vue"],
29
+ external: ['vue'],
35
30
  output: {
36
31
  globals: {
37
- vue: "Vue",
32
+ vue: 'Vue',
38
33
  },
39
34
  },
40
35
  },
@@ -0,0 +1,19 @@
1
+ import vue from '@vitejs/plugin-vue';
2
+ import tsconfigPaths from 'vite-tsconfig-paths';
3
+ import { defineConfig } from 'vitest/config';
4
+
5
+ export default defineConfig({
6
+ test: {
7
+ environment: 'happy-dom',
8
+ globals: true,
9
+ include: ['tests/unit/**/*.{test,spec}.js'],
10
+ coverage: {
11
+ provider: 'v8',
12
+ reporter: ['text', 'html', 'lcov'],
13
+ reportsDirectory: './coverage',
14
+ include: ['src/**/*.{ts,js,vue}'],
15
+ exclude: ['**/tests/**', 'src/types/**', 'src/index.ts'],
16
+ },
17
+ },
18
+ plugins: [vue(), tsconfigPaths()],
19
+ });
@@ -1,2 +0,0 @@
1
- declare const _default: import("vite").UserConfig;
2
- export default _default;