diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b914efd7..812db245 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,5 +55,5 @@ jobs: - uses: denoland/setup-deno@v1 with: # Keep same version as used in *.nix - deno-version: '1.35.1' + deno-version: '1.36.0' - run: deno lint diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3a3dd696..e24aac32 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: - uses: dprint/check@v2.2 with: # Keep same version as used in *.nix - dprint-version: '0.37.1' + dprint-version: '0.40.2' typos: timeout-minutes: 15 @@ -26,7 +26,7 @@ jobs: steps: - uses: actions/checkout@v3 # Keep same version as used in *.nix - - uses: crate-ci/typos@v1.16.1 + - uses: crate-ci/typos@v1.16.8 with: files: | . diff --git a/dprint.json b/dprint.json index a8d539e0..d45adba7 100644 --- a/dprint.json +++ b/dprint.json @@ -13,13 +13,12 @@ "printWidth": 120, "singleQuote": true }, - "includes": ["**/*.{ts,tsx,js,jsx,cjs,mjs,json,jsonc,md,yml,toml}"], "excludes": ["**/node_modules", "**/*-lock.json", "lib/**", "dist/**"], "plugins": [ - "https://plugins.dprint.dev/typescript-0.85.1.wasm", + "https://plugins.dprint.dev/typescript-0.86.2.wasm", "https://plugins.dprint.dev/json-0.17.4.wasm", - "https://plugins.dprint.dev/markdown-0.15.3.wasm", + "https://plugins.dprint.dev/markdown-0.16.0.wasm", "https://plugins.dprint.dev/toml-0.5.4.wasm", - "https://plugins.dprint.dev/prettier-0.26.6.json@0118376786f37496e41bb19dbcfd1e7214e2dc859a55035c5e54d1107b4c9c57" + "https://plugins.dprint.dev/prettier-0.27.0.json@3557a62b4507c55a47d8cde0683195b14d13c41dda66d0f0b0e111aed107e2fe" ] } diff --git a/flake.lock b/flake.lock index 16053a39..6c1cc65e 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "lastModified": 1692799911, + "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", "owner": "numtide", "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", "type": "github" }, "original": { @@ -18,26 +18,43 @@ "type": "github" } }, - "nixpkgs": { + "nixpkgs-stable": { "locked": { - "lastModified": 1689772181, - "narHash": "sha256-lYyA5ZLz3wdm442AZdXO1nk6Hd+ekxbBWqRX/c+1hFw=", + "lastModified": 1693183237, + "narHash": "sha256-c7OtyBkZ/vZE/WosBpRGRtkbWZjDHGJP7fg1FyB9Dsc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "21061e4e4a0f46a6f487c7583be916e4e031ee4e", + "rev": "ea5234e7073d5f44728c499192544a84244bf35a", "type": "github" }, "original": { "owner": "NixOS", + "ref": "release-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1693099187, + "narHash": "sha256-FXCc6OIghv9k4xYOhSMZI6bj7o56S8BJKzKtTKzdUVQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "cf2004afe4d4b95a295c63c911e949e40915eedb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", "repo": "nixpkgs", - "rev": "21061e4e4a0f46a6f487c7583be916e4e031ee4e", "type": "github" } }, "root": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs-stable": "nixpkgs-stable", + "nixpkgs-unstable": "nixpkgs-unstable" } }, "systems": { diff --git a/flake.nix b/flake.nix index eb573fd8..51f9b823 100644 --- a/flake.nix +++ b/flake.nix @@ -1,27 +1,37 @@ { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/21061e4e4a0f46a6f487c7583be916e4e031ee4e"; + # Candidate channels + # - https://github.com/kachick/anylang-template/issues/17 + # - 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-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-stable.url = "github:NixOS/nixpkgs/release-23.05"; flake-utils.url = "github:numtide/flake-utils"; }; - outputs = { self, nixpkgs, flake-utils }: + outputs = { self, nixpkgs-unstable, nixpkgs-stable, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let # https://discourse.nixos.org/t/mark-a-devshell-dependency-as-insecure/24354/3 - pkgs = import nixpkgs + unstable-pkgs = import nixpkgs-unstable { inherit system; config = { permittedInsecurePackages = [ - "nodejs-16.20.1" + "nodejs-16.20.2" ]; }; }; + stable-pkgs = nixpkgs-stable.legacyPackages.${system}; in { - devShells.default = with pkgs; + devShells.default = with unstable-pkgs; mkShell { buildInputs = [ + # https://github.com/NixOS/nix/issues/730#issuecomment-162323824 + bashInteractive + nodejs-16_x deno dprint @@ -30,7 +40,9 @@ nixpkgs-fmt typos actionlint - hadolint + # Avoided broken hadolint in latest + # https://github.com/NixOS/nixpkgs/pull/240387#issuecomment-1686601267 + stable-pkgs.hadolint ]; }; });