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

Fix formatting of long if/else chains #2369

Closed
wants to merge 2 commits into from

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Oct 27, 2023

PR Feedback: 👎

Description

This PR addresses the issue with the formatting of long if/else chains in the Squiggle language. Currently, the Prettier plugin does not break if/else statements, leading to poorly formatted code when dealing with long if/else chains. This PR modifies the Prettier plugin to handle the formatting of long if/else chains, improving the readability of the code.

Summary of Changes

  • Modified the parser.ts file in the packages/prettier-plugin/src/ directory to correctly identify and generate the Abstract Syntax Tree (AST) for long if/else chains.
  • Updated the printer.ts file in the packages/prettier-plugin/src/ directory to format long if/else chains by inserting line breaks between the if/else statements.
  • Added new test cases in the expressions.test.ts file in the packages/prettier-plugin/test/ directory to verify the correct formatting of long if/else chains.

Please review and merge this PR to improve the formatting of long if/else chains in the Squiggle language.

Fixes #2332.


🎉 Latest improvements to Sweep:

  • Sweep can now passively improve your repository! Check out Rules to learn more.

💡 To get Sweep to edit this pull request, you can:

  • Comment below, and Sweep can edit the entire PR
  • Comment on a file, Sweep will only modify the commented file
  • Edit the original issue to get Sweep to recreate the PR from scratch

@sweep-ai
Copy link
Contributor Author

sweep-ai bot commented Oct 27, 2023

Sandbox Executions

  • Check packages/prettier-plugin/src/parser.ts
Sandbox logs for
pnpm i 1/2 ✓
Scope: all 12 workspace projects
   ╭──────────────────────────────────────────────────────────────────╮
   │                                                                  │
   │                Update available! 8.9.2 → 8.10.0.                 │
   │   Changelog: https://github.com/pnpm/pnpm/releases/tag/v8.10.0   │
   │                Run "pnpm add -g pnpm" to update.                 │
   │                                                                  │
   │      Follow @pnpmjs for updates: https://twitter.com/pnpmjs      │
   │                                                                  │
   ╰──────────────────────────────────────────────────────────────────╯
