Skip to content

Commit

Permalink
Merge branch 'main' into merge-618
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Nov 29, 2024
2 parents 6214189 + 23e31d9 commit d163650
Show file tree
Hide file tree
Showing 20 changed files with 627 additions and 523 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/BUG-REPORT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ body:
label: Version
description: What version are you using?
options:
- 'v3.4.1' # selfup {"extract":"v\\d[^']+","replacer":["bash","-c","git tag --list 'v3.*' | tail -1"]}
- 'v3.4.1' # selfup {"extract":"v\\d[^']+","replacer":["gh", "release", "view", "--json", "tagName", "--template", "{{ .tagName }}"]}
- other
default: 0
validations:
Expand Down
15 changes: 12 additions & 3 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"dependencyDashboard": true,
"labels": ["dependencies", "renovate"],
"enabledManagers": ["nix", "regex"],
"labels": [
"dependencies",
"renovate"
],
"enabledManagers": [
"nix",
"custom.regex"
],
"extends": [
"github>kachick/renovate-config-dprint#1.3.0",
"github>kachick/renovate-config-dprint:self"
Expand All @@ -12,7 +18,10 @@
},
"packageRules": [
{
"extends": ["packages:linters", "schedule:weekly"]
"extends": [
"packages:linters",
"schedule:weekly"
]
}
]
}
2 changes: 1 addition & 1 deletion .github/workflows/GH-761-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
}
]
- name: Upload dumps as an artifact
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: 'outputs-${{ github.job }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-${{ matrix.os }}-${{ matrix.wait-seconds-before-first-polling }}'
path: '${{ steps.wait.outputs.dump }}'
4 changes: 3 additions & 1 deletion .github/workflows/ci-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: DeterminateSystems/nix-installer-action@da36cb69b1c3247ad7a1f931ebfd954a1105ef14 # v14
- uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16
- uses: DeterminateSystems/magic-nix-cache-action@87b14cf437d03d37989d87f0fa5ce4f5dc1a330b # v8
- run: nix develop --command echo 'This step should be done before any other "nix develop" steps because of measuring Nix build time'
- run: nix develop --command makers setup
- name: Log current versions
run: nix develop --command makers deps
- name: Run linters
env:
GH_TOKEN: ${{ github.token }}
run: nix develop --command makers check
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.node-version'
cache: pnpm
Expand All @@ -37,7 +37,7 @@ jobs:
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.node-version'
cache: pnpm
Expand All @@ -50,7 +50,7 @@ jobs:
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.node-version'
cache: pnpm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: 'Dependency Review'
uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
with:
# https://spdx.org/licenses/
allow-licenses: MIT, BSD-3-Clause, BSD-2-Clause, 0BSD, Unlicense, ISC, Apache-2.0, CC-BY-4.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@44c470ffc35caa8b1eb3e8012ca53c2f9bea4eb5 # v2.3.6
- uses: gitleaks/gitleaks-action@83373cf2f8c4db6e24b41c1a9b086bb9619e9cd3 # v2.3.7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: denoland/setup-deno@5e01c016a857a4dbb5afe9d0f9733cd472cba985 # v1.5.1
- uses: denoland/setup-deno@4606d5cc6fb3f673efd4f594850e3f4b3e9d29cd # v2.0.0
with:
deno-version: '1.44.3' # selfup {"extract":"\\d[^']+","replacer":["bash","-c","deno --version | head -n 1"], "nth": 2}
deno-version: '2.0.6' # selfup {"extract":"\\d[^']+","replacer":["bash","-c","deno --version | head -n 1"], "nth": 2}
- run: deno lint
dprint:
timeout-minutes: 15
Expand All @@ -25,15 +25,15 @@ jobs:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: dprint/check@2f1cf31537886c3bfb05591c031f7744e48ba8a1 # v2.2
with:
dprint-version: '0.45.1' # selfup { "extract": "\\d[^']+", "replacer": ["dprint", "--version"], "nth": 2 }
dprint-version: '0.47.2' # selfup { "extract": "\\d[^']+", "replacer": ["dprint", "--version"], "nth": 2 }
typos:
timeout-minutes: 15
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
# Intentionally point to the latest version, not the version bound by nix.
# Because getting commit ref from version string requires network access.
- uses: crate-ci/typos@6802cc60d4e7f78b9d5454f6cf3935c042d5e1e3 # v1.26.0
- uses: crate-ci/typos@bd36f89fcd3424dcefd442894589e6ee572a59f2 # v1.28.1
with:
files: |-
.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/outputs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
ls -alh '${{ steps.wait.outputs.dump }}'
- name: Upload dumps as an artifact
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: 'outputs-${{ github.job }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}'
path: '${{ steps.wait.outputs.dump }}'
2 changes: 1 addition & 1 deletion .github/workflows/update-nixpkgs-and-versions-in-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
update-nixpkgs:
uses: kachick/selfup/.github/workflows/[email protected].3
uses: kachick/selfup/.github/workflows/[email protected].7
with:
app_id: ${{ vars.APP_ID }}
dry-run: ${{ github.event_name == 'pull_request' }}
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.15.1
20.18.0
8 changes: 8 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ script = [
"typos . .github .vscode",
"gitleaks detect",
"git ls-files '*.nix' | xargs nixfmt --check",
"git ls-files '.github' | xargs selfup list -check",
]

[tasks.test]
Expand Down Expand Up @@ -53,6 +54,12 @@ category = "Tools"
description = 'Parallel runner for all tests and linters'
run_task = { name = ["typecheck", "test", "lint", "build"], parallel = true }

[tasks.selfup]
category = "Tools"
script = [
"git ls-files '.github' | xargs selfup run",
]

