build: strict mode, use esm, and target es2020 (#52)
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "https://github.com/Nutlope/aicommits",
|
"repository": "https://github.com/Nutlope/aicommits",
|
||||||
"author": "Hassan El Mghari (@nutlope)",
|
"author": "Hassan El Mghari (@nutlope)",
|
||||||
|
"type": "module",
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
@@ -27,6 +28,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@pvtnbr/eslint-config": "^0.33.0",
|
"@pvtnbr/eslint-config": "^0.33.0",
|
||||||
"@types/ini": "^1.3.31",
|
"@types/ini": "^1.3.31",
|
||||||
|
"@types/inquirer": "^9.0.3",
|
||||||
"@types/node": "^18.13.0",
|
"@types/node": "^18.13.0",
|
||||||
"eslint": "^8.34.0",
|
"eslint": "^8.34.0",
|
||||||
"typescript": "^4.9.5"
|
"typescript": "^4.9.5"
|
||||||
|
|||||||
16
pnpm-lock.yaml
generated
16
pnpm-lock.yaml
generated
@@ -3,6 +3,7 @@ lockfileVersion: 5.4
|
|||||||
specifiers:
|
specifiers:
|
||||||
'@pvtnbr/eslint-config': ^0.33.0
|
'@pvtnbr/eslint-config': ^0.33.0
|
||||||
'@types/ini': ^1.3.31
|
'@types/ini': ^1.3.31
|
||||||
|
'@types/inquirer': ^9.0.3
|
||||||
'@types/node': ^18.13.0
|
'@types/node': ^18.13.0
|
||||||
chalk: ^4.1.2
|
chalk: ^4.1.2
|
||||||
eslint: ^8.34.0
|
eslint: ^8.34.0
|
||||||
@@ -20,6 +21,7 @@ dependencies:
|
|||||||
devDependencies:
|
devDependencies:
|
||||||
'@pvtnbr/eslint-config': 0.33.0_7kw3g6rralp5ps6mg3uyzz6azm
|
'@pvtnbr/eslint-config': 0.33.0_7kw3g6rralp5ps6mg3uyzz6azm
|
||||||
'@types/ini': 1.3.31
|
'@types/ini': 1.3.31
|
||||||
|
'@types/inquirer': 9.0.3
|
||||||
'@types/node': 18.13.0
|
'@types/node': 18.13.0
|
||||||
eslint: 8.34.0
|
eslint: 8.34.0
|
||||||
typescript: 4.9.5
|
typescript: 4.9.5
|
||||||
@@ -149,6 +151,13 @@ packages:
|
|||||||
resolution: {integrity: sha512-8ecxxaG4AlVEM1k9+BsziMw8UsX0qy3jYI1ad/71RrDZ+rdL6aZB0wLfAuflQiDhkD5o4yJ0uPK3OSUic3fG0w==}
|
resolution: {integrity: sha512-8ecxxaG4AlVEM1k9+BsziMw8UsX0qy3jYI1ad/71RrDZ+rdL6aZB0wLfAuflQiDhkD5o4yJ0uPK3OSUic3fG0w==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/@types/inquirer/9.0.3:
|
||||||
|
resolution: {integrity: sha512-CzNkWqQftcmk2jaCWdBTf9Sm7xSw4rkI1zpU/Udw3HX5//adEZUIm9STtoRP1qgWj0CWQtJ9UTvqmO2NNjhMJw==}
|
||||||
|
dependencies:
|
||||||
|
'@types/through': 0.0.30
|
||||||
|
rxjs: 7.8.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
/@types/json-schema/7.0.11:
|
/@types/json-schema/7.0.11:
|
||||||
resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==}
|
resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==}
|
||||||
dev: true
|
dev: true
|
||||||
@@ -175,6 +184,12 @@ packages:
|
|||||||
resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==}
|
resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/@types/through/0.0.30:
|
||||||
|
resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==}
|
||||||
|
dependencies:
|
||||||
|
'@types/node': 18.13.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
/@types/unist/2.0.6:
|
/@types/unist/2.0.6:
|
||||||
resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==}
|
resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==}
|
||||||
dev: true
|
dev: true
|
||||||
@@ -2355,7 +2370,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==}
|
resolution: {integrity: sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
tslib: 2.5.0
|
tslib: 2.5.0
|
||||||
dev: false
|
|
||||||
|
|
||||||
/safe-buffer/5.2.1:
|
/safe-buffer/5.2.1:
|
||||||
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
|
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import inquirer from 'inquirer';
|
|||||||
import {
|
import {
|
||||||
getConfig,
|
getConfig,
|
||||||
generateCommitMessage,
|
generateCommitMessage,
|
||||||
} from './utils';
|
} from './utils.js';
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
const config = await getConfig();
|
const config = await getConfig();
|
||||||
@@ -86,7 +86,7 @@ import {
|
|||||||
encoding: 'utf8',
|
encoding: 'utf8',
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(chalk.white('▲ ') + chalk.red(error.message));
|
console.error(chalk.white('▲ ') + chalk.red((error as any).message));
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es2016",
|
|
||||||
"module": "commonjs",
|
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
|
"target": "ES2020",
|
||||||
|
"module": "Node16",
|
||||||
|
"strict": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"skipLibCheck": true
|
||||||
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
||||||
},
|
},
|
||||||
"include": ["src"]
|
"include": ["src"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user