Skip to content

Conversation

voxpelli
Copy link

@voxpelli voxpelli commented Jul 1, 2025

Note

I made a maintenance fork over at @voxpelli/secure-password. I kept the changes separate so that I could create a PR for it here.

Warning

I do not assume that you will want to merge this up front as is, you of course can, but my assumption is that you wont. This PR is for visibility more than merging.

Important

I'm very open to reshaping this PR into what you would feel more comfortable merging, eg. dropping some of the dev tooling and eg. replacing @voxpelli/eslint-config with neostandard and such.

From the CHANGELOG.md entry I wrote for the v5.0.0 release I made:

Breaking changes

  • Dropped support for Node.js versions older than ^20.15.0 || >=22.2.0
  • Dropped callback support in async API:s, only supporting promises going forward.
  • Converted to ESM with SecurePassword as a named export
  • SecurePassword now needs to be created with new, eg new SecurePassword()
  • Constants are their own named exports rather than static properties

Changes

  • Added type declarations
  • Upgraded to sodium-native v5.x
  • Dropped nanoassert

Internal changes


The following is an additional overview generated by GitHub Copilot to make it easier to digest the contents, sorry for use of AI.

This pull request introduces significant updates to modernize the project, improve workflows, and align with current development standards. Key changes include migrating to GitHub Actions for CI/CD, dropping legacy support, adopting modern tooling, and transitioning to ESM. Additionally, it includes updates to documentation and configuration files to reflect these changes.

CI/CD Migration and Workflow Enhancements:

  • Replaced .travis.yml and appveyor.yml with GitHub Actions workflows for dependency review, linting, and Node.js testing. These workflows use templates from voxpelli/ghatemplates. (.github/workflows/dependency-review.yml - [1] .github/workflows/lint.yml - [2] .github/workflows/nodejs.yml - [3]
  • Added a pre-push hook in .husky/pre-push to run tests automatically before pushing changes.

Breaking Changes and Modernization:

  • Converted the library to ESM, requiring SecurePassword to be imported as a named export and instantiated with new. Dropped callback support in favor of Promises and updated Node.js compatibility to ^20.15.0 || >=22.2.0. (CHANGELOG.md - [1] README.md - [2]
  • Updated documentation to reflect the breaking changes and modernized usage patterns, including updated examples for the new API. (README.md - README.mdL3-R227)

Configuration Updates:

  • Added .editorconfig to enforce consistent coding standards across the project (e.g., LF line endings, UTF-8 charset, and 2-space indentation).
  • Added declaration.tsconfig.json for generating TypeScript type declarations.
  • Updated .npmrc to disable package-lock.

Tooling Improvements:

  • Replaced tape with node:test for testing and added more test coverage. (CHANGELOG.md - CHANGELOG.mdR3-R29)
  • Introduced ESLint configuration using @voxpelli/eslint-config for consistent code quality checks. (eslint.config.js - eslint.config.jsR1-R3)

Removal of Legacy Files:

  • Removed legacy CI configurations (.travis.yml and appveyor.yml) as part of the migration to GitHub Actions. (.travis.yml - [1] appveyor.yml - [2]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant