1.1.3 • Published 7 months ago

@matt-sann/internal-ws v1.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

NPM Package Publishing Guide

Prerequisites

  • Node.js and npm installed
  • An npm account (create one at npmjs.com)
  • Logged in to npm in your terminal (npm login)

Update Package Version

  1. Manual Update

    # Edit version in package.json manually
    # Or use npm version command:
    npm version patch  # 1.0.0 -> 1.0.1
    npm version minor  # 1.0.0 -> 1.1.0
    npm version major  # 1.0.0 -> 2.0.0
  2. Build Package (if needed)

    npm run build

Publishing

  1. Test Package Locally

    # Create tarball
    npm pack
    
    # Install locally in another project
    npm install ../path-to-package/your-package-1.0.0.tgz
  2. Publish to NPM

    # Public package
    npm publish
    
    # Private/scoped package
    npm publish --access public

Common Commands

# Check current version
npm version

# View package contents
npm pack

# List published versions
npm view your-package versions

# Tag specific version
npm dist-tag add your-package@1.0.0 latest

Publishing Checklist

  • Update version number
  • Run tests (npm test)
  • Build package (npm run build)
  • Update README and documentation
  • Check package.json fields
  • Verify .npmignore or files in package.json
  • Test package locally
  • Commit changes
  • Create git tag
  • Publish to npm

GitHub Package Registry

To publish to GitHub Package Registry:

  1. Authentication

    # Add to .npmrc
    @your-username:registry=https://npm.pkg.github.com
    //npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN
  2. Update package.json

    {
      "name": "@your-username/package-name",
      "publishConfig": {
        "registry": "https://npm.pkg.github.com"
      }
    }
  3. Publish

    npm publish

Troubleshooting

  • Version exists: Delete or update version
  • Authentication failed: Run npm login again
  • Scope issues: Check package name and registry
  • Files missing: Check files in package.json or .npmignore

Best Practices

  1. Keep semantic versioning (MAJOR.MINOR.PATCH)
  2. Update changelog
  3. Test before publishing
  4. Use .npmignore or files in package.json
  5. Include proper documentation
  6. Set up CI/CD for automated publishing

License

MIT

1.1.3

7 months ago

1.1.2

7 months ago

1.1.1

7 months ago

1.1.0

7 months ago

1.0.14

9 months ago

1.0.13

9 months ago

1.0.12

9 months ago

1.0.11

9 months ago

1.0.10

9 months ago

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago