# Changelog for `pagecrypt` ### Unreleased ### Fixes - Reduce size of `decrypt-template.html` by 12% (-889 bytes) by using latest versions of Vite and Rollup. - Allow `generatePassword()` to use 255 characters instead of only 254. - Maintenance: Upgrade dependencies to latest versions and verify output. - Simplify clearing of the URL hash after decryption - fix #50 - Export types first. Resolves error from https://publint.dev/rules#exports_types_should_be_first - Fix reference error in case globalThis is undefined. Inspired by #44. Thanks[@PysKa-Ratzinger](https://github.com/PysKa-Ratzinger)! ## 6.1.1 - 2023-07-17 ### Fixes - Maintenance: Update dev dependencies to latest versions. ## 6.1.0 - 2023-03-24 ### Features Two improvements inspired by [Harry Rabin](https://github.com/harryrabin) - thank you! - Better operational security by removing logging of predefined passwords when encrypting via the pagecrypt CLI. - Better operational security by removing the GitHub link in the web template, to make it harder for attackers to analyse the project. ### Fixes - Improved documentation for generating a password with a custom character set `generatePassword(length: number, characters: string)`. - Upgrade dependencies to latest versions. - Export TypeScript type definitions in npm package - Thanks to [Bjorn Lu](https://github.com/bluwy) and ## 6.0.1 - 2022-12-31 ### Fixes - Cleanup README. No code changes. ## 6.0.0 - 2022-12-27 This is a major upgrade, reducing the amount of CSS by 50%, removing about 40% of the required third-party npm modules, and adding support for a custom number of password `iterations` which allows for greatly improved security. ### Breaking changes - License changed to AGPL-3.0. If you prefer the MIT license, you can keep using pagecrypt 5.x. ### Features - Improved security: It's now possible to specify a custom number of password `iterations` for both `encryptHTML()` and `encrypt()`. See usage examples in [README](./README.md) to learn more. - Added support for specifying the new `iterations` option through the CLI. See usage examples in [README](./README.md) to learn more. ### Fixes - Prefer `globalThis` over `window` in Node 19 - thanks [@metonym](https://github.com/metonym) - Reduce CSS size with 50% by replacing Tailwind CSS with custom CSS. This also greatly simplifies the development and build setup for this project. - Update dependencies to latest versions. ## 5.4.0 - 2022-04-18 ### Fixes - Update dependencies and verify that the project works with latest versions. - Clarified installation instructions. --- ## 5.3.0 - 2021-08-31 ### Features - feature(ui): Add submit button to simplify mobile usage. - feature(ui): Build and use the latest decrypt template with new submit button ### Fixes - fix(deps): Update deps to latest minor and patch releases. - fix(build): Update build script with improved html template transformations - fix(build): Improve removal of the vite module inline script. - fix(build): Simplify build process to remove the steps no longer necessary. - fix(dev): Update dev template. --- ## 5.2.0 - 2021-08-15 Added dark mode as new default theme since it probably is what the primary audience prefers. Also added a bug fix for magic links to preserve the URL and allow hosting the output HTML files on other routes than `/`. ### Features - feature(ui): Add dark mode design by default. - feature(tests): Improve testing framework and simplify development - feature(tests): Update tests to use new dark template - feature(tests): Greatly improve testing DX by automating several manual steps and displaying everything neatly in the browser. - feature(build): Simplify package builds to greatly improve DX ### Fixes - fix(ui): Ensure full page URL except the hash is preserved when using magic links. - fix(tests): Improve testing html file - fix(package): Update dev command for consistency - fix(package): Automatically remove whitespace from new decrypt template builds - chore(deps): Update deps to latest minor and patch versions. --- ## 5.1.0 - 2021-07-30 Another major UX improvement incoming: Magic links to unlock encrypted pages with a single click! Also slightly improved browser support for the `pagecrypt/core` module. ### Features - feature(ux): Implement + add docs for magic links that allow single-click unlocks - feature(core): Improve crypto loading to support older browsers for the core package. - feature(decrypt): Convert decryption script to TypeScript ### Fixes - docs(general): Highlight required Node.js version - fix(dev server): Remove `sirv-cli` dev dependency since we no longer need HTTPS for local dev. - docs(core): Clarify docstrings, improve terminology used and add link to related blog post. - docs(dev): Update testing and dev server instructions. - chore(test): Remove hardcoded test package version - chore(test): Improve browser encryption test --- ## 5.0.0 - 2021-07-15 ### Features - BREAKING: feature(package): Convert modules to use ESM by default instead of CommonJS. Update your build tool to use `import` syntax instead of `require` - or keep using `pagecrypt@^4.0.1` which supports CommonJS `require`. - feature(package): Add a new `pagecrypt/core` module that can be imported to use the core library features in browsers, Deno and any other ESM compatible modern JS environment. For Node.js, the index import `pagecrypt` still works just like before. - feature(types): Add TypeScript definitions to improve DX and automation in TypeScript projects. - feature(crypto): Use isomorphic Web Crypto API to allow code reuse between Node.js, browsers and other ESM compatible environments. - feature(password generator): Use the isomorphic Web Crypto API to make project run in Node.js, browsers and other ESM compatible environments. - feature(build): Improve package build setup using esbuild and node-fs-extra ### Fixes - fix(package): Explicitly use CommonJS for config files. - chore(deps): Upgrade dependencies. --- ## 4.0.1 - 2021-05-04 ### Fixes - fix(crypto): Ensure key derivation function is not extractable to fix bug in Chrome and Safari. --- ## 4.0.0 - 2021-04-29 Major UX and performance improvements! This version uses `document.write()` to show the encrypted payload instead of using an `