Skip to content

Commit

Permalink
chore(nix): Update dependencies.
Browse files Browse the repository at this point in the history
Note: this `nixpkgs` update pulls in `prettier-3.0`, which changes the
default trailing comma setting from `"es5"` to `"all"`. This is
unwanted, so we add a `prettier.config.js` file to keep the old
default. Even then, `prettier-3.0` has added a few trailing commas
where previously we didn't have them.

We also upgrade the `pnpm`-installed `prettier` package to match
what's provided by `nixpkgs`. The former will be used by LSP and the
`pnpm format` shell command, and the latter is used by our Nix
`pre-commit` hooks.

Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/71fb97f0d875fd4de4994dfb849f2c75e17eb6c3' (2023-06-01)
  → 'github:hercules-ci/flake-parts/59cf3f1447cfc75087e7273b04b31e689a8599fb' (2023-08-01)
• Updated input 'flake-parts/nixpkgs-lib':
    'github:NixOS/nixpkgs/4f53efe34b3a8877ac923b9350c874e3dcd5dc0a?dir=lib' (2023-05-31)
  → 'github:NixOS/nixpkgs/9e1960bc196baf6881340d53dccb203a951745a2?dir=lib' (2023-08-01)
• Updated input 'hacknix':
    'github:hackworthltd/hacknix/d63a162941b7aceaef55ec9b26c8b94753dfe667' (2023-06-17)
  → 'github:hackworthltd/hacknix/7d0d518171938c2b95f7cb8da58f291f5ed22f30' (2023-07-30)
• Updated input 'hacknix/flake-parts':
    'github:hercules-ci/flake-parts/71fb97f0d875fd4de4994dfb849f2c75e17eb6c3' (2023-06-01)
  → 'github:hercules-ci/flake-parts/8e8d955c22df93dbe24f19ea04f47a74adbdc5ec' (2023-07-04)
• Updated input 'hacknix/flake-parts/nixpkgs-lib':
    'github:NixOS/nixpkgs/4f53efe34b3a8877ac923b9350c874e3dcd5dc0a?dir=lib' (2023-05-31)
  → 'github:NixOS/nixpkgs/4bc72cae107788bf3f24f30db2e2f685c9298dc9?dir=lib' (2023-06-29)
• Updated input 'hacknix/nix-darwin':
    'github:LnL7/nix-darwin/7c16d31383a90e0e72ace0c35d2d66a18f90fb4f' (2023-06-09)
  → 'github:LnL7/nix-darwin/16c07487ac9bc59f58b121d13160c67befa3342e' (2023-07-27)
• Updated input 'hacknix/nix-darwin/nixpkgs':
    'github:NixOS/nixpkgs/3a86856a13c88c8c64ea32082a851fefc79aa700' (2022-11-17)
  → 'path:/nix/store/22qgs3skscd9bmrxv9xv4q5d4wwm5ppx-source?lastModified=1687274257&narHash=sha256-TutzPriQcZ8FghDhEolnHcYU2oHIG5XWF%2B/SUBNnAOE%3D&rev=2c9ecd1f0400076a4d6b2193ad468ff0a7e7fdc5' (2023-06-20)
• Updated input 'hacknix/nixos-generators':
    'github:nix-community/nixos-generators/a54683aa7eff00ee5b33dec225525d0eb6ab02de' (2023-06-16)
  → 'github:nix-community/nixos-generators/b1171de4d362c022130c92d7c8adc4bf2b83d586' (2023-07-23)
• Updated input 'hacknix/nixos-generators/nixlib':
    'github:nix-community/nixpkgs.lib/961e99baaaa57f5f7042fe7ce089a88786c839f4' (2023-06-04)
  → 'github:nix-community/nixpkgs.lib/02fea408f27186f139153e1ae88f8ab2abd9c22c' (2023-07-16)
• Updated input 'hacknix/nixpkgs':
    'github:NixOS/nixpkgs/95c729c030b3011c5c89107ac9fa30f7249135fe' (2023-06-15)
  → 'github:NixOS/nixpkgs/f68a459f743733d53a0f5f9ce4b7b70eea5f8722' (2023-07-28)
