Skip to content

Commit

Permalink
Initial project setup & code
Browse files Browse the repository at this point in the history
  • Loading branch information
shgysk8zer0 committed Oct 28, 2024
1 parent c97a661 commit 7fb8121
Show file tree
Hide file tree
Showing 13 changed files with 656 additions and 782 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:

# Valate Languages - Uncomment to Enable
# JS/TS/JSON Disabled until ESLint in super-linter is updated
VALIDATE_HTML: true
# VALIDATE_HTML: true
VALIDATE_CSS: true
# VALIDATE_JAVASCRIPT_ES: true
# VALIDATE_JAVASCRIPT_STANDARD: true
Expand Down
72 changes: 1 addition & 71 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,76 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
- Update node version via `.npmrc`
- Update Node CI workflow
- Install & use `@shgysk8zer0/eslint-config`
- Add support for `node --test`, including ignoring tests for publishing
- Update ESLint & super-linter
- Switch to more basic Rollup config
- Update `exports` and `main` accordingly

### Fixed
- Fix missed renaming in README

## Removed
- Remove old ESLint config files

## [v1.1.1] - 2023-09-24

### Added
- Add `unpkg` to `package.json`
- Add badges in README

### Changed
- Update `exports` to `package.json` to handle wider variety

### Fixed
- Fix typo in `fix:js` script

### [v1.1.0] - 2023-07-03

### Changed
- Update to node 20
- Update npm publishing GH Action

## [v1.0.5] - 2023-07-02

### Added
- Add `funding`

### Changed
- Updated GitHub Actions workflows
- Update versioning & lock-file scripts
- Update `.npmignore` & `.gitignore`

## [v1.0.4] - 2023-06-08

### Added
- Install `@shgysk8zer0/npm-utils`
- Add `exports` to package config

### Removed
- Uninstall `rollup`, `eslint`

### Changed
- Use `getConfig()` from `@shgysk8zer0/js-utils/rollup` for rollup config

## [v1.0.3] - 2023-06-01

### Fixed
- Revert to old Release Action, now with permissions & link to changelog

## [v1.0.2] - 2023-06-01

### Fixed
- Fix `changelog-entry` to match `[$version]` instead of `$version`

## [v1.0.1] - 2023-05-31

