Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hasundue/molt-action
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0-rc.10
Choose a base ref
...
head repository: hasundue/molt-action
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.0.0-rc.11
Choose a head ref
  • 9 commits
  • 11 files changed
  • 1 contributor

Commits on Jul 30, 2024

  1. Copy the full SHA
    d3aa040 View commit details
  2. Copy the full SHA
    ccefa9c View commit details
  3. Copy the full SHA
    183add1 View commit details
  4. Copy the full SHA
    6a5599a View commit details
  5. Copy the full SHA
    d51d7d3 View commit details
  6. Copy the full SHA
    a0e6348 View commit details
  7. Copy the full SHA
    deffc07 View commit details
  8. Copy the full SHA
    7005e81 View commit details
  9. chore: release 1.0.0-rc.11

    hasundue committed Jul 30, 2024
    Copy the full SHA
    ab514dd View commit details
Showing with 196 additions and 261 deletions.
  1. +3 −3 .github/workflows/integration.yml
  2. +0 −22 .github/workflows/publish.yml
  3. +14 −1 .github/workflows/release.yml
  4. +17 −18 README.md
  5. +2 −7 action.yml
  6. +8 −8 deno.json
  7. +134 −163 deno.lock
  8. +0 −5 src/inputs.ts
  9. +9 −9 src/report_test.ts
  10. +2 −3 test/fixtures/deno.json
  11. +7 −22 test/fixtures/deno.lock
6 changes: 3 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ jobs:
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.action.outputs.dependencies }}
expected: '["@actions/core","@molt/core","deno.land/x/hono"]'
expected: '["@luca/flag","deno.land/std"]'

- name: Check updated files
uses: nick-fields/assert-action@v2
@@ -44,13 +44,13 @@ jobs:
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.action.outputs.summary }}
expected: 'chore: update dependencies'
expected: 'chore: update @luca/flag and deno.land/std'

- name: Check report
uses: nick-fields/assert-action@v2
with:
actual: ${{ steps.action.outputs.report }}
expected: '#### :package: @actions/core [1.10.0](https://www.npmjs.com/package/@actions/core/v/1.10.0)'
expected: '#### :package: @luca/flag [1.0.0](https://jsr.io/@luca/flag/1.0.0)'
comparison: startsWith

test-ts:
22 changes: 0 additions & 22 deletions .github/workflows/publish.yml

This file was deleted.

15 changes: 14 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -9,7 +9,20 @@ defaults:


jobs:
release:
publish:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4

- name: Publish package
run: npx jsr publish

tag:
runs-on: ubuntu-latest

permissions:
35 changes: 17 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -28,24 +28,23 @@ them are inherited from
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
and passed through to it.

| Name | Description | Default |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| `author` | Author of the pull request in the format of `Display Name <email@adress.com>`. | `${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>` |
| `base` | Base branch to create the pull request against. | The branch checked out in the workflow |
| `branch` | Head branch to create the pull request from. | `molt-action` |
| `commit` | Whether to commit changes locally. | `true` |
| `commit-prefix` | Prefix for commit messages. | `chore:` |
| `committer` | Name of the committer in the format of `Display Name <email@address.com>` | `github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>` |
| `config` | Relative path to the configuration file including imports from the root directory. Ignored if `root` is not given. Set to `false` to disable auto discovery. | `deno.json` or `deno.jsonc` if available |
| `draft` | Whether to create a draft pull request. | `false` |
| `labels` | Comma or newline-separated list of labels to add to the pull request. | `dependencies` |
| `lock` | Relative path to the lock file to update from the root directory. Ignored if `root` is not given. Set to `false` to disable auto discovery. | `deno.lock` if available |
| `pull-request` | Whether to create a pull request. | `true` |
| `resolve-imports` | Resolve local imports to find dependencies recursively. | `false` |
| `root` | Root directory of the relevant source files. | The shallowest directory containing `deno.json` or `deno.jsonc` if available, otherwise the repository root |
| `source` | Source files to update dependencies in, specified as glob patterns. | If a Deno configuration file with imports is specified or found, this defaults to nothing. Otherwise, it defaults to `**/*.ts`. |
| `token` | GitHub token with permissions `contents: write` and `pull-requests: write` or a repo scoped personal access token (PAT). | `${{ secrets.GITHUB_TOKEN }}` |
| `write` | Whether to write changes to disk. Forced to `true` if `commit` or `pull-request` is `true`. | `true` |
| Name | Description | Default |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| `author` | Author of the pull request in the format of `Display Name <email@adress.com>`. | `${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>` |
| `base` | Base branch to create the pull request against. | The branch checked out in the workflow |
| `branch` | Head branch to create the pull request from. | `molt-action` |
| `commit` | Whether to commit changes locally. | `true` |
| `commit-prefix` | Prefix for commit messages. | `chore:` |
| `committer` | Name of the committer in the format of `Display Name <email@address.com>` | `github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>` |
| `config` | Relative path to the configuration file including imports from the root directory. Ignored if `root` is not given. Set to `false` to disable auto discovery. | `deno.json` or `deno.jsonc` if available |
| `draft` | Whether to create a draft pull request. | `false` |
| `labels` | Comma or newline-separated list of labels to add to the pull request. | `dependencies` |
| `lock` | Relative path to the lock file to update from the root directory. Ignored if `root` is not given. Set to `false` to disable auto discovery. | `deno.lock` if available |
| `pull-request` | Whether to create a pull request. | `true` |
| `root` | Root directory of the relevant source files. | The shallowest directory containing `deno.json` or `deno.jsonc` if available, otherwise the repository root |
| `source` | Source files to update dependencies in, specified as glob patterns. | If a Deno configuration file with imports is specified or found, this defaults to nothing. Otherwise, it defaults to `**/*.ts`. |
| `token` | GitHub token with permissions `contents: write` and `pull-requests: write` or a repo scoped personal access token (PAT). | `${{ secrets.GITHUB_TOKEN }}` |
| `write` | Whether to write changes to disk. Forced to `true` if `commit` or `pull-request` is `true`. | `true` |

### Outputs

9 changes: 2 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ inputs:

cache-key-suffix:
description: Suffix for the cache key (development purposes only).
default: 1.0.0-rc.10
default: 1.0.0-rc.11

commit:
description: Whether to commit changes locally.
@@ -64,10 +64,6 @@ inputs:
description: Whether to create a pull request.
default: true

resolve-imports:
description: Resolve local imports to find dependencies recursively.
default: false

root:
description: >
Root directory of the relevant source files. Defaults to the shallowest
@@ -77,7 +73,7 @@ inputs:
script:
description: >
Specifier for the main script to run (development purposes only).
default: jsr:@molt/action@1.0.0-rc.10
default: jsr:@molt/action@1.0.0-rc.11

source:
description: >
@@ -148,7 +144,6 @@ runs:
INPUT_COMMIT-PREFIX: ${{ inputs.commit-prefix }}
INPUT_CONFIG: ${{ inputs.config }}
INPUT_LOCK: ${{ inputs.lock }}
INPUT_RESOLVE-IMPORTS: ${{ inputs.resolve-imports }}
INPUT_ROOT: ${{ inputs.root }}
INPUT_SOURCE: ${{ inputs.source }}
INPUT_WRITE: ${{ inputs.pr || inputs.write }}
16 changes: 8 additions & 8 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@molt/action",
"version": "1.0.0-rc.10",
"version": "1.0.0-rc.11",
"exports": "./main.ts",
"publish": {
"include": [
@@ -18,16 +18,16 @@
"@actions/github": "npm:@actions/github@^6.0.0",
"@core/match": "jsr:@core/match@^0.3.1",
"@core/unknownutil": "jsr:@core/unknownutil@^3.18.1",
"@molt/core": "jsr:@molt/core@^0.19.0-rc.9",
"@molt/integration": "jsr:@molt/integration@^0.18.0-rc.1",
"@molt/lib": "jsr:@molt/lib@^0.19.0-rc.1",
"@molt/core": "jsr:@molt/core@^0.19.0",
"@molt/integration": "jsr:@molt/integration@^0.19.0",
"@molt/lib": "jsr:@molt/lib@^0.19.0",
"@std/assert": "jsr:@std/assert@^1.0.0",
"@std/collections": "jsr:@std/collections@^1.0.0",
"@std/fs": "jsr:@std/fs@^0.229.0",
"@std/jsonc": "jsr:@std/jsonc@^0.224.0",
"@std/fs": "jsr:@std/fs@^1.0.0",
"@std/jsonc": "jsr:@std/jsonc@^1.0.0",
"@std/path": "jsr:@std/path@^1.0.0",
"@std/semver": "jsr:@std/semver@^0.224.3",
"@std/yaml": "jsr:@std/yaml@^0.224.0",
"@std/yaml": "jsr:@std/yaml@^1.0.0",
"dedent": "npm:dedent@^1.5.3"
},
"tasks": {
@@ -36,7 +36,7 @@
"check": "deno check **/*.ts",
"pre-commit": "deno fmt && deno lint && deno task check && deno task test",
"test": "deno test --allow-env --allow-read --allow-write=. --allow-net --allow-run=deno --env --no-check --unstable-kv",
"update": "deno run --unstable-kv --allow-env --allow-read --allow-write --allow-net --allow-run=git,deno jsr:@molt/cli@0.19.0-rc.7",
"update": "deno run --unstable-kv --allow-env --allow-read --allow-write --allow-net --allow-run=git,deno jsr:@molt/cli@0.19.0",
"update:commit": "deno task -q update --commit --pre-commit=check,test --prefix 'chore:'"
}
}
Loading