Lockfile is up to date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +2161
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 2161, reused 0, downloaded 0, added 0
Progress: resolved 2161, reused 0, downloaded 1, added 0
Progress: resolved 2161, reused 0, downloaded 85, added 73
Progress: resolved 2161, reused 0, downloaded 216, added 204
Progress: resolved 2161, reused 0, downloaded 299, added 290
Progress: resolved 2161, reused 0, downloaded 329, added 316
Progress: resolved 2161, reused 0, downloaded 427, added 417
Progress: resolved 2161, reused 0, downloaded 549, added 537
Progress: resolved 2161, reused 0, downloaded 673, added 667
Progress: resolved 2161, reused 0, downloaded 742, added 731
Progress: resolved 2161, reused 0, downloaded 868, added 860
Progress: resolved 2161, reused 0, downloaded 971, added 961
Progress: resolved 2161, reused 0, downloaded 1132, added 1120
Progress: resolved 2161, reused 0, downloaded 1285, added 1277
Progress: resolved 2161, reused 0, downloaded 1448, added 1439
Progress: resolved 2161, reused 0, downloaded 1470, added 1462
Progress: resolved 2161, reused 0, downloaded 1483, added 1478
Progress: resolved 2161, reused 0, downloaded 1484, added 1478
Progress: resolved 2161, reused 0, downloaded 1575, added 1571
Progress: resolved 2161, reused 0, downloaded 1767, added 1765
Progress: resolved 2161, reused 0, downloaded 1891, added 1883
Progress: resolved 2161, reused 0, downloaded 1913, added 1903
Progress: resolved 2161, reused 0, downloaded 2012, added 2004
Progress: resolved 2161, reused 0, downloaded 2158, added 2160
Progress: resolved 2161, reused 0, downloaded 2159, added 2161, done
.../node_modules/@prisma/engines postinstall$ node scripts/postinstall.js
.../node_modules/@prisma/engines postinstall: Done
.../[email protected]/node_modules/esbuild postinstall$ node install.js
.../[email protected]/node_modules/prisma preinstall$ node scripts/preinstall-entry.js
.../[email protected]/node_modules/esbuild postinstall: Done
.../[email protected]/node_modules/prisma preinstall: Done
.../node_modules/@prisma/client postinstall$ node scripts/postinstall.js
.../node_modules/@prisma/client postinstall: prisma:warn We could not find your Prisma schema at `prisma/schema.prisma`.
.../node_modules/@prisma/client postinstall: If you have a Prisma schema file in a custom path, you will need to run
.../node_modules/@prisma/client postinstall: `prisma generate --schema=./path/to/your/schema.prisma` to generate Prisma Client.
.../node_modules/@prisma/client postinstall: If you do not have a Prisma schema file yet, you can ignore this message.
.../node_modules/@prisma/client postinstall: Done
.../[email protected]/node_modules/canvas install$ node-pre-gyp install --fallback-to-build --update-binary
.../[email protected]/node_modules/canvas install: node-pre-gyp info it worked if it ends with ok
.../[email protected]/node_modules/canvas install: node-pre-gyp info using [email protected]
.../[email protected]/node_modules/canvas install: node-pre-gyp info using [email protected] | linux | x64
.../[email protected]/node_modules/canvas install: node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v108-linux-glibc-x64.tar.gz
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libcairo.so.2
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libjpeg.so.62
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libxml2.so.2
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libgmodule-2.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpcre.so.1
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpixman-1.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/canvas.node
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libgdk_pixbuf-2.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpango-1.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libstdc++.so.6
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libfontconfig.so.1
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/canvas.node.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas.node.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/init.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/ImageData.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/register_font.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/Backends.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/CanvasRenderingContext2d.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/Image.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/backend/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/backend/PdfBackend.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/backend/Backend.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/backend/ImageBackend.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/backend/SvgBackend.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/CanvasPattern.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/bmp/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/bmp/BMPParser.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/closure.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/CanvasGradient.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/Canvas.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/color.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpangoft2-1.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libgio-2.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas.node
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/CanvasPattern.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/register_font.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/closure.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/ImageData.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/CanvasGradient.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/Backends.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/backend/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/backend/SvgBackend.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/backend/PdfBackend.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/backend/Backend.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/backend/ImageBackend.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/CanvasRenderingContext2d.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/init.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/bmp/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/bmp/BMPParser.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/color.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/Image.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/Canvas.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libgif.so.7
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libglib-2.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/librsvg-2.so.2
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libfribidi.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpng16.so.16
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libz.so.1
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpangocairo-1.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libffi.so.7
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libcairo-gobject.so.2
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libgobject-2.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libexpat.so.1
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libfreetype.so.6
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libharfbuzz.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info extracted file count: 74 
.../[email protected]/node_modules/canvas install: [canvas] Success: "/repo/node_modules/.pnpm/[email protected]/node_modules/canvas/build/Release/canvas.node" is installed via remote
.../[email protected]/node_modules/canvas install: node-pre-gyp info ok 
.../[email protected]/node_modules/canvas install: Done
.../[email protected]/node_modules/keytar install$ prebuild-install || npm run build
.../[email protected]/node_modules/keytar install: Done
 WARN  Failed to create bin at /repo/packages/components/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/prettier-plugin/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/hub/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/vscode-ext/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/squiggle-lang/dist/cli/index.js'
devDependencies:
+ @changesets/cli 2.26.2
+ prettier 3.0.3
+ turbo 1.10.14
+ turbo-ignore 1.10.14
 WARN  Failed to create bin at /repo/packages/prettier-plugin/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/prettier-plugin/node_modules/@quri/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/components/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/components/node_modules/@quri/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/vscode-ext/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/vscode-ext/node_modules/@quri/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/hub/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/hub/node_modules/@quri/squiggle-lang/dist/cli/index.js'
