npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sean-calendar

v0.2.3

Published

一个可复用的 Vue 日历组件

Readme

一个可复用的 Vue 日历组件

发包过程

1.调整目录结构,防止把测试代码打包。调整后打包的代码只包含相关组件

1.1 详情请查看components目录

1.2 主要是整合文件两个 index.js。1:Calendar/index.js 2:src/index.js

2.配置package.json和vite.config.js后打包

2.1 遇到的问题:

  • 1.build后的文件后缀名(.es.js - .esm.js(正确)),配置build->lib->fileName
  • 2.丢失css,需要在使用项目中手动引入,或者配置rollupOptions自动注入。引入css时需要配置exports ***** 没有显式声明 ./style.css时引入报错,导致 Node.js 模块解析器无法识别该文件的位置(从 npm v7 开始,模块解析严格遵循 exports 配置)。
  • 3.peerDependencies 告诉使用者:这些组件依赖,需自己安装

3.执行npm link测试

  • 1.在组件项目根目录执行 npm link(将本地包链接到全局 npm 库)。
  • 2.在另一个测试项目中执行 npm link your-calendar-package(关联本地包)。

4.发包

  • 发包前必须打包
  • npm login 登录 注意淘宝镜像不能登录或者注册,需要临时切换到官方镜像
  • 临时切换到官方镜像 npm config set registry https://registry.npmjs.org/
  • npm publish 发布包,注意private不可为true。注:private标记为私有包

4.更新包

  • 在 README.md 或 CHANGELOG.md 中记录版本变化(如新增功能、修复的问题),方便使用者了解更新内容。

  • 修复 bug(补丁) 不影响现有功能,仅修复问题 1.2.3 → 1.2.4 npm version patch

  • 新增功能 向下兼容的功能新增 1.2.3 → 1.3.0 npm version minor

  • 不兼容的变更 有破坏性更新,不向下兼容 1.2.3 → 2.0.0 npm version major

  • 预发布版本 测试版、beta 版等 1.2.3 → 1.2.4-beta.1 npm version prerelease --preid=beta

  • 步骤 1:更新版本号

    • 在项目根目录执行对应命令,npm 会自动更新 package.json 中的 version 字段,并创建一个版本标签(tag)
    • 示例:修复 bug,修订号+1 npm version patch
    • 执行后,package.json 中的 version 会从 1.0.0 → 1.0.1
  • 步骤 2:发布更新

    • 确保已切换到 npm 官方 registry(发布必须用官方源),然后执行发布命令:
    • 切换到官方 registry(如果之前切换到了淘宝源) npm config set registry https://registry.npmjs.org/
    • 发布更新(会发布当前版本号对应的包)
    • npm publish
    • 如果是 预发布版本(如 beta 版),发布时需要添加 --tag 标记:
    • 发布 beta 版,标签为 beta(使用者需通过 npm install 包名@beta 安装) npm publish --tag beta
  • 步骤 3:(可选)切换回镜像源

    • 发布完成后,可切换回淘宝镜像加速日常开发: npm config set registry https://registry.npmmirror.com/
  • 四、注意事项

    • 版本号不可重复:已发布的版本号(如 1.0.0)不能再次发布,必须更新版本号后才能重新发布。
    • 语义化版本的重要性:
    • 修订号(patch):使用者可放心升级(无兼容性问题)。
    • 次版本号(minor):使用者知道有新增功能,但可兼容旧代码。
    • 主版本号(major):使用者会注意到可能有破坏性变更,需谨慎升级。
  • 撤销发布的版本:如果发布后发现严重问题,可在 72 小时内撤销某个版本(不推荐,可能影响已安装的用户): npm unpublish 你的包名@版本号 --force