### Fixed
- Update GitHub Release workflow to use [Auto Release](https://github.com/marketplace/actions/auto-release)

## [v1.0.0] - 2023-05-31
## [v1.0.0] - 2024-10-28

Initial Release
48 changes: 34 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# npm-template
# `@aegisjsproject/url`

A template repo for npm packages
Safe URL parsing/escaping via JS tagged templates

[![CodeQL](https://github.com/shgysk8zer0/npm-template/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/shgysk8zer0/npm-template/actions/workflows/codeql-analysis.yml)
![Node CI](https://github.com/shgysk8zer0/npm-template/workflows/Node%20CI/badge.svg)
![Lint Code Base](https://github.com/shgysk8zer0/npm-template/workflows/Lint%20Code%20Base/badge.svg)
[![CodeQL](https://github.com/AegisJSProject/url/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/AegisJSProject/url/actions/workflows/codeql-analysis.yml)
![Node CI](https://github.com/AegisJSProject/url/workflows/Node%20CI/badge.svg)
![Lint Code Base](https://github.com/AegisJSProject/url/workflows/Lint%20Code%20Base/badge.svg)

[![GitHub license](https://img.shields.io/github/license/shgysk8zer0/npm-template.svg)](https://github.com/shgysk8zer0/npm-template/blob/master/LICENSE)
[![GitHub last commit](https://img.shields.io/github/last-commit/shgysk8zer0/npm-template.svg)](https://github.com/shgysk8zer0/npm-template/commits/master)
[![GitHub release](https://img.shields.io/github/release/shgysk8zer0/npm-template?logo=github)](https://github.com/shgysk8zer0/npm-template/releases)
[![GitHub license](https://img.shields.io/github/license/AegisJSProject/url.svg)](https://github.com/AegisJSProject/url/blob/master/LICENSE)
[![GitHub last commit](https://img.shields.io/github/last-commit/AegisJSProject/url.svg)](https://github.com/AegisJSProject/url/commits/master)
[![GitHub release](https://img.shields.io/github/release/AegisJSProject/url?logo=github)](https://github.com/AegisJSProject/url/releases)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/shgysk8zer0?logo=github)](https://github.com/sponsors/shgysk8zer0)

[![npm](https://img.shields.io/npm/v/@shgysk8zer0/npm-template)](https://www.npmjs.com/package/@shgysk8zer0/npm-template)
![node-current](https://img.shields.io/node/v/@shgysk8zer0/npm-template)
![npm bundle size gzipped](https://img.shields.io/bundlephobia/minzip/@shgysk8zer0/npm-template)
[![npm](https://img.shields.io/npm/dw/@shgysk8zer0/npm-template?logo=npm)](https://www.npmjs.com/package/@shgysk8zer0/npm-template)
[![npm](https://img.shields.io/npm/v/@aegisjsproject/url)](https://www.npmjs.com/package/@aegisjsproject/url)
![node-current](https://img.shields.io/node/v/@aegisjsproject/url)
![npm bundle size gzipped](https://img.shields.io/bundlephobia/minzip/@aegisjsproject/url)
[![npm](https://img.shields.io/npm/dw/@aegisjsproject/url?logo=npm)](https://www.npmjs.com/package/@aegisjsproject/url)

[![GitHub followers](https://img.shields.io/github/followers/shgysk8zer0.svg?style=social)](https://github.com/shgysk8zer0)
![GitHub forks](https://img.shields.io/github/forks/shgysk8zer0/npm-template.svg?style=social)
![GitHub stars](https://img.shields.io/github/stars/shgysk8zer0/npm-template.svg?style=social)
![GitHub forks](https://img.shields.io/github/forks/AegisJSProject/url.svg?style=social)
![GitHub stars](https://img.shields.io/github/stars/AegisJSProject/url.svg?style=social)
[![Twitter Follow](https://img.shields.io/twitter/follow/shgysk8zer0.svg?style=social)](https://twitter.com/shgysk8zer0)

[![Donate using Liberapay](https://img.shields.io/liberapay/receives/shgysk8zer0.svg?logo=liberapay)](https://liberapay.com/shgysk8zer0/donate "Donate using Liberapay")
Expand All @@ -27,3 +27,23 @@ A template repo for npm packages
- [Code of Conduct](./.github/CODE_OF_CONDUCT.md)
- [Contributing](./.github/CONTRIBUTING.md)
<!-- - [Security Policy](./.github/SECURITY.md) -->

## Installation

```bash
npm i @aegisjsproject/url
```

## Usage

```js
import { url } from '@aegisjsproject/url';

// Santize user input (encodes and escapes as necessary)
const url1 = url`https://example.com/${userInput}`;
const url2 = url`${location.origin}/path/${someVar}`;

// Create a `blob:` URI from a file
const file = new File(['Hello, World!'], hi.txt, { type: 'text/plain' });
const download = `<a href="${url`file`}" download="${file.name}">Download File</a>`;
```
1 change: 0 additions & 1 deletion consts.js

This file was deleted.

2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { node } from '@shgysk8zer0/eslint-config';

export default node({ files: ['**/*/js'], ignores: ['**/*.min.js', '**/*.cjs', '**/*.mjs'] });
export default node({ files: ['**/*/js' ,'*.js'], ignores: ['**/*.min.js', '**/*.cjs', '**/*.mjs'] });
2 changes: 0 additions & 2 deletions index.js

This file was deleted.

8 changes: 0 additions & 8 deletions index.test.js

This file was deleted.

Loading

0 comments on commit 7fb8121

Please sign in to comment.