Done in 35.3s
trunk init 2/2 ✓
⡿ Downloading Trunk 1.17.1...
⡿ Downloading Trunk 1.17.1...
⢿ Downloading Trunk 1.17.1...
⣻ Downloading Trunk 1.17.1...
⣽ Downloading Trunk 1.17.1...
⣾ Downloading Trunk 1.17.1...
⣷ Downloading Trunk 1.17.1...
✔ Downloading Trunk 1.17.1... done
⡿ Verifying Trunk sha256...
✔ Verifying Trunk sha256... done
⡿ Unpacking Trunk...
✔ Unpacking Trunk... done


✔ 13 linters were enabled (.trunk/trunk.yaml)
  actionlint 1.6.26 (7 github-workflow files)
  checkov 3.0.12 (54 json, 16 yaml files)
  git-diff-check (934 files)
  markdownlint 0.37.0 (77 markdown files) (created .markdownlint.yaml)
  osv-scanner 1.4.2 (1 lockfile file)
  oxipng 9.0.0 (7 png files)
  prettier 3.0.3 (5 css, 1 graphql, 23 javascript, 54 json, 77 markdown, 679 typescript, 15 yaml files)
  shellcheck 0.9.0 (4 shell files) (created .shellcheckrc)
  shfmt 3.6.0 (4 shell files)
  taplo 0.8.1 (1 toml file)
  trivy 0.46.0 (16 yaml files)
  trufflehog 3.60.4 (935 files)
  yamllint 1.32.0 (15 yaml files) (created .yamllint.yaml)
Next Steps
 1. Read documentation
    Our documentation can be found at https://docs.trunk.io
 2. Get help and give feedback
    Join the Trunk community at https://slack.trunk.io
  • Check packages/prettier-plugin/src/printer.ts
Sandbox logs for
pnpm i 1/2 ✓
Scope: all 12 workspace projects
   ╭──────────────────────────────────────────────────────────────────╮
   │                                                                  │
   │                Update available! 8.9.2 → 8.10.0.                 │
   │   Changelog: https://github.com/pnpm/pnpm/releases/tag/v8.10.0   │
   │                Run "pnpm add -g pnpm" to update.                 │
   │                                                                  │
   │      Follow @pnpmjs for updates: https://twitter.com/pnpmjs      │
   │                                                                  │
   ╰──────────────────────────────────────────────────────────────────╯
