Repository navigation
Conversation
- mime_type: contentType(".json") includes "; charset=UTF-8", and ".xyz"
is a known extension (chemical/x-xyz), so use ".unknown" for the
fallback case.
- url_parsing: changing host and protocol keeps the path, so href is
http://deno.com/api/deno?s=Deno.readFile.
- ulid: monotonicUlid(150000) starts with 0000004JFG. The old values
encoded a different time and contained "L", which is not in the ULID
alphabet.
- subprocess_env_cwd: a Deno child adds its node shim directory to PATH
even with clearEnv, so the example printed "has PATH: true". Check
HOME instead.
- debugging_with_console: the comma-separated console.log printed
double spaces, the template literal had no comma, and console.table
right-aligns numbers.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NQDmA3mwGfL83pbg9WQ6ey
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
I ran every script in
examples/scripts/with Deno 2.9.6 and compared each// outputcomment with what the line actually printed. I also ran theconsolesnippets in the debugging tutorial. These are the ones that print something else, on any machine:examples/scripts/mime_type.ts:contentType(".json")returnsapplication/json; charset=UTF-8, notapplication/json. This affects two lines. The fallback case usedarchive.xyz, but.xyzis a known type (chemical/x-xyz), so the fallback never ran. I changed it toarchive.unknown, which returnsundefined.examples/scripts/url_parsing.ts: settinghostandprotocolkeeps the path.hrefishttp://deno.com/api/deno?s=Deno.readFile, nothttp://deno.com/api?s=Deno.readFile.examples/scripts/ulid.ts:monotonicUlid(150000)always starts with0000004JFG, because the first 10 characters encode the time. The old values started with000XAL6S41, which is a different time and has anL, a letter that is not in the ULID alphabet. I replaced them with real output and added one line saying the tail is random.examples/scripts/subprocess_env_cwd.ts: withclearEnv: truethe child printedhas PATH: true. The child isdeno eval, and Deno puts its node shim directory onPATHwhen nonodeis found (documented inruntime/fundamentals/node.md). The example now checksHOME, which printshas HOME: false, and the comment says why.examples/tutorials/debugging_with_console.md:console.log("Hello, ", person.name, "from ", person.city)printsHello, Jane from New Yorkwith double spaces, and the template literal version had no comma. I fixed the code so both print the claimedHello, Jane from New York. Theconsole.tableoutput also right-aligns numbers, so I updated those two rows. I bumpedlast_modified.How I checked
deno run -Aand logged the line number of everyconsole.logcall, then compared the output with the comment on that line. All claims in the changed files now match. Forulid.tsthe random tail differs per run, but the0000004JFGprefix and the +1 steps match.env -i deno eval "console.log(Deno.env.toObject())"printsPATHandDENO_NODE_SHIM_ACTIVE, and withDENO_DISABLE_NODE_SHIM=1it prints neither. This is why the oldPATHcheck was wrong.deno fmt --checkpasses.deno task check:freshnesspasses.frontmatter_test.ts,sidebar_test.tsandapi_links_test.tspass.