Git Product home page Git Product logo

npm-lib-template's Introduction

npm-lib-template

codecov

icebreaker 编写的一个 npm 包的一个模板

  • 使用 tsup 打包 , rollup 打包版本在 rollup 分支 (兼容 tsc)
  • 使用 vitest 作为单元测试框架
  • 使用 eslint 来规范代码风格
  • 输出 dist -> cjs,esm and .d.ts
  • 使用 semantic-release 来发布 npm/github

为什么使用 vitest 而不是原先的 jest

vitest 开箱即用, jest 在同时遇到 cjsesm 依赖的时候,支持差,而且配置复杂,依赖的 preset 多,比如 ts-jest..

scripts

rename

执行 npm run init:rename

作用为替换 package.json 中默认包含的所有名称为 npm-lib-template 的字段

默认替换为新建代码仓库的文件夹名称!

bin

执行 npm run init:bin

作用为 package.json 添加 filesbin,同时生成 bin/{{pkg.name}}.jssrc/cli.ts 文件

npm-lib-template's People

Contributors

sonofmagic avatar renovate[bot] avatar

Stargazers

溪雨安 avatar AT avatar  avatar Daniel Bodnar avatar  avatar 热可乐 avatar lorsque avatar Int avatar houseme avatar Bowen avatar llq-yyds avatar LZJ avatar kengqin avatar lzhida avatar  avatar  avatar oreo avatar George avatar Yuga Sun avatar harlan777 avatar  avatar

Watchers

 avatar  avatar

npm-lib-template's Issues

The automated release is failing 🚨

🚨 The automated release from the main branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Invalid npm token.

The npm token configured in the NPM_TOKEN environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org.

If you are using Two Factor Authentication for your account, set its level to "Authorization only" in your account settings. semantic-release cannot publish with the default "
Authorization and writes" level.

Please make sure to set the NPM_TOKEN environment variable in your CI with the exact value of the npm token.


Good luck with your project ✨

Your semantic-release bot 📦🚀

The automated release is failing 🚨

🚨 The automated release from the main branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


The release 1.0.0 on branch main cannot be published as it is out of range.

Based on the releases published on other branches, only versions within the range >=0.5.0 <0.6.0 can be published from branch main.

The following commits are responsible for the invalid release:

Those commits should be moved to a valid branch with git merge or git cherry-pick and removed from branch main with git revert or git reset.

A valid branch could be next.

See the workflow configuration documentation for more details.


Good luck with your project ✨

Your semantic-release bot 📦🚀

The automated release is failing 🚨

🚨 The automated release from the main branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


The release 1.0.0 on branch main cannot be published as it is out of range.

Based on the releases published on other branches, only versions within the range >=0.5.0 <0.6.0 can be published from branch main.

The following commits are responsible for the invalid release:

Those commits should be moved to a valid branch with git merge or git cherry-pick and removed from branch main with git revert or git reset.

A valid branch could be next.

See the workflow configuration documentation for more details.


Good luck with your project ✨

Your semantic-release bot 📦🚀

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/release.yml
  • actions/checkout v4
  • pnpm/action-setup v4
  • actions/setup-node v4
  • codecov/codecov-action v4
.github/workflows/test.yml
  • actions/checkout v4
  • pnpm/action-setup v4
  • actions/setup-node v4
  • codecov/codecov-action v4
npm
package.json
  • @commitlint/config-conventional ^19.2.2
  • @commitlint/types ^19.0.3
  • @icebreakers/eslint-config ^0.3.22
  • @tsconfig/recommended ^1.0.6
  • @types/fs-extra ^11.0.4
  • @types/klaw ^3.0.6
  • @types/lodash ^4.17.5
  • @types/lodash-es ^4.17.12
  • @types/node ^22.4.2
  • @vitest/coverage-v8 ^2.0.5
  • cross-env ^7.0.3
  • defu ^6.1.4
  • del ^7.1.0
  • eslint 9.9.1
  • fs-extra ^11.2.0
  • husky ^9.1.5
  • klaw ^4.1.0
  • lint-staged ^15.2.9
  • lodash ^4.17.21
  • lodash-es ^4.17.21
  • pathe ^1.1.2
  • semantic-release ^24.1.0
  • tsup ^8.2.4
  • tsx ^4.17.0
  • typescript ^5.5.2
  • vitest ^2.0.5
  • pnpm 9.6.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.