Lockfile is up to date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +2161
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 2161, reused 0, downloaded 0, added 0
Progress: resolved 2161, reused 0, downloaded 166, added 163
Progress: resolved 2161, reused 0, downloaded 317, added 307
Progress: resolved 2161, reused 0, downloaded 502, added 495
Progress: resolved 2161, reused 0, downloaded 757, added 755
Progress: resolved 2161, reused 0, downloaded 963, added 957
Progress: resolved 2161, reused 0, downloaded 1295, added 1296
Progress: resolved 2161, reused 0, downloaded 1473, added 1465
Progress: resolved 2161, reused 0, downloaded 1483, added 1478
Progress: resolved 2161, reused 0, downloaded 1498, added 1484
Progress: resolved 2161, reused 0, downloaded 1603, added 1596
Progress: resolved 2161, reused 0, downloaded 1771, added 1768
Progress: resolved 2161, reused 0, downloaded 1856, added 1845
Progress: resolved 2161, reused 0, downloaded 1909, added 1904
Progress: resolved 2161, reused 0, downloaded 1923, added 1911
Progress: resolved 2161, reused 0, downloaded 1938, added 1925
Progress: resolved 2161, reused 0, downloaded 1969, added 1958
Progress: resolved 2161, reused 0, downloaded 2092, added 2083
Progress: resolved 2161, reused 0, downloaded 2158, added 2160
Progress: resolved 2161, reused 0, downloaded 2159, added 2161, done
.../node_modules/@prisma/engines postinstall$ node scripts/postinstall.js
.../node_modules/@prisma/engines postinstall: Done
.../[email protected]/node_modules/esbuild postinstall$ node install.js
.../[email protected]/node_modules/prisma preinstall$ node scripts/preinstall-entry.js
.../[email protected]/node_modules/prisma preinstall: Done
.../[email protected]/node_modules/esbuild postinstall: Done
.../node_modules/@prisma/client postinstall$ node scripts/postinstall.js
.../node_modules/@prisma/client postinstall: prisma:warn We could not find your Prisma schema at `prisma/schema.prisma`.
.../node_modules/@prisma/client postinstall: If you have a Prisma schema file in a custom path, you will need to run
.../node_modules/@prisma/client postinstall: `prisma generate --schema=./path/to/your/schema.prisma` to generate Prisma Client.
.../node_modules/@prisma/client postinstall: If you do not have a Prisma schema file yet, you can ignore this message.
.../node_modules/@prisma/client postinstall: Done
.../[email protected]/node_modules/canvas install$ node-pre-gyp install --fallback-to-build --update-binary
.../[email protected]/node_modules/canvas install: node-pre-gyp info it worked if it ends with ok
.../[email protected]/node_modules/canvas install: node-pre-gyp info using [email protected]
.../[email protected]/node_modules/canvas install: node-pre-gyp info using [email protected] | linux | x64
.../[email protected]/node_modules/canvas install: node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.11.2/canvas-v2.11.2-node-v108-linux-glibc-x64.tar.gz
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libcairo.so.2
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libjpeg.so.62
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libxml2.so.2
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libgmodule-2.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpcre.so.1
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpixman-1.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/canvas.node
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libgdk_pixbuf-2.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpango-1.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libstdc++.so.6
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libfontconfig.so.1
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/canvas.node.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas.node.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/init.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/ImageData.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/register_font.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/Backends.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/CanvasRenderingContext2d.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/Image.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/backend/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/backend/PdfBackend.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/backend/Backend.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/backend/ImageBackend.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/backend/SvgBackend.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/CanvasPattern.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/bmp/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/bmp/BMPParser.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/closure.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/CanvasGradient.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/Canvas.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/.deps/Release/obj.target/canvas/src/color.o.d
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpangoft2-1.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libgio-2.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas.node
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/CanvasPattern.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/register_font.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/closure.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/ImageData.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/CanvasGradient.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/Backends.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/backend/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/backend/SvgBackend.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/backend/PdfBackend.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/backend/Backend.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/backend/ImageBackend.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/CanvasRenderingContext2d.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/init.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/bmp/
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/bmp/BMPParser.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/color.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/Image.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/obj.target/canvas/src/Canvas.o
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libgif.so.7
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libglib-2.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/librsvg-2.so.2
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libfribidi.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpng16.so.16
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libz.so.1
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libpangocairo-1.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libffi.so.7
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libcairo-gobject.so.2
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libgobject-2.0.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libexpat.so.1
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libfreetype.so.6
.../[email protected]/node_modules/canvas install: node-pre-gyp info install unpacking Release/libharfbuzz.so.0
.../[email protected]/node_modules/canvas install: node-pre-gyp info extracted file count: 74 
.../[email protected]/node_modules/canvas install: [canvas] Success: "/repo/node_modules/.pnpm/[email protected]/node_modules/canvas/build/Release/canvas.node" is installed via remote
.../[email protected]/node_modules/canvas install: node-pre-gyp info ok 
.../[email protected]/node_modules/canvas install: Done
.../[email protected]/node_modules/keytar install$ prebuild-install || npm run build
.../[email protected]/node_modules/keytar install: Done
 WARN  Failed to create bin at /repo/packages/components/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/prettier-plugin/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/hub/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/vscode-ext/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/squiggle-lang/dist/cli/index.js'
