Skip to content

Commit 7781f2c

Browse files
committed
deps: update & pin
1 parent 2630388 commit 7781f2c

File tree

9 files changed

+569
-440
lines changed

9 files changed

+569
-440
lines changed

.github/codeowners

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @vladkens

.github/workflows/ci.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ jobs:
1919
cache: "yarn"
2020

2121
- run: yarn install --frozen-lockfile
22-
- run: yarn format-check
23-
- run: yarn test-cov
24-
- run: yarn build
22+
- run: yarn ci
2523

2624
release:
2725
runs-on: ubuntu-latest
@@ -37,8 +35,7 @@ jobs:
3735
registry-url: "https://registry.npmjs.org"
3836

3937
- run: yarn install --frozen-lockfile
40-
- run: yarn test
41-
- run: yarn build
38+
- run: yarn ci
4239

4340
- run: npm publish
4441
env:

.gitignore

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,2 @@
1-
lib-cov
2-
*.seed
3-
*.log
4-
*.csv
5-
*.dat
6-
*.out
7-
*.pid
8-
*.gz
9-
*.swp
10-
11-
pids
12-
logs
13-
results
14-
tmp
15-
16-
# Build
17-
public/css/main.css
18-
19-
# Coverage reports
20-
coverage
21-
22-
# API keys and secrets
23-
.env
24-
25-
# Dependency directory
26-
node_modules
27-
bower_components
28-
29-
# Editors
30-
.idea
31-
*.iml
32-
33-
# OS metadata
34-
.DS_Store
35-
Thumbs.db
36-
37-
# Ignore built ts files
38-
dist/**/*
1+
node_modules/
2+
dist/

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"semi": false,
55
"singleQuote": false,
66
"tabWidth": 2,
7-
"trailingComma": "es5",
7+
"trailingComma": "all",
88
"useTabs": false,
99
"overrides": [
1010
{

.yarnrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
save-prefix ""

package.json

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,33 @@
22
"type": "module",
33
"name": "url-normalize",
44
"version": "2.0.0",
5+
"license": "MIT",
6+
"scripts": {
7+
"build": "rm -rf dist && pkgroll --minify && ls -lah dist",
8+
"test": "tsc --noEmit && uvu -r tsm tests/",
9+
"test-cov": "c8 --include=src yarn test",
10+
"test-watch": "watchexec -e ts 'clear && yarn test'",
11+
"bench": "node --loader tsm --no-warnings benchmark.ts",
12+
"format": "prettier --write '{src,tests}/**/*.{js,jsx,ts,tsx}'",
13+
"format-check": "prettier --check '{src,tests}/**/*.{js,jsx,ts,tsx}'",
14+
"ci": "yarn format-check && yarn test && yarn build"
15+
},
16+
"dependencies": {
17+
"@types/punycode": "2.1.4",
18+
"punycode": "2.3.1"
19+
},
20+
"devDependencies": {
21+
"c8": "10.1.2",
22+
"pkgroll": "2.5.0",
23+
"prettier": "3.3.3",
24+
"prettier-plugin-organize-imports": "4.1.0",
25+
"tsm": "2.3.0",
26+
"typescript": "5.6.3",
27+
"uvu": "0.5.6"
28+
},
529
"author": "Vlad Pronsky <v.pronsky@gmail.com>",
630
"repository": "vladkens/url-normalize",
731
"description": "Normalize URLs to a standardized form. HTTPS by default, flexible configuration, custom protocols, domain extraction, humazing URL, and punycode support. Both CJS & ESM modules available.",
8-
"license": "MIT",
932
"keywords": [
1033
"canonical",
1134
"domain",
@@ -23,28 +46,6 @@
2346
"files": [
2447
"dist"
2548
],
26-
"scripts": {
27-
"build": "rm -rf dist && pkgroll --minify && ls -lah dist",
28-
"test": "tsc --noEmit && uvu -r tsm tests/",
29-
"test-cov": "c8 --include=src yarn test",
30-
"test-watch": "watchexec -e ts 'clear && yarn test'",
31-
"bench": "node --loader tsm --no-warnings benchmark.ts",
32-
"format": "prettier --write '{src,tests}/**/*.{js,jsx,ts,tsx}'",
33-
"format-check": "prettier --check '{src,tests}/**/*.{js,jsx,ts,tsx}'"
34-
},
35-
"dependencies": {
36-
"@types/punycode": "^2.1.0",
37-
"punycode": "^2.3.0"
38-
},
39-
"devDependencies": {
40-
"c8": "^7.13.0",
41-
"pkgroll": "^1.10.0",
42-
"prettier": "^2.8.8",
43-
"prettier-plugin-organize-imports": "^3.2.2",
44-
"tsm": "^2.3.0",
45-
"typescript": "^5.0.4",
46-
"uvu": "^0.5.6"
47-
},
4849
"types": "./dist/main.d.cts",
4950
"exports": {
5051
"require": {

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
<a href="https://packagephobia.now.sh/result?p=url-normalize">
1111
<img src="https://badgen.net/packagephobia/publish/url-normalize" alt="size" />
1212
</a>
13-
<!-- <a href="https://npmjs.org/package/url-normalize">
13+
<a href="https://npmjs.org/package/url-normalize">
1414
<img src="https://badgen.net/npm/dm/url-normalize" alt="downloads" />
15-
</a> -->
15+
</a>
1616
<a href="https://github.com/vladkens/url-normalize/blob/main/LICENSE">
1717
<img src="https://badgen.net/github/license/vladkens/url-normalize" alt="license" />
1818
</a>

tests/main.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ test("should normalize domain", () => {
6666
t("xn--9q8huc.ws", "https://👻💥.ws", { unicode: true })
6767
t("https://xn--mgbh0fb.xn--wgbh1c", "https://مثال.مصر", { unicode: true })
6868
t("https://xn--eby-7cd.com", "https://ebаy.com", { unicode: true })
69+
70+
t("", null)
6971
})
7072

7173
test("should normalize path", () => {

0 commit comments

Comments
 (0)