📝 Switch to ?raw imports for advents#6830
Conversation
Replace the function-returning-function pattern in buggy.mjs files with direct exports, and use ?raw imports to get the source code as text for StackBlitz sandboxes and downloads. This eliminates the need for the String(fn) + regex extraction workaround in AdventOfTheDayBuilder. https://claude.ai/code/session_016asJDuBocZ76J4KQrxy8A9
|
|
👋 It looks like the PR template was not used for this pull request. Please edit the PR description to use the template, or close this PR and open a new one that uses it. The template includes:
Thank you for your contribution! 🙏 |
@fast-check/ava
fast-check
@fast-check/jest
@fast-check/packaged
@fast-check/poisoning
@fast-check/vitest
@fast-check/worker
commit: |
|
@claude fix typecheck website typecheck: blog/2024-12-01-advent-of-pbt-day-1/AdventOfTheDayBuilder.tsx(61,13): error TS7022: 'buggyAdvent' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. |
|
Claude finished @dubzzz's task in 1m 29s —— View job Fixed TypeScript errors in AdventOfTheDayBuilder.tsx
Root cause: On lines 61 and 80, Fix: Renamed the local variable to |
|
@claude fix {"message":" ⚠ Critical dependency: require function is used in a way in which dependencies cannot be statically extracted\n ╭─[3:24]\n 1 │ (function (factory) {\n 2 │ if (typeof module === "object" && typeof module.exports === "object") {\n 3 │ var v = factory(require, exports);\n · ───────\n 4 │ if (v !== undefined) module.exports = v;\n 5 │ }\n ╰────\n","moduleIdentifier":"/home/runner/work/fast-check/fast-check/node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/umd/main.js","moduleName":"../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/umd/main.js","loc":"3:25-31","compilerPath":"server"}
Error: Unable to build website for locale en.
|
|
Claude finished @dubzzz's task in 3m 43s —— View job Fixed SSG build failure (
|
Rename local `buggyAdvent` to `buggyFn` to avoid shadowing the outer destructured variable, which caused TS7022 and TS2448 errors. Co-authored-by: Nicolas DUBIEN <dubzzz@users.noreply.github.com>
Use TextEncoder for Unicode-safe base64 encoding in AdventPlayground download link, and rename shadowing buggyAdvent variable to resolvedBuggyAdvent in AdventOfTheDayBuilder. Co-authored-by: Nicolas DUBIEN <dubzzz@users.noreply.github.com>
?raw imports for advents
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6830 +/- ##
=======================================
Coverage 94.86% 94.86%
=======================================
Files 209 209
Lines 5665 5665
Branches 1489 1489
=======================================
Hits 5374 5374
Misses 283 283
Partials 8 8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Replace the function-returning-function pattern in buggy.mjs files with
direct exports, and use ?raw imports to get the source code as text for
StackBlitz sandboxes and downloads. This eliminates the need for the
String(fn) + regex extraction workaround in AdventOfTheDayBuilder.
https://claude.ai/code/session_016asJDuBocZ76J4KQrxy8A9