Skip to content

Commit

Permalink
upgrade tldjs -> tldts
Browse files Browse the repository at this point in the history
  • Loading branch information
korn101 committed Jan 12, 2024
1 parent 5714453 commit 943c1df
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 28 deletions.
47 changes: 23 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"url-validation": "node workflow_scripts/url-validation.js",
"json-duplicates": "node workflow_scripts/no-duplicates.js",
"static-bl-fail": "echo \"Error: Blacklists directory is automatically managed by internal systems and CANNOT be altered in a pull request. Please contact PhishFort team.\" && exit 1"

},
"repository": {
"type": "git",
Expand All @@ -22,6 +21,6 @@
"homepage": "https://github.com/phishfort/phishfort-lists#readme",
"dependencies": {
"glob": "^8.0.3",
"tldjs": "^2.3.1"
"tldts": "^6.1.2"
}
}
4 changes: 2 additions & 2 deletions workflow_scripts/url-validation.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const fs = require("fs");
const path = require("path");
const tldjs = require("tldjs");
const tldts = require("tldts");
const { getDomainJsonFileNames } = require("./helpers/get-json-file-names");
const { log } = require("./helpers/log");

Expand All @@ -13,7 +13,7 @@ const init = async () => {
const data = JSON.parse(fs.readFileSync(dirPath));

for (let url of data) {
if (tldjs.parse(url).hostname !== url) {
if (tldts.parse(url).hostname !== url) {
log.error(`'${url}' in "${fn}" is not a valid domain.`);
failed = true;
}
Expand Down

0 comments on commit 943c1df

Please sign in to comment.