diff --git a/config/tsconfig.cjs.json b/config/tsconfig.cjs.json index 6541c5f..6c52e12 100644 --- a/config/tsconfig.cjs.json +++ b/config/tsconfig.cjs.json @@ -1,5 +1,5 @@ { - "extends": "./tsconfig.base", + "extends": "../tsconfig", "compilerOptions": { "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, "outDir": "../dist/cjs" /* Redirect output structure to the directory. */ diff --git a/config/tsconfig.esm.json b/config/tsconfig.esm.json index 1131d8e..b3a1971 100644 --- a/config/tsconfig.esm.json +++ b/config/tsconfig.esm.json @@ -1,5 +1,5 @@ { - "extends": "./tsconfig.base", + "extends": "../tsconfig", "compilerOptions": { "module": "ESNext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, "outDir": "../dist/esm" /* Redirect output structure to the directory. */ diff --git a/config/tsconfig.types.json b/config/tsconfig.types.json index b0d0fa3..8de87ee 100644 --- a/config/tsconfig.types.json +++ b/config/tsconfig.types.json @@ -1,5 +1,5 @@ { - "extends": "./tsconfig.base", + "extends": "../tsconfig", "compilerOptions": { "declaration": true /* Generates corresponding '.d.ts' file. */, "emitDeclarationOnly": true, diff --git a/config/tsconfig.umd.json b/config/tsconfig.umd.json index 903e5cd..5559c66 100644 --- a/config/tsconfig.umd.json +++ b/config/tsconfig.umd.json @@ -1,5 +1,5 @@ { - "extends": "./tsconfig.base", + "extends": "../tsconfig", "compilerOptions": { "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, "declaration": false /* Generates corresponding '.d.ts' file. */ diff --git a/jest.config.js b/jest.config.js index 068edca..a179e4d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -7,4 +7,9 @@ module.exports = { transform: { '^.+\\.(ts|tsx)$': 'ts-jest', }, + globals: { + 'ts-jest': { + tsconfig: 'tsconfig.json' + } + } } diff --git a/package-lock.json b/package-lock.json index 244d834..94babd3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "example-typescript-package", - "version": "0.0.3", + "version": "0.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -877,13 +877,13 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.11.0.tgz", - "integrity": "sha512-x4arJMXBxyD6aBXLm3W7mSDZRiABzy+2PCLJbL7OPqlp53VXhaA1HKK7R2rTee5OlRhnUgnp8lZyVIqjnyPT6g==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.11.1.tgz", + "integrity": "sha512-fABclAX2QIEDmTMk6Yd7Muv1CzFLwWM4505nETzRHpP3br6jfahD9UUJkhnJ/g2m7lwfz8IlswcwGGPGiq9exw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.11.0", - "@typescript-eslint/scope-manager": "4.11.0", + "@typescript-eslint/experimental-utils": "4.11.1", + "@typescript-eslint/scope-manager": "4.11.1", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -892,55 +892,55 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.11.0.tgz", - "integrity": "sha512-1VC6mSbYwl1FguKt8OgPs8xxaJgtqFpjY/UzUYDBKq4pfQ5lBvN2WVeqYkzf7evW42axUHYl2jm9tNyFsb8oLg==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.11.1.tgz", + "integrity": "sha512-mAlWowT4A6h0TC9F+J5pdbEhjNiEMO+kqPKQ4sc3fVieKL71dEqfkKgtcFVSX3cjSBwYwhImaQ/mXQF0oaI38g==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.11.0", - "@typescript-eslint/types": "4.11.0", - "@typescript-eslint/typescript-estree": "4.11.0", + "@typescript-eslint/scope-manager": "4.11.1", + "@typescript-eslint/types": "4.11.1", + "@typescript-eslint/typescript-estree": "4.11.1", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.11.0.tgz", - "integrity": "sha512-NBTtKCC7ZtuxEV5CrHUO4Pg2s784pvavc3cnz6V+oJvVbK4tH9135f/RBP6eUA2KHiFKAollSrgSctQGmHbqJQ==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.11.1.tgz", + "integrity": "sha512-BJ3jwPQu1jeynJ5BrjLuGfK/UJu6uwHxJ/di7sanqmUmxzmyIcd3vz58PMR7wpi8k3iWq2Q11KMYgZbUpRoIPw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.11.0", - "@typescript-eslint/types": "4.11.0", - "@typescript-eslint/typescript-estree": "4.11.0", + "@typescript-eslint/scope-manager": "4.11.1", + "@typescript-eslint/types": "4.11.1", + "@typescript-eslint/typescript-estree": "4.11.1", "debug": "^4.1.1" } }, "@typescript-eslint/scope-manager": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.11.0.tgz", - "integrity": "sha512-6VSTm/4vC2dHM3ySDW9Kl48en+yLNfVV6LECU8jodBHQOhO8adAVizaZ1fV0QGZnLQjQ/y0aBj5/KXPp2hBTjA==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.11.1.tgz", + "integrity": "sha512-Al2P394dx+kXCl61fhrrZ1FTI7qsRDIUiVSuN6rTwss6lUn8uVO2+nnF4AvO0ug8vMsy3ShkbxLu/uWZdTtJMQ==", "dev": true, "requires": { - "@typescript-eslint/types": "4.11.0", - "@typescript-eslint/visitor-keys": "4.11.0" + "@typescript-eslint/types": "4.11.1", + "@typescript-eslint/visitor-keys": "4.11.1" } }, "@typescript-eslint/types": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.11.0.tgz", - "integrity": "sha512-XXOdt/NPX++txOQHM1kUMgJUS43KSlXGdR/aDyEwuAEETwuPt02Nc7v+s57PzuSqMbNLclblQdv3YcWOdXhQ7g==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.11.1.tgz", + "integrity": "sha512-5kvd38wZpqGY4yP/6W3qhYX6Hz0NwUbijVsX2rxczpY6OXaMxh0+5E5uLJKVFwaBM7PJe1wnMym85NfKYIh6CA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.11.0.tgz", - "integrity": "sha512-eA6sT5dE5RHAFhtcC+b5WDlUIGwnO9b0yrfGa1mIOIAjqwSQCpXbLiFmKTdRbQN/xH2EZkGqqLDrKUuYOZ0+Hg==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.11.1.tgz", + "integrity": "sha512-tC7MKZIMRTYxQhrVAFoJq/DlRwv1bnqA4/S2r3+HuHibqvbrPcyf858lNzU7bFmy4mLeIHFYr34ar/1KumwyRw==", "dev": true, "requires": { - "@typescript-eslint/types": "4.11.0", - "@typescript-eslint/visitor-keys": "4.11.0", + "@typescript-eslint/types": "4.11.1", + "@typescript-eslint/visitor-keys": "4.11.1", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -950,12 +950,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.11.0.tgz", - "integrity": "sha512-tRYKyY0i7cMk6v4UIOCjl1LhuepC/pc6adQqJk4Is3YcC6k46HvsV9Wl7vQoLbm9qADgeujiT7KdLrylvFIQ+A==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.11.1.tgz", + "integrity": "sha512-IrlBhD9bm4bdYcS8xpWarazkKXlE7iYb1HzRuyBP114mIaj5DJPo11Us1HgH60dTt41TCZXMaTCAW+OILIYPOg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.11.0", + "@typescript-eslint/types": "4.11.1", "eslint-visitor-keys": "^2.0.0" } }, @@ -1135,18 +1135,18 @@ } }, "@webpack-cli/info": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.2.0.tgz", - "integrity": "sha512-+wA8lBKopgKmN76BSGJVJby5ZXDlsrO6p/nm7fUBsHznRNWB/ozotJP7Yfcz8JPfqeG2LxwYlTH2u6D9a/0XAw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.2.1.tgz", + "integrity": "sha512-fLnDML5HZ5AEKzHul8xLAksoKN2cibu6MgonkUj8R9V7bbeVRkd1XbGEGWrAUNYHbX1jcqCsDEpBviE5StPMzQ==", "dev": true, "requires": { "envinfo": "^7.7.3" } }, "@webpack-cli/serve": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.2.0.tgz", - "integrity": "sha512-jI3P7jMp/AXDSPkM+ClwRcJZbxnlvNC8bVZBmyRr4scMMZ4p5WQcXkw3Q+Hc7RQekomJlBMN+UQGliT4hhG8Vw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.2.1.tgz", + "integrity": "sha512-Zj1z6AyS+vqV6Hfi7ngCjFGdHV5EwZNIHo6QfFTNe9PyW+zBU1zJ9BiOW1pmUEq950RC4+Dym6flyA/61/vhyw==", "dev": true }, "@xtuc/ieee754": { @@ -1590,9 +1590,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001170", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001170.tgz", - "integrity": "sha512-Dd4d/+0tsK0UNLrZs3CvNukqalnVTRrxb5mcQm8rHL49t7V5ZaTygwXkrq+FB+dVDf++4ri8eJnFEJAB8332PA==", + "version": "1.0.30001171", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001171.tgz", + "integrity": "sha512-5Alrh8TTYPG9IH4UkRqEBZoEToWRLvPbSQokvzSz0lii8/FOWKG4keO1HoYfPWs8IF/NH/dyNPg1cmJGvV3Zlg==", "dev": true }, "capture-exit": { @@ -5630,9 +5630,9 @@ } }, "ts-loader": { - "version": "8.0.12", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-8.0.12.tgz", - "integrity": "sha512-UIivVfGVJDdwwjgSrbtcL9Nf10c1BWnL1mxAQUVcnhNIn/P9W3nP5v60Z0aBMtc7ZrE11lMmU6+5jSgAXmGaYw==", + "version": "8.0.13", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-8.0.13.tgz", + "integrity": "sha512-1o1nO6aqouA23d2nlcMSEyPMAWRhnYUU0EQUJSc60E0TUyBNX792RHFYUN1ZM29vhMUNayrsbj2UVdZwKhXCDA==", "dev": true, "requires": { "chalk": "^2.3.0", @@ -5942,9 +5942,9 @@ "dev": true }, "webpack": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.11.0.tgz", - "integrity": "sha512-ubWv7iP54RqAC/VjixgpnLLogCFbAfSOREcSWnnOlZEU8GICC5eKmJSu6YEnph2N2amKqY9rvxSwgyHxVqpaRw==", + "version": "5.11.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.11.1.tgz", + "integrity": "sha512-tNUIdAmYJv+nupRs/U/gqmADm6fgrf5xE+rSlSsf2PgsGO7j2WG7ccU6AWNlOJlHFl+HnmXlBmHIkiLf+XA9mQ==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.0", @@ -6044,18 +6044,18 @@ } }, "webpack-cli": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.3.0.tgz", - "integrity": "sha512-gve+BBKrzMPTOYDjupzV8JchUznhVWMKtWM1hFIQWi6XoeLvGNoQwkrtMWVb+aJ437GgCKdta7sIn10v621pKA==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.3.1.tgz", + "integrity": "sha512-/F4+9QNZM/qKzzL9/06Am8NXIkGV+/NqQ62Dx7DSqudxxpAgBqYn6V7+zp+0Y7JuWksKUbczRY3wMTd+7Uj6OA==", "dev": true, "requires": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/info": "^1.2.0", - "@webpack-cli/serve": "^1.2.0", + "@webpack-cli/info": "^1.2.1", + "@webpack-cli/serve": "^1.2.1", "colorette": "^1.2.1", "commander": "^6.2.0", "enquirer": "^2.3.6", - "execa": "^4.1.0", + "execa": "^5.0.0", "fastest-levenshtein": "^1.0.12", "import-local": "^3.0.2", "interpret": "^2.2.0", @@ -6071,30 +6071,33 @@ "dev": true }, "execa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", - "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz", + "integrity": "sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==", "dev": true, "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "signal-exit": "^3.0.2", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" } }, "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz", + "integrity": "sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg==", + "dev": true + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true }, "is-stream": { "version": "2.0.0", diff --git a/package.json b/package.json index a76c850..20adc49 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "example-typescript-package", - "version": "0.1.0", + "version": "0.1.1", "description": "", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", @@ -50,17 +50,17 @@ "dependencies": {}, "devDependencies": { "@types/jest": "^26.0.19", - "@typescript-eslint/eslint-plugin": "^4.11.0", - "@typescript-eslint/parser": "^4.11.0", + "@typescript-eslint/eslint-plugin": "^4.11.1", + "@typescript-eslint/parser": "^4.11.1", "eslint": "^7.16.0", "eslint-config-prettier": "^7.1.0", "eslint-plugin-prettier": "^3.3.0", "jest": "^26.6.3", "prettier": "^2.2.1", "ts-jest": "^26.4.4", - "ts-loader": "^8.0.12", + "ts-loader": "^8.0.13", "typescript": "^4.1.3", - "webpack": "^5.11.0", - "webpack-cli": "^4.3.0" + "webpack": "^5.11.1", + "webpack-cli": "^4.3.1" } } diff --git a/config/tsconfig.base.json b/tsconfig.json similarity index 99% rename from config/tsconfig.base.json rename to tsconfig.json index 029a549..a97c431 100644 --- a/config/tsconfig.base.json +++ b/tsconfig.json @@ -66,5 +66,5 @@ // "skipLibCheck": true, /* Skip type checking of declaration files. */ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ }, - "include": ["../src/**/*"] + "include": ["src/**/*"] }