devDependencies:
+ @changesets/cli 2.26.2
+ prettier 3.0.3
+ turbo 1.10.14
+ turbo-ignore 1.10.14
 WARN  Failed to create bin at /repo/packages/prettier-plugin/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/prettier-plugin/node_modules/@quri/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/components/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/components/node_modules/@quri/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/vscode-ext/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/vscode-ext/node_modules/@quri/squiggle-lang/dist/cli/index.js'
 WARN  Failed to create bin at /repo/packages/hub/node_modules/.bin/squiggle. ENOENT: no such file or directory, open '/repo/packages/hub/node_modules/@quri/squiggle-lang/dist/cli/index.js'
Done in 32.6s
trunk init 2/2 ✓
⡿ Downloading Trunk 1.17.1...
⡿ Downloading Trunk 1.17.1...
⢿ Downloading Trunk 1.17.1...
⣻ Downloading Trunk 1.17.1...
⣽ Downloading Trunk 1.17.1...
⣾ Downloading Trunk 1.17.1...
⣷ Downloading Trunk 1.17.1...
✔ Downloading Trunk 1.17.1... done
⡿ Verifying Trunk sha256...
✔ Verifying Trunk sha256... done
⡿ Unpacking Trunk...
✔ Unpacking Trunk... done


✔ 13 linters were enabled (.trunk/trunk.yaml)
  actionlint 1.6.26 (7 github-workflow files)
  checkov 3.0.12 (54 json, 16 yaml files)
  git-diff-check (934 files)
  markdownlint 0.37.0 (77 markdown files) (created .markdownlint.yaml)
  osv-scanner 1.4.2 (1 lockfile file)
  oxipng 9.0.0 (7 png files)
  prettier 3.0.3 (5 css, 1 graphql, 23 javascript, 54 json, 77 markdown, 679 typescript, 15 yaml files)
  shellcheck 0.9.0 (4 shell files) (created .shellcheckrc)
  shfmt 3.6.0 (4 shell files)
  taplo 0.8.1 (1 toml file)
  trivy 0.46.0 (16 yaml files)
  trufflehog 3.60.4 (935 files)
  yamllint 1.32.0 (15 yaml files) (created .yamllint.yaml)
Next Steps
 1. Read documentation
    Our documentation can be found at https://docs.trunk.io
 2. Get help and give feedback
    Join the Trunk community at https://slack.trunk.io
  • Check packages/prettier-plugin/test/expressions.test.ts
Run packages/prettier-plugin/test/expressions.test.ts through the sandbox.

@sweep-ai sweep-ai bot requested review from OAGr and berekuk as code owners October 27, 2023 22:16
@sweep-ai
Copy link
Contributor Author

sweep-ai bot commented Oct 27, 2023

Apply Sweep Rules to your PR?

  • Apply: Leftover TODOs in the code should be handled.
  • Apply: All new business logic should have corresponding unit tests in the tests/ directory.
  • Apply: Any clearly inefficient or repeated code should be optimized or refactored.

@sweep-ai sweep-ai bot added the sweep label Oct 27, 2023
@changeset-bot
Copy link

changeset-bot bot commented Oct 27, 2023

⚠️ No Changeset found

Latest commit: 3fb2032

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
quri-hub ❌ Failed (Inspect) Oct 27, 2023 10:16pm
squiggle-components ❌ Failed (Inspect) Oct 27, 2023 10:16pm
squiggle-website ❌ Failed (Inspect) Oct 27, 2023 10:16pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
quri-ui ⬜️ Ignored (Inspect) Oct 27, 2023 10:16pm

@OAGr OAGr closed this Oct 28, 2023
@berekuk berekuk deleted the sweep/fix-long-if-else-chains branch February 4, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Formatting long if/else chains
1 participant