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

Update to Prettier 2 and use ES Private Fields #4498

Merged
merged 13 commits into from
Mar 28, 2020
Merged

Conversation

kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Mar 27, 2020

Fixes #3980

This PR provides an update to Prettier 2 which unblocks the ability to utilise ES private fields (instead of TypeScript private). This update also contains a lot of updates to some types which align better to current versions of TypeScript. In particular lots of edits of dom_types.ts to align to lib.dom.d.ts.

There were two areas that got too complex to clean up at the moment:

  • Events
  • Streams

Both of these areas, while great code contributions, don't align well to existing conventions in the internal of Deno and, in my opinion, should be restructured. In particular the ways they hide information (Events used a bit of private and a bit of symbols but leaks these implementations into the type library, and wasn't consistent while Streams uses symbols which need to convert to ES private, but it also uses a really strange form of "abstract" classes declare class which makes lots of things hard to unpick and the types aren't well aligned to what is in lib.dom.d.ts which also makes it hard to have fully complaint streams). I will open two other issues related to these.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ry any objections on landing this one?

@ry
Copy link
Member

ry commented Mar 28, 2020

@kitsonk Thanks for doing this!

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ry ry merged commit bced525 into denoland:master Mar 28, 2020
dubiousjim added a commit to dubiousjim/deno that referenced this pull request Mar 29, 2020
* denoland/master: (35 commits)
  Ignore flaky test cafile_info (denoland#4517)
  fix(inspector): proper error message on port collision (denoland#4514)
  feat: Added colors to doc output (denoland#4518)
  v0.38.0
  feat: Add "deno doc" subcommand (denoland#4500)
  Update to Prettier 2 and use ES Private Fields (denoland#4498)
  upgrade: dprint 0.9.6 (denoland#4509)
  upgrade: rusty_v8 to v0.3.9 (denoland#4505)
  feat: Support Inspector / Chrome Devtools (denoland#4484)
  Improve isatty and kill API docs; Deno.kill() - throw on Windows (denoland#4497)
  refactor: rename ConsoleOptions to InspectOptions (denoland#4493)
  upgrade: dprint 0.9.5 (denoland#4491)
  feat: window.close() (denoland#4474)
  errors: replace .lines with explicit .split newline (denoland#4483)
  doc: improve various API docs and include examples (denoland#4486)
  hide source line if error message longer than 150 chars (denoland#4487)
  fix: add fsEvent notify::Error casts (denoland#4488)
  feat: add queueMicrotask to d.ts (denoland#4477)
  Revert "avoid using same port number for test (denoland#4147)"
  docs: update manual about how to run tests for std (denoland#4462)
  ...
dubiousjim added a commit to dubiousjim/deno that referenced this pull request Mar 29, 2020
* denoland/master:
  Ignore flaky test cafile_info (denoland#4517)
  fix(inspector): proper error message on port collision (denoland#4514)
  feat: Added colors to doc output (denoland#4518)
  v0.38.0
  feat: Add "deno doc" subcommand (denoland#4500)
  Update to Prettier 2 and use ES Private Fields (denoland#4498)
  upgrade: dprint 0.9.6 (denoland#4509)
  upgrade: rusty_v8 to v0.3.9 (denoland#4505)
  feat: Support Inspector / Chrome Devtools (denoland#4484)
  Improve isatty and kill API docs; Deno.kill() - throw on Windows (denoland#4497)
  refactor: rename ConsoleOptions to InspectOptions (denoland#4493)
  upgrade: dprint 0.9.5 (denoland#4491)
  feat: window.close() (denoland#4474)
  errors: replace .lines with explicit .split newline (denoland#4483)
  doc: improve various API docs and include examples (denoland#4486)
  hide source line if error message longer than 150 chars (denoland#4487)
  fix: add fsEvent notify::Error casts (denoland#4488)
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 21, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adopt ECMAScript Private Fields
3 participants