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 🙏

© 2024 – Pkg Stats / Ryan Hefner

codefreeze

v1.0.19

Published

Simple resources to help enforce code freeze schedules.

Downloads

1,148

Readme

GitHub Logo

CodeFreeze

Simple resources to help enforce code freeze schedules.

Quick start

  1. In your project, install codefreeze:
yarn add codefreeze
  1. Create a GITHUB_ENV file in the project root and populate it with your desired code freeze schedule:
# Required
CODE_FREEZE_DAY_BEGIN=Thursday
CODE_FREEZE_HOUR_BEGIN=6
CODE_FREEZE_DAY_END=Monday
CODE_FREEZE_HOUR_END=11

# Optional preferences
CODE_FREEZE_BI_WEEKLY=true
CODE_FREEZE_BI_WEEKLY_WEEK=odd
CODE_FREEZE_TIMEZONE=America/New_York
  1. On your next pull request, you should see the action in the pull request build status:

Build Success

If code freeze is in effect, the previous screen will show that the action did not pass, and the details will look like this:

Build Fail

More details

This script depends on the following environment variables :

CODE_FREEZE_DAY_BEGIN    # Case-sensitive day of the week the code freeze starts. Example: "Thursday"
CODE_FREEZE_HOUR_BEGIN   # Numeric hour of the day the code freeze begins, 0-23.  Example: "14" would be 2:00PM
CODE_FREEZE_DAY_END      # Case-sensitive day of the week the code freeze starts. Example: "Thursday"
CODE_FREEZE_HOUR_END     # Numeric hour of the day the code freeze begins, 0-23.  Example: "9" would be 9:00AM

The script timezone defaults to 'America/Los_Angeles' but you can override :

CODE_FREEZE_TIMEZONE=America/Los_Angeles

You must use one of the supported moment.js timezones

If you have a bi-weekly sprint, you can enforce this script on odd or even weeks :

CODE_FREEZE_BI_WEEKLY=true       # "true" or nothing. Just omit this variable completely to enforce weekly code freezes
CODE_FREEZE_BI_WEEKLY_WEEK=odd   # One of "odd" or "even"

If you need an off-schedule code freeze or want to bypass this script completely, you can override :

CODE_FREEZE_OVERRIDE=frozen   # One of "frozen" (code freeze in full effect) or "unfrozen" (bypass the code freeze check)

You can create your own Github actions file and export these env vars, or you can use the one we provide for you, which is automatically copied to :

./.github/workflows/githubAction.yml

If you are going to use your own Github actions file, you'll want to omit codefreeze from your package.json so it doesn't copy the included yml on your next npm install or yarn install.

Planned Enhancements

  • Support multiple code freezes per week
  • Make github action yml copy optional