Skip to content

Add dts bundling#20

Closed
jakebailey wants to merge 1 commit intotransform-stack-commit-17from
transform-stack-commit-18
Closed

Add dts bundling#20
jakebailey wants to merge 1 commit intotransform-stack-commit-17from
transform-stack-commit-18

Conversation

@jakebailey
Copy link
Owner

@jakebailey jakebailey commented Sep 13, 2022

This adds a "small" d.ts bundler script. This script is very basic,
using Node printing to produce its output. Generally speaking, this is
inadvisable as it completely disregards name shadowing, globals, etc.
However, in our case, we don't care about the globals, and we can opt to
restructure our codebase in order to avoid conflict, which we largely
had to do anyway when we were namespaces and everything was in scope.


Please do not comment on this PR. Depending on how this set of PRs evolves, this PR's contents may change entirely based on the order of commits.

This PR is a part of a stack:

  1. Make a few changes to allow all code to be loaded as one project
  2. Explicitly reference ts namespace in tsserverlibrary
  3. Generated module conversion step - unindent
  4. Generated module conversion step - explicitify
  5. Generated module conversion step - stripNamespaces
  6. Generated module conversion step - inlineImports
  7. Generated module conversion step - .git-ignore-blame-revs
  8. Add gitlens settings suggestion
  9. Make processDiagnosticMessages generate a module
  10. Fix up linting, make lint clean
  11. Undo changes needed to load codebase into ts-morph
  12. Add JSDoc eslint rule
  13. Fix all internal JSDoc comments
  14. Convert require calls to imports
  15. Remove typescriptServices, protocol.d.ts, typescript_standalone.d.ts
  16. Get codebase building pre bundling
  17. Add build via esbuild
  18. Add dts bundling (this PR)
  19. Consolidate checks that test if the current environment is Node
  20. Add ts to globalThis in run.js for convenience during debugging
  21. Rename Gulpfile to Herebyfile for improved git diff
  22. Change build system to hereby
  23. Update baselines for corrected line endings in lib files
  24. Use jsonc-parser instead of LKG compiler in build
  25. Modernize localize script, use new XML library
  26. Don't use needsUpdate for quick tasks
  27. Remove mkdirp
  28. Export ts namespace from tsserver for hacky-post patching
  29. Directly import namespaces for improved esbuild output
  30. Ensure ts object passed to plugins contains deprecatedCompat declarations
  31. Move compiler-debug into Debug namespace, which allows the compiler to be tree shaken
  32. Remove Promise redeclaration
  33. Remove globalThisShim and globalThis modification for TypeScriptServicesFactory
  34. Disable slow CodeQL queries
  35. Remove outFiles from launch.json
  36. Remove dynamicImport and setDynamicImport

