8000 feat(napi/parser): improved `console.log` output for lazy deserialized AST by overlookmotel · Pull Request #11642 · oxc-project/oxc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(napi/parser): improved console.log output for lazy deserialized AST #11642

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

Conversation

overlookmotel
Copy link
Contributor
@overlookmotel overlookmotel commented Jun 12, 2025

Improve the output from console.log when printing a lazy-deserialized AST.

Previously console.log(program) printed Program { type: 'Program' }. Now it prints much the same as a normal (eagerly deserialized) AST:

Program {
  type: 'Program',
  start: 0,
  end: 17,
  sourceType: SourceType { sourceType: 'module' },
  hashbang: null,
  body: [
    VariableDeclaration {
      type: 'VariableDeclaration',
      start: 0,
      end: 10,
      kind: 'let',
      declarations: [Array],
      declare: false
    }
  ]
}

@github-actions github-actions bot added the A-ast-tools Area - AST tools label Jun 12, 2025
Copy link
Contributor Author

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added the C-enhancement Category - New feature or request label Jun 12, 2025
@overlookmotel overlookmotel force-pushed the 06-12-feat_napi_parser_improved_console.log_output_for_lazy_deserialized_ast branch from 8e1977a to 65de7b8 Compare June 12, 2025 15:55
@overlookmotel overlookmotel marked this pull request as ready for review June 12, 2025 15:58
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Jun 12, 2025
Copy link
Contributor Author
overlookmotel commented Jun 12, 2025

Merge activity

…d AST (#11642)

Improve the output from `console.log` when printing a lazy-deserialized AST.

Previously `console.log(program)` printed `Program { type: 'Program' }`. Now it prints much the same as a normal (eagerly deserialized) AST:

```
Program {
  type: 'Program',
  start: 0,
  end: 17,
  sourceType: SourceType { sourceType: 'module' },
  hashbang: null,
  body: [
    VariableDeclaration {
      type: 'VariableDeclaration',
      start: 0,
      end: 10,
      kind: 'let',
      declarations: [Array],
      declare: false
    }
  ]
}
```
@graphite-app graphite-app bot force-pushed the 06-12-feat_napi_parser_improved_console.log_output_for_lazy_deserialized_ast branch from 65de7b8 to 5860195 Compare June 12, 2025 16:05
@graphite-app graphite-app bot merged commit 5860195 into main Jun 12, 2025
15 checks passed
@graphite-app graphite-app bot deleted the 06-12-feat_napi_parser_improved_console.log_output_for_lazy_deserialized_ast branch June 12, 2025 16:10
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ast-tools Area - AST tools C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0