Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nix and upgrade node #67

Merged
merged 3 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
use flake

source_env_if_exists .envrc.local
4 changes: 2 additions & 2 deletions .github/actions/setup-test-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ runs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 21

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
version: 8
run_install: false

- name: Get pnpm store directory
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.direnv
dist
node_modules
yarn.lock
vscode-profile*
isolate-*
flamegraph.html
flamegraph.html
*.perf
2 changes: 1 addition & 1 deletion Benchmarking.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ node --prof-process isolate-*.log
You can postprocess the generated `isolate-0x<something>.log` file into the data `flamegraph` expects, and then feed it to `flamegraph` to see a visual breakdown of performance. You can do that in one command like so:

```shell
node --prof-process --preprocess -j isolate-*.log | p flamebearer
node --prof-process --preprocess -j isolate-*.log | pnpm flamebearer
```

#### CPU profiling with VSCode
Expand Down
61 changes: 61 additions & 0 deletions flake.lock

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

33 changes: 33 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
description = "mobx-quick-tree development environment";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};

outputs = { self, flake-utils, nixpkgs }:
(flake-utils.lib.eachSystem [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
]
(system: nixpkgs.lib.fix (flake:
let
pkgs = nixpkgs.legacyPackages.${system};
in
rec {

packages =
rec {
bash = pkgs.bash;
nodejs = pkgs.nodejs_21;
pnpm = pkgs.nodejs_21.pkgs.pnpm;
};

devShell = pkgs.mkShell {
packages = builtins.attrValues packages;
};
}
)));
}
Loading