Skip to content

Commit

Permalink
Merge pull request #354 from Fdawgs/chore/any-other-name
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Jan 24, 2024
2 parents e8cb533 + ba2420d commit e2849ad
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cd.yml
Expand Up @@ -58,7 +58,7 @@ jobs:
npm i --ignore-scripts
npm run build
npm pkg delete commitlint devDependencies jest scripts
npm publish --ignore-scripts --provenance
npm publish --access public --ignore-scripts --provenance
publish-ghp:
name: Publish to GitHub Packages
Expand Down Expand Up @@ -96,4 +96,4 @@ jobs:
npm i --ignore-scripts
npm run build
npm pkg delete commitlint devDependencies jest scripts
npm publish --ignore-scripts --provenance --access public
npm publish --access public --ignore-scripts --provenance
1 change: 1 addition & 0 deletions .vscode/settings.json
Expand Up @@ -8,5 +8,6 @@
},
"javascript.updateImportsOnFileMove.enabled": "always",
"npm.packageManager": "npm",
"prettier.prettierPath": "./node_modules/prettier",
"redhat.telemetry.enabled": false
}
10 changes: 5 additions & 5 deletions package.json
Expand Up @@ -74,25 +74,25 @@
"testTimeout": 10000
},
"devDependencies": {
"@commitlint/cli": "^18.4.4",
"@commitlint/config-conventional": "^18.4.4",
"@commitlint/cli": "^18.5.0",
"@commitlint/config-conventional": "^18.5.0",
"@eslint-community/eslint-plugin-eslint-comments": "^4.1.0",
"@types/jest": "^29.5.11",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.6.1",
"eslint-plugin-jest": "^27.6.3",
"eslint-plugin-jsdoc": "^48.0.2",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-regexp": "^2.1.2",
"eslint-plugin-regexp": "^2.2.0",
"eslint-plugin-security": "^2.1.0",
"husky": "^8.0.3",
"is-html": "^2.0.0",
"jest": "^29.7.0",
"jsdoc-to-markdown": "^8.0.0",
"license-checker": "^25.0.1",
"prettier": "^3.1.1",
"prettier": "^3.2.4",
"spdx-copyleft": "^1.0.0",
"typescript": "^5.3.3"
},
Expand Down
18 changes: 14 additions & 4 deletions scripts/license-checker.js
Expand Up @@ -57,10 +57,20 @@ async function checkLicenses() {
start: joinSafe(__dirname, ".."),
});

const copyLeftLicensesList = Object.keys(licenses).filter((license) =>
// @ts-ignore: includes() returns false if undefined is passed
copyLeftLicenses.includes(licenses[license].licenses)
);
const copyLeftLicensesList = Object.keys(licenses).filter((license) => {
let lic = licenses[license].licenses;

if (!lic) {
console.error(
`No license found for ${license}. Please check the package.json file.`
);
process.exit(1);
}

lic = Array.isArray(lic) ? lic : [lic];

return lic.some((l) => copyLeftLicenses.includes(l));
});

if (copyLeftLicensesList.length > 0) {
console.error(
Expand Down
5 changes: 2 additions & 3 deletions tsconfig.json
Expand Up @@ -4,12 +4,11 @@
"checkJs": true,
"declaration": true,
"emitDeclarationOnly": true,
"lib": ["ES2022"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "types",
"resolveJsonModule": true,
"target": "ES2022"
"target": "ES2022",
},
"include": ["src/index.js"]
"include": ["src/index.js"],
}

0 comments on commit e2849ad

Please sign in to comment.