Skip to content

Commit

Permalink
deps: update & pin
Browse files Browse the repository at this point in the history
  • Loading branch information
vladkens committed Oct 12, 2024
1 parent 2630388 commit 7781f2c
Show file tree
Hide file tree
Showing 9 changed files with 569 additions and 440 deletions.
1 change: 1 addition & 0 deletions .github/codeowners
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @vladkens
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ jobs:
cache: "yarn"

- run: yarn install --frozen-lockfile
- run: yarn format-check
- run: yarn test-cov
- run: yarn build
- run: yarn ci

release:
runs-on: ubuntu-latest
Expand All @@ -37,8 +35,7 @@ jobs:
registry-url: "https://registry.npmjs.org"

- run: yarn install --frozen-lockfile
- run: yarn test
- run: yarn build
- run: yarn ci

- run: npm publish
env:
Expand Down
40 changes: 2 additions & 38 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,38 +1,2 @@
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
*.swp

pids
logs
results
tmp

# Build
public/css/main.css

# Coverage reports
coverage

# API keys and secrets
.env

# Dependency directory
node_modules
bower_components

# Editors
.idea
*.iml

# OS metadata
.DS_Store
Thumbs.db

# Ignore built ts files
dist/**/*
node_modules/
dist/
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"semi": false,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5",
"trailingComma": "all",
"useTabs": false,
"overrides": [
{
Expand Down
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-prefix ""
47 changes: 24 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,33 @@
"type": "module",
"name": "url-normalize",
"version": "2.0.0",
"license": "MIT",
"scripts": {
"build": "rm -rf dist && pkgroll --minify && ls -lah dist",
"test": "tsc --noEmit && uvu -r tsm tests/",
"test-cov": "c8 --include=src yarn test",
"test-watch": "watchexec -e ts 'clear && yarn test'",
"bench": "node --loader tsm --no-warnings benchmark.ts",
"format": "prettier --write '{src,tests}/**/*.{js,jsx,ts,tsx}'",
"format-check": "prettier --check '{src,tests}/**/*.{js,jsx,ts,tsx}'",
"ci": "yarn format-check && yarn test && yarn build"
},
"dependencies": {
"@types/punycode": "2.1.4",
"punycode": "2.3.1"
},
"devDependencies": {
"c8": "10.1.2",
"pkgroll": "2.5.0",
"prettier": "3.3.3",
"prettier-plugin-organize-imports": "4.1.0",
"tsm": "2.3.0",
"typescript": "5.6.3",
"uvu": "0.5.6"
},
"author": "Vlad Pronsky <[email protected]>",
"repository": "vladkens/url-normalize",
"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.",
"license": "MIT",
"keywords": [
"canonical",
"domain",
Expand All @@ -23,28 +46,6 @@
"files": [
"dist"
],
"scripts": {
"build": "rm -rf dist && pkgroll --minify && ls -lah dist",
"test": "tsc --noEmit && uvu -r tsm tests/",
"test-cov": "c8 --include=src yarn test",
"test-watch": "watchexec -e ts 'clear && yarn test'",
"bench": "node --loader tsm --no-warnings benchmark.ts",
"format": "prettier --write '{src,tests}/**/*.{js,jsx,ts,tsx}'",
"format-check": "prettier --check '{src,tests}/**/*.{js,jsx,ts,tsx}'"
},
"dependencies": {
"@types/punycode": "^2.1.0",
"punycode": "^2.3.0"
},
"devDependencies": {
"c8": "^7.13.0",
"pkgroll": "^1.10.0",
"prettier": "^2.8.8",
"prettier-plugin-organize-imports": "^3.2.2",
"tsm": "^2.3.0",
"typescript": "^5.0.4",
"uvu": "^0.5.6"
},
"types": "./dist/main.d.cts",
"exports": {
"require": {
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<a href="https://packagephobia.now.sh/result?p=url-normalize">
<img src="https://badgen.net/packagephobia/publish/url-normalize" alt="size" />
</a>
<!-- <a href="https://npmjs.org/package/url-normalize">
<a href="https://npmjs.org/package/url-normalize">
<img src="https://badgen.net/npm/dm/url-normalize" alt="downloads" />
</a> -->
</a>
<a href="https://github.com/vladkens/url-normalize/blob/main/LICENSE">
<img src="https://badgen.net/github/license/vladkens/url-normalize" alt="license" />
</a>
Expand Down
2 changes: 2 additions & 0 deletions tests/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ test("should normalize domain", () => {
t("xn--9q8huc.ws", "https://👻💥.ws", { unicode: true })
t("https://xn--mgbh0fb.xn--wgbh1c", "https://مثال.مصر", { unicode: true })
t("https://xn--eby-7cd.com", "https://ebаy.com", { unicode: true })

t("", null)
})

test("should normalize path", () => {
Expand Down
Loading

0 comments on commit 7781f2c

Please sign in to comment.