@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from bb294f7 to b8bbc7b Compare September 13, 2022 20:28
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from 9702a2e to 63ac570 Compare September 13, 2022 20:28
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from b8bbc7b to 638f503 Compare September 13, 2022 21:03
@jakebailey jakebailey changed the title Fix all at-internal comments, which need to be attached to a declaration Work around api-extractor import bug Sep 13, 2022
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from 63ac570 to cec2d97 Compare September 13, 2022 21:03
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from 638f503 to 413881f Compare September 13, 2022 21:47
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from cec2d97 to 07f5640 Compare September 13, 2022 21:47
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch 2 times, most recently from 2f311a5 to 2ceb74c Compare September 13, 2022 23:22
@jakebailey jakebailey changed the title Work around api-extractor import bug Hack something together to test esbuild Sep 13, 2022
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from 07f5640 to 9e2d765 Compare September 13, 2022 23:22
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from 2ceb74c to cf0ff15 Compare September 14, 2022 17:26
@jakebailey jakebailey changed the title Hack something together to test esbuild Hack something together to test various builds Sep 14, 2022
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from 9e2d765 to e9c4c4c Compare September 14, 2022 17:26
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from cf0ff15 to d5e59b6 Compare September 16, 2022 04:36
@jakebailey jakebailey changed the title Hack something together to test various builds Add build via esbuild Sep 16, 2022
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from e9c4c4c to 4173341 Compare September 16, 2022 04:36
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from d5e59b6 to ae931a4 Compare September 16, 2022 04:37
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from 4173341 to 142f87b Compare September 16, 2022 04:37
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from ae931a4 to c7ebf14 Compare September 16, 2022 05:43
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from 142f87b to 6382230 Compare September 16, 2022 05:43
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from c7ebf14 to 5bc9cf4 Compare September 19, 2022 20:11
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from 6382230 to effc622 Compare September 19, 2022 20:11
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from 5bc9cf4 to fb8179c Compare September 19, 2022 20:38
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from effc622 to 99a9841 Compare September 19, 2022 20:38
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from fb8179c to 85e19f5 Compare September 20, 2022 05:06
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from 99a9841 to da5cddf Compare September 20, 2022 05:06
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from 85e19f5 to 65d03e2 Compare September 20, 2022 05:11
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from da5cddf to 77c9a92 Compare September 20, 2022 05:11
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from 65d03e2 to 8303e2d Compare September 20, 2022 17:00
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from 52773fc to 8cea0d4 Compare September 28, 2022 00:45
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from b684c89 to 7927651 Compare September 28, 2022 00:45
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from 8cea0d4 to 5bf4df8 Compare September 28, 2022 05:04
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from 7927651 to c6af3c9 Compare September 28, 2022 05:04
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from 5bf4df8 to 5e0d2b3 Compare September 28, 2022 07:46
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from c6af3c9 to 8297294 Compare September 28, 2022 07:46
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from 5e0d2b3 to 9a23150 Compare September 28, 2022 19:40
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from 8297294 to 5cd7422 Compare September 28, 2022 19:40
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from 9a23150 to 3344f19 Compare September 28, 2022 22:03
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from 5cd7422 to d73e0dc Compare September 28, 2022 22:03
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from 3344f19 to 394a955 Compare October 3, 2022 21:41
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from d73e0dc to 3e65a7d Compare October 3, 2022 21:41
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from 394a955 to 848a6b4 Compare October 3, 2022 23:33
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from 3e65a7d to 89d04c6 Compare October 3, 2022 23:33
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from 848a6b4 to 950caaf Compare October 4, 2022 17:59
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from 89d04c6 to 573d141 Compare October 4, 2022 17:59
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from 950caaf to ce75198 Compare October 4, 2022 19:06
@jakebailey jakebailey changed the title Add babel for let/const lowering Get entrypoints working Oct 4, 2022
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from 573d141 to b47d0e1 Compare October 4, 2022 19:06
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from ce75198 to 5da60c5 Compare October 4, 2022 19:53
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from b47d0e1 to 288ed6e Compare October 4, 2022 19:53
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from 5da60c5 to ca907ba Compare October 4, 2022 21:01
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from 288ed6e to b6b845e Compare October 4, 2022 21:01
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from ca907ba to 761f43f Compare October 4, 2022 22:19
@jakebailey jakebailey changed the title Get entrypoints working Add build via esbuild Oct 4, 2022
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from b6b845e to 721e70b Compare October 4, 2022 22:19
@jakebailey jakebailey force-pushed the transform-stack-commit-17 branch from 761f43f to 62b9752 Compare October 4, 2022 22:48
@jakebailey jakebailey changed the title Add build via esbuild Ensure all projects are listed in root tsconfig.json Oct 4, 2022
@jakebailey jakebailey force-pushed the transform-stack-commit-18 branch from 721e70b to c0b00e5 Compare October 4, 2022 22:48
This adds a "small" d.ts bundler script. This script is very basic,
using Node printing to produce its output. Generally speaking, this is
inadvisable as it completely disregards name shadowing, globals, etc.
However, in our case, we don't care about the globals, and we can opt to
restructure our codebase in order to avoid conflict, which we largely
had to do anyway when we were namespaces and everything was in scope.
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.

1 participant