[WIP] use wildcard to check test outputs#3
Conversation
ry
left a comment
There was a problem hiding this comment.
Looks great! Thank you! I have a few comments...
|
|
||
| var WILDCARD = []byte("[WILDCARD]") | ||
|
|
||
| func Wildcard(pattern []byte, text []byte) bool { |
There was a problem hiding this comment.
I think this would be better inside the util.go file and tests in util_test.go. And it should be lowercase (not exported).
| return Wildcard([]byte(a), []byte(b)) | ||
| } | ||
|
|
||
| func TestWildcard(t *testing.T) { |
| var out bytes.Buffer | ||
| cmd.Stdout = &out | ||
| err = cmd.Run() | ||
| cmd.Wait() |
There was a problem hiding this comment.
Yikes. Was this causing a race condition?
Edit: I think this does nothing. Run already waits.
|
|
||
| actual, _, err := deno(jsFile) | ||
| fmt.Println(jsFile) | ||
| fmt.Println(string(actual)) |
|
@ry there is a bug which lays down somewhere else rather than this pr, the test result shows that |
ry
left a comment
There was a problem hiding this comment.
I've solved the bug you were having and made some other fix ups - pushed to your branch: qti3e/deno@d26704a
I will squash it all into one commit when landing.
Thanks Parsa!
|
|
||
| var WILDCARD = []byte("[WILDCARD]") | ||
|
|
||
| func wildcard(pattern []byte, text []byte) bool { |
There was a problem hiding this comment.
I think this should operate on strings instead of byte arrays?
|
My pleasure Ryan! (thanks for fixups btw!) |
- extract_tarball_gz: skip symlink/hardlink tar entries (path-traversal via a symlink to an outside dir + a file nested under it, on arbitrary registry/@jsr content). - Rebase the user's compilerOptions.paths + baseUrl onto .deno/ (the generated tsconfig lives one level down); they were copied verbatim, so `~/*`->`./src/*` resolved to .deno/src/* and broke every import through a user alias. Dropped paths/baseUrl from passthrough; added rebase_onto_deno_dir + test. - sync_types_command: check node_modules/.deno components on the path RELATIVE to the project root, so an ancestor dir named node_modules/.deno no longer filters every root away (empty graph, no error). - ensure_root_tsconfig: edit the existing tsconfig by byte-range splice via the jsonc AST instead of re-serializing, preserving the user's comments and formatting (previously silently stripped on the first sync). - strip_top_level_type_decls: bound the leading-comment back-pop to contiguous comment lines (an unbounded 'pop until /**' could delete earlier decls), and make the type-alias skip track bracket depth so an interior ';' doesn't end it early. Deferred (noted on the PR): resolution flags incl --allow-import (#3), skipped-remote policy (#4), import-map scopes (#8), @types/node via #35889 (#10).
No description provided.