• Updated input 'hacknix/pre-commit-hooks-nix':
    'github:cachix/pre-commit-hooks.nix/5b6b54d3f722aa95cbf4ddbe35390a0af8c0015a' (2023-06-13)
  → 'github:cachix/pre-commit-hooks.nix/9289996dcac62fd45836db7c07b87d2521eb526d' (2023-07-27)
• Updated input 'pre-commit-hooks-nix':
    'github:cachix/pre-commit-hooks.nix/5b6b54d3f722aa95cbf4ddbe35390a0af8c0015a' (2023-06-13)
  → 'github:cachix/pre-commit-hooks.nix/ebb43bdacd1af8954d04869c77bc3b61fde515e4' (2023-08-03)
  • Loading branch information
github-actions[bot] authored and dhess committed Aug 4, 2023
1 parent e0555f6 commit ba856d5
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 51 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ primer-api.json
src/primer-api/
licenses/
COPYING
flake.lock
77 changes: 38 additions & 39 deletions flake.lock

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

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"orval": "^6.16.0",
"postcss": "^8.4.24",
"postcss-import": "^15.1.0",
"prettier": "^2.8.8",
"prettier": "^3.0.1",
"storybook": "^7.0.22",
"tailwindcss": "3.3.2",
"ts-node": "^10.9.1",
Expand Down
10 changes: 8 additions & 2 deletions pnpm-lock.yaml

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

6 changes: 6 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import("prettier").Options} */
const config = {
trailingComma: "es5",
};

module.exports = config;

Check failure on line 6 in prettier.config.js

View workflow job for this annotation

GitHub Actions / deploy-to-chromatic

'module' is not defined

Check failure on line 6 in prettier.config.js

View workflow job for this annotation

GitHub Actions / build-frontend-pr / build-frontend

'module' is not defined
8 changes: 4 additions & 4 deletions src/components/TreeReactFlow/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { NodeFlavor } from "./Flavor";
/** A generic graph. */
export type Graph<
N extends { id: string },
E extends { source: string; target: string }
E extends { source: string; target: string },
> = {
nodes: N[];
edges: E[];
Expand All @@ -22,7 +22,7 @@ export type Graph<
export const graphMap = <
N1 extends { id: string },
N2 extends { id: string },
E extends { source: string; target: string }
E extends { source: string; target: string },
>(
{ nodes, edges }: Graph<N1, E>,
f: (n: N1) => N2
Expand All @@ -33,7 +33,7 @@ export const graphMap = <

export const combineGraphs = <
N extends { id: string },
E extends { source: string; target: string }
E extends { source: string; target: string },
>(
gs: Graph<N, E>[]
): Graph<N, E> => {
Expand Down Expand Up @@ -77,7 +77,7 @@ export const treeNodes = <N, E>({

export const treeToGraph = <
N extends { id: string },
E extends { source: string; target: string }
E extends { source: string; target: string },
>(
tree: Tree<N, E>
): Graph<N, E & { isRight: boolean }> => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/TreeReactFlow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ const makePrimerNode = async (
(child: PrimerNode, isRight: boolean) => PrimerEdge,
/* Nodes of nested trees, already positioned.
We have to lay these out first in order to know the dimensions of boxes to be drawn around them.*/
PrimerGraph[]
PrimerGraph[],
]
> => {
const selected =
Expand Down Expand Up @@ -1257,7 +1257,7 @@ const SetTreeReactFlowCallbacks = ({
* and safely act on that type in handlers. */
export const ReactFlowSafe = <
N extends RFNode<unknown> & { type: string },
E extends RFEdge<unknown> & { type: string }
E extends RFEdge<unknown> & { type: string },
>(
p: Omit<Parameters<typeof ReactFlow>[0], "onNodeClick" | "edgeTypes"> & {
nodes: N[];
Expand Down
4 changes: 2 additions & 2 deletions src/components/TreeReactFlow/layoutTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const layoutTree = <
E extends {
source: string;
target: string;
}
},
>(
primerTree: Tree<N, E>,
p: LayoutParams
Expand Down Expand Up @@ -86,7 +86,7 @@ const makeNodeMap = <
id: string;
data: { width: number; height: number };
},
E extends { source: string; target: string }
E extends { source: string; target: string },
>(
nodeInfos: NodeInfo<N>[],
edgeInfos: EdgeInfo<E>[],
Expand Down

0 comments on commit ba856d5

Please sign in to comment.