Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
vladkens committed May 13, 2023
0 parents commit 1595dc8
Show file tree
Hide file tree
Showing 14 changed files with 4,574 additions and 0 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
1 change: 1 addition & 0 deletions .github/funding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: vladkens
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: publish to npm

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
registry-url: "https://registry.npmjs.org"

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

- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: test

on:
push:
branches:
- "*"
tags-ignore:
- "v*"
paths:
- "src/**.ts"
- "tests/**.ts"
- ".github/workflows/**"
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 16, 18, 20]
name: node-${{ matrix.node-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- run: yarn install --frozen-lockfile
- run: yarn format-check
- run: yarn test-cov
- run: yarn build
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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/**/*
17 changes: 17 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"bracketSpacing": true,
"printWidth": 100,
"semi": false,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false,
"overrides": [
{
"files": "*.test.ts",
"options": {
"printWidth": 120
}
}
]
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"files.exclude": {
"coverage": true,
"yarn.lock": true
}
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 vladkens

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
44 changes: 44 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "url-normalize",
"version": "1.1.0",
"author": "Vlad Pronsky <[email protected]>",
"license": "MIT",
"type": "module",
"scripts": {
"build": "rm -rf dist && microbundle -f cjs,modern",
"test": "uvu -r tsm tests/",
"test-cov": "c8 --include=src yarn test",
"test-watch": "watchexec -e ts 'clear && yarn test'",
"format-check": "prettier --check \"{src,tests}/**/*.{js,jsx,ts,tsx}\""
},
"devDependencies": {
"c8": "^7.13.0",
"microbundle": "^0.15.1",
"prettier": "^2.8.8",
"prettier-plugin-organize-imports": "^3.2.2",
"tsm": "^2.3.0",
"uvu": "^0.5.6"
},
"publishConfig": {
"source": "src/main.ts",
"main": "dist/main.cjs",
"exports": "dist/main.mjs"
},
"exports": {
"types": "./dist/main.d.ts",
"import": "./dist/main.mjs",
"require": "./dist/main.cjs"
},
"keywords": [
"url",
"normalize",
"normalization",
"uri",
"url-normalization",
"url-normalize",
"querystrings",
"domain",
"extract",
"canonical"
]
}
Loading

0 comments on commit 1595dc8

Please sign in to comment.