[tasks.help]
category = "Tools"
description = 'Might help you - (This one)'
Expand All @@ -77,6 +84,7 @@ script = [
"jnv --version",
"pinact --version",
"gitleaks version",
"selfup -version",
]

[tasks.check_no_git_diff]
Expand Down
14 changes: 7 additions & 7 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32646,6 +32646,7 @@ var Options = z2.object({
var Path = z2.string().min(1);

// src/input.ts
import { env } from "node:process";
import { mkdtempSync } from "fs";
import { join } from "path";
function parseInput() {
Expand All @@ -32670,7 +32671,7 @@ function parseInput() {
(0, import_core.error)("github context has unexpected format: missing context.payload.pull_request.head.sha");
}
}
const tempRoot = Path.parse(process.env["RUNNER_TEMP"]);
const tempRoot = Path.parse(env["RUNNER_TEMP"]);
const tempDir = mkdtempSync(join(tempRoot, "wait-other-jobs-"));
const waitSecondsBeforeFirstPolling = parseInt(
(0, import_core.getInput)("wait-seconds-before-first-polling", { required: true, trimWhitespace: true }),
Expand Down Expand Up @@ -33647,7 +33648,7 @@ var Octokit = class {
auth;
};

// node_modules/.pnpm/@[email protected].2_@[email protected]/node_modules/@octokit/plugin-paginate-graphql/dist-bundle/index.js
// node_modules/.pnpm/@[email protected].4_@[email protected]/node_modules/@octokit/plugin-paginate-graphql/dist-bundle/index.js
var generateMessage = (path, cursorValue) => `The cursor at "${path.join(
","
)}" did not change its value "${cursorValue}" after a page transition. Please make sure your that your query is set up correctly.`;
Expand Down Expand Up @@ -33693,10 +33694,10 @@ var deepFindPathToProperty = (object, searchProp, path = []) => {
for (const key of Object.keys(object)) {
const currentPath = [...path, key];
const currentValue = object[key];
if (currentValue.hasOwnProperty(searchProp)) {
return currentPath;
}
if (isObject(currentValue)) {
if (currentValue.hasOwnProperty(searchProp)) {
return currentPath;
}
const result = deepFindPathToProperty(
currentValue,
searchProp,
Expand Down Expand Up @@ -33741,8 +33742,7 @@ var createIterator = (octokit) => {
return {
[Symbol.asyncIterator]: () => ({
async next() {
if (!nextPageExists)
return { done: true, value: {} };
if (!nextPageExists) return { done: true, value: {} };
const response = await octokit.graphql(
query,
parameters
Expand Down
4 changes: 2 additions & 2 deletions dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"yaml": { "quotes": "preferSingle" },
"excludes": ["**/node_modules", "**/*-lock.json", "lib/**", "dist/**", "pnpm-lock.yaml", "logs/**"],
"plugins": [
"https://plugins.dprint.dev/typescript-0.93.0.wasm",
"https://plugins.dprint.dev/json-0.19.3.wasm",
"https://plugins.dprint.dev/typescript-0.93.3.wasm",
"https://plugins.dprint.dev/json-0.19.4.wasm",
"https://plugins.dprint.dev/markdown-0.17.8.wasm",
"https://plugins.dprint.dev/toml-0.6.3.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm"
Expand Down
32 changes: 27 additions & 5 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 16 additions & 11 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,24 @@
# - https://discourse.nixos.org/t/differences-between-nix-channels/13998
# How to update the revision
# - `nix flake update --commit-lock-file` # https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake-update.html
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
selfup = {
url = "github:kachick/selfup/v1.1.7";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs =
{ self, nixpkgs }:
{
self,
nixpkgs,
selfup,
}:
let
# Candidates: https://github.com/NixOS/nixpkgs/blob/release-23.11/lib/systems/flake-systems.nix
forAllSystems = nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
# I don't have M1+ mac, providing this for macos-14 free runner https://github.com/actions/runner-images/issues/9741
"aarch64-darwin"
];
in
{
Expand All @@ -28,10 +33,9 @@
pkgs = nixpkgs.legacyPackages.${system};
in
{
default =
with pkgs;
mkShell {
buildInputs = [
default = pkgs.mkShell {
buildInputs =
(with pkgs; [
# For Nix environments
# https://github.com/NixOS/nix/issues/730#issuecomment-162323824
bashInteractive
Expand Down Expand Up @@ -60,8 +64,9 @@
jq
jnv
gitleaks
];
};
])
++ [ selfup.packages.${system}.default ];
};
}
);

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"engines": {
"node": "20.x"
},
"packageManager": "pnpm@8.15.5",
"packageManager": "pnpm@9.12.3",
"type": "module",
"scripts": {
"prebuild": "tsx scripts/rmrf.ts lib dist",
Expand All @@ -27,18 +27,18 @@
"@actions/github": "^6.0.0",
"@octokit/core": "^6.1.2",
"@octokit/graphql-schema": "^15.25.0",
"@octokit/plugin-paginate-graphql": "^5.2.2",
"@octokit/plugin-paginate-graphql": "^5.2.4",
"ansi-styles": "^6.2.1",
"temporal-polyfill": "^0.2.5",
"zod": "^3.23.8"
},
"devDependencies": {
"@tsconfig/node20": "^20.1.4",
"@tsconfig/strictest": "^2.0.5",
"@types/node": "^20.16.10",
"@types/node": "^20.17.9",
"esbuild": "0.24.0",
"recheck": "^4.4.5",
"tsx": "^4.19.1",
"typescript": "^5.6.2"
"tsx": "^4.19.2",
"typescript": "^5.7.2"
}
}
Loading

0 comments on commit d163650

Please sign in to comment.