1.1.3 • Published 7 months ago
@matt-sann/internal-ws v1.1.3
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
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.0Build Package (if needed)
npm run build
Publishing
Test Package Locally
# Create tarball npm pack # Install locally in another project npm install ../path-to-package/your-package-1.0.0.tgzPublish 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 latestPublishing Checklist
- Update version number
- Run tests (
npm test) - Build package (
npm run build) - Update README and documentation
- Check
package.jsonfields - Verify
.npmignoreorfilesinpackage.json - Test package locally
- Commit changes
- Create git tag
- Publish to npm
GitHub Package Registry
To publish to GitHub Package Registry:
Authentication
# Add to .npmrc @your-username:registry=https://npm.pkg.github.com //npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKENUpdate package.json
{ "name": "@your-username/package-name", "publishConfig": { "registry": "https://npm.pkg.github.com" } }Publish
npm publish
Troubleshooting
- Version exists: Delete or update version
- Authentication failed: Run
npm loginagain - Scope issues: Check package name and registry
- Files missing: Check
filesin package.json or.npmignore
Best Practices
- Keep semantic versioning (MAJOR.MINOR.PATCH)
- Update changelog
- Test before publishing
- Use
.npmignoreorfilesin package.json - Include proper documentation
- 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