FUNDAMEN: PUBLISH VERSION 0.4.4 TO NPM
========================================

Current state checked on 2026-08-13:

  Package:             fundamen
  Current npm version: 0.4.3
  Current repo version: 0.4.3
  Next patch version:  0.4.4
  npm maintainer:      cvweiss <cvweiss@gmail.com>
  Package page:        https://www.npmjs.com/package/fundamen

Run all commands below from the root of your fundamen Git repository.


1. UPDATE AND CHECK THE REPOSITORY
----------------------------------

  git switch main
  git pull --ff-only origin main
  git status --short --branch

The status should show main synchronized with origin/main and no changed files.
Do not continue with a dirty working tree.


2. LOG IN TO THE CORRECT NPM ACCOUNT
------------------------------------

  npm login
  npm whoami
  npm owner ls fundamen

Expected npm username: cvweiss

Publishing requires two-factor authentication (2FA), or an authorized granular
access token that can bypass 2FA. Interactive login with 2FA is the simplest
option. Never put an npm token in this repository or commit a .npmrc file.


3. INSTALL AND INSPECT THE PACKAGE
----------------------------------

  npm ci
  npm pack --dry-run

Review the dry-run file list carefully. Make sure it contains only files that
should be public and contains no passwords, tokens, private keys, or private
configuration. The current preview contains 18 expected project files.

This repository currently has no npm test script. Before publishing, run any
application-specific checks you normally use with projects that consume
fundamen.


4. CREATE THE 0.4.4 RELEASE COMMIT AND TAG
------------------------------------------

  npm version patch -m "Release %s"

This should:

  - change package.json from 0.4.3 to 0.4.4
  - change package-lock.json from 0.4.3 to 0.4.4
  - create a Git commit named "Release 0.4.4"
  - create the Git tag v0.4.4

Confirm the result:

  node -p "require('./package.json').version"
  git show --stat --oneline HEAD
  git tag --points-at HEAD
  npm pack --dry-run

The version output must be 0.4.4 and the tag output must include v0.4.4.


5. PUSH THE RELEASE COMMIT AND TAG
----------------------------------

  git push origin main v0.4.4

Confirm that the push succeeds before publishing the immutable npm version.


6. PUBLISH TO NPM
-----------------

  npm publish

Approve the npm 2FA/security-key prompt when requested. This is an unscoped
public package, so --access public is not required.


7. VERIFY THE PUBLISHED RELEASE
-------------------------------

  npm view fundamen version
  npm view fundamen@0.4.4 dist.tarball

The first command must print 0.4.4. Then open:

  https://www.npmjs.com/package/fundamen/v/0.4.4

Optionally verify installation in a disposable directory outside this repo:

  release_test_dir=$(mktemp -d)
  cd "$release_test_dir"
  npm init -y
  npm install fundamen@0.4.4
  node -p "require('fundamen/package.json').version"

The final command must print 0.4.4.


IF SOMETHING FAILS
------------------

  - If login or 2FA fails, fix authentication and retry npm publish.
  - If npm publish fails before accepting the package, you can retry 0.4.4.
  - If npm reports that 0.4.4 already exists, first run:

      npm view fundamen@0.4.4 version

    npm versions are immutable. Do not use --force and do not try to overwrite
    0.4.4. If another correction is required, commit it and release 0.4.5.
  - Do not unpublish an accepted release merely to replace its contents.


OFFICIAL NPM DOCUMENTATION
--------------------------

  npm version:
  https://docs.npmjs.com/cli/v11/commands/npm-version/

  npm publish and public packages:
  https://docs.npmjs.com/getting-started/creating-node-modules/

  npm publishing authentication and 2FA:
  https://docs.npmjs.com/requiring-2fa-for-package-publishing-and-settings-modification/

  npm pack dry run:
  https://docs.npmjs.com/cli/v11/commands/npm-pack/
