boywithkeyboard’s updater

Demo

Usage

The script is available as a GitHub Action for easy integration into your workflow.

[!IMPORTANT]
Please make sure that you have enabled the Allow GitHub actions to create and approve pull requests setting, as shown here.

name: update

on:
  schedule:
    - cron: '0 0 * * *'
  workflow_dispatch:

permissions:
  contents: write
  pull-requests: write

jobs:
  update:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Run updater
        uses: boywithkeyboard/updater@v0
      #  with:
      #    allowBreaking: true

Options:

  • commitMessage - Commit message and title for the pull request.
  • allowBreaking - Allow breaking updates (major releases).
  • allowUnstable - Allow unstable updates (prereleases).

If you prefer to use this tool in another way, please read our alternative uses.

Configuration File

The file must be named updater.json and be located either in the root directory of your project or in the .github directory.

{
  "$schema": "https://updater.mod.land/schema.json"
}
  • include (string or array of strings)

    The files, directories and glob patterns to be included for updates.

  • exclude (string or array of strings)

    The files, directories and global patterns to exclude from updates. The exclude option comes after include and overwrites the specified patterns.

  • allowBreaking (boolean)

    Allow breaking updates (major releases).

    false by default

  • allowUnstable (boolean)

    Allow unstable updates (prereleases).

    false by default

  • readOnly (boolean)

    Perform a dry run.

    false by default

Stages

  • ⚠️ breaking

    “This update might break your code.”

  • 🚧 unstable

    “This is a prerelease and might therefore come with unwanted issues.”

  • 🤞 early

    “This module doesn’t strictly adhere to semver yet, so this version might break your code.”

Advanced Usage

  • Pin a dependency

    To ignore a particular import, you can append #pin to the url.

    import * as semver from 'https://deno.land/std@0.200.0/semver/mod.ts#pin'
  • Specify a version range

    To override the default behavior, you can append a SemVer range to the url.

    import cheetah from 'https://deno.land/x/cheetah@v1.5.2/mod.ts#~v1.5'

Supported Registries

  • cdn.jsdelivr.net

  • deno.land

  • denopkg.com

  • esm.sh

  • jsr

    jsr: imports are treated slightly different. If you want to pin a dependency, you must specify an exact version, e.g. jsr:example@1.0.0, and if you want to make a dependency updatable, you must add a preceding ^, e.g. jsr:example@^1.0.0.

  • npm

    npm: imports are treated the same as jsr: imports.

  • raw.githubusercontent.com