diff --git a/.npmignore b/.npmignore index eb76fa7..d3835db 100644 --- a/.npmignore +++ b/.npmignore @@ -18,3 +18,4 @@ importmap.yaml *.bak *.env !*.map +qr.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 2296da8..875a86c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,93 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -### Added -- Add `@aegisjsproject/dev-server` - -### Changed -- Update CSP, template, etc - -## [v1.1.3] - 2025-11-21 - -### Added -- Add `npm start` script - -### Changed -- Update npm publishing - -## [v1.1.2] - 2025-05-01 - -### Changed -- Use `eslint` & `rollup` directly instead of by other packages -- 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] - 2025-12-23 Initial Release diff --git a/README.md b/README.md index d7fbe2f..3a97d4a 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,24 @@ -# npm-template +# `@aegisjsproject/qr-encoder` -A template repo for npm packages +A QR encoder for node and browsers -[](https://github.com/shgysk8zer0/npm-template/actions/workflows/codeql-analysis.yml) - - +[](https://github.com/AegisJSProject/qr-encoder/actions/workflows/codeql-analysis.yml) + + -[](https://github.com/shgysk8zer0/npm-template/blob/master/LICENSE) -[](https://github.com/shgysk8zer0/npm-template/commits/master) -[](https://github.com/shgysk8zer0/npm-template/releases) +[](https://github.com/AegisJSProject/qr-encoder/blob/master/LICENSE) +[](https://github.com/AegisJSProject/qr-encoder/commits/master) +[](https://github.com/AegisJSProject/qr-encoder/releases) [](https://github.com/sponsors/shgysk8zer0) -[](https://www.npmjs.com/package/@shgysk8zer0/npm-template) - - -[](https://www.npmjs.com/package/@shgysk8zer0/npm-template) +[](https://www.npmjs.com/package/@aegisjsproject/qr-encoder) + + +[](https://www.npmjs.com/package/@aegisjsproject/qr-encoder) [](https://github.com/shgysk8zer0) - - + + [](https://twitter.com/shgysk8zer0) [](https://liberapay.com/shgysk8zer0/donate "Donate using Liberapay") diff --git a/consts.js b/consts.js deleted file mode 100644 index fc3a79b..0000000 --- a/consts.js +++ /dev/null @@ -1 +0,0 @@ -export const MESSAGE = 'This is a template for npm projects.'; diff --git a/http.config.js b/http.config.js index 43ca2ec..dafe235 100644 --- a/http.config.js +++ b/http.config.js @@ -1,12 +1,10 @@ import { imports } from '@shgysk8zer0/importmap'; -import { checkCacheItem, setCacheItem } from '@aegisjsproject/http-utils/cache.js'; -import { addTrustedTypePolicy, addScriptSrc, useDefaultCSP } from '@aegisjsproject/http-utils/csp.js'; +import { addScriptSrc, addTrustedTypePolicy, useDefaultCSP } from '@aegisjsproject/http-utils/csp.js'; addScriptSrc( - 'https://unpkg.com/@aegisjsproject/', - 'https://unpkg.com/@shgysk8zer0/', + imports['@shgysk8zer0/polyfills'], + imports.qr, ); - addTrustedTypePolicy('aegis-sanitizer#html'); export default { @@ -15,19 +13,5 @@ export default { '/favicon.svg': '@aegisjsproject/dev-server/favicon', }, open: true, - requestPreprocessors: [ - '@aegisjsproject/http-utils/request-id.js', - checkCacheItem, - ], - responsePostprocessors: [ - '@aegisjsproject/http-utils/compression.js', - '@aegisjsproject/http-utils/cors.js', - useDefaultCSP(), - (response, { request }) => { - if (request.destination === 'document') { - response.headers.append('Link', `<${imports['@shgysk8zer0/polyfills']}>; rel="preload"; as="script"; fetchpriority="high"; crossorigin="anonymous"; referrerpolicy="no-referrer"`); - } - }, - setCacheItem, - ], + responsePostprocessors: [useDefaultCSP()], }; diff --git a/index.html b/index.html index 014936b..f5722f7 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,7 @@ +