Commit Graph
3292 Commits
Author SHA1 Message Date
Jake BaileyandGitHub ac55b297b7 Upgrade "boolean-trivia" lint to new "argument-trivia" lint that uses type info, has quick fixes, etc. (#53002) 2023-03-23 16:26:39 -07:00
Sheetal NandiandGitHub 1b745df857 Adding baseline methods for verification of findAllRefs, GoTo*, Occurrences, highlights and rename deprecating the corresponding verification methods from fourslash tests (#52576) 2023-03-22 14:02:18 -07:00
Oleksandr TandGitHub 01a7a3e146 fix(53289): TypeScript cannot auto-complete keyword typeof (#53325) 2023-03-21 13:51:08 -07:00
Jake BaileyandGitHub 42d23390e2 Remove declares in sys, core, evaluatorImpl (#53176) 2023-03-10 09:57:32 -08:00
Nathan Shively-SandersandGitHub ff1e08f859 Rename scanner token methods (#53078) 2023-03-07 13:54:44 -08:00
Jake BaileyandGitHub a6be79d535 Remove old test262 and dt runner infra (#53125) 2023-03-07 11:59:47 -08:00
Jake BaileyandGitHub 6a39f912d6 Remove docker and user tests, related infra (#53118) 2023-03-06 19:59:21 -08:00
Sheetal NandiandGitHub dcc766f2b2 Remove long deprecated occurrences request (#52347) 2023-03-01 10:59:07 -08:00
Jake BaileyandGitHub ca1cf3dd85 Deprecate UnderscoreEscapedMap and remove internal uses (#53032) 2023-02-28 16:55:29 -08:00
Jake BaileyandGitHub 6fe711f85a Remove unused eslint-disable directives (#52987) 2023-02-27 11:01:37 -08:00
Jake BaileyandGitHub 4587871f51 Fix RWC tests with errors in tsconfig (#52824) 2023-02-21 11:09:06 -08:00
Andrew BranchandGitHub aa658257c9 Fix completion details auto-imports crashes (#52686) 2023-02-10 15:26:09 -08:00
Jake BaileyandGitHub 2a8436c529 Use eslint-plugin-simple-import-sort (#52090) 2023-02-02 14:36:21 -08:00
d32118c7f9 Remove line/col for all lib file diagnostics in baselines, completions (#52380)
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2023-02-01 09:33:01 -08:00
Jake BaileyandGitHub 10941888dc Plumb formatting to getDocCommentTemplateAtPosition (#52349)
Fixes https://github.com/microsoft/TypeScript/issues/52348
2023-01-23 15:31:58 -08:00
ff92ab0ac9 Change default newLine, forceConsistentCasingInFileNames (#52298)
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
2023-01-20 17:20:26 -08:00
Jake BaileyandGitHub 1447819df0 Elide line:col info in "!!! related" errors when from default lib.d.ts files (#52330) 2023-01-20 16:51:20 -08:00
Andrew BranchandGitHub cfe1842adf Add verbatimModuleSyntax, deprecate importsNotUsedAsValues and preserveValueImports (#52203) 2023-01-19 16:56:30 -08:00
Jake BaileyandGitHub ddac387c3e Deprecate CommandNames in favor of protocol.CommandTypes, direct import for better bundler output (#52208) 2023-01-19 16:31:50 -08:00
Ron BucktonandGitHub 5b18979697 Implement the Stage 3 Decorators Proposal (#50820) 2023-01-19 17:54:12 -05:00
Nathan Shively-SandersandGitHub abd6cb446f Improve quickinfo/signature/completions baselines (#52308) 2023-01-19 14:39:14 -08:00
Jake BaileyandGitHub 18794c7945 Enable noImplicitOverride (#52290) 2023-01-18 12:00:10 -08:00
Jake BaileyandGitHub 22b362ceac Enable strictFunctionTypes (#49929) 2023-01-17 17:20:51 -08:00
Gabriela Araujo BrittoandGitHub 67a3846fbf Fix replacementSpan for class member snippet completion entries (#52231) 2023-01-16 10:32:24 -08:00
Ron BucktonandGitHub 9cdba994ac Remove some properties from Identifier (#52170) 2023-01-12 17:20:12 -05:00
Wesley WighamandGitHub 89e928e8b4 Add --allowArbitraryExtensions, a flag for allowing arbitrary extensions on import paths (#51435) 2023-01-09 17:12:42 -08:00
Jake BaileyandGitHub f1ff0de943 Use native generators/iterables, remove helper cruft (#51921) 2023-01-06 14:40:56 -08:00
Gabriela Araujo BrittoandGitHub aae3115838 Call getTypeOfSymbol in getNarrowedTypeOfSymbol to avoid running into circularities when computing types (#51914) 2023-01-05 13:12:56 -08:00
Ron BucktonandGitHub 44e8244dd9 Move auto-generated identifier info into separate object (#51900) 2022-12-15 13:59:57 -05:00
Oleksandr TandGitHub fe185272cf feat(51000) - Flag Deprecation Plan (#51424)
* feat(51000): add ignoreDeprecations option

* use constants of versions

* change the ignoreDeprecations type to allow only one value - '5.0'

* add tests

* update baseline

* add typeScriptVersion to CreateProgramOptions

* update baseline

* change diagnostic message
2022-12-15 10:44:06 -08:00
Andrew BranchandGitHub 4076ff8fd6 Add option for organize imports case sensitivity (#51733)
* Add ignore case option to organizeImports

* Adopt in auto-imports, use same case-insensitive comparison as eslint

* Fix build/lint

* Mark functions internal

* Update affected auto import test

* Update API baseline

* Update protocol

* Update API baseline

* Short-circuit comparisons that have already failed
2022-12-13 14:37:29 -08:00
Andrew BranchandGitHub a5dde88dce --moduleResolution bundler (formerly known as hybrid) (#51669)
* WIP

* Add extension error back unless noEmit is set

* Add non-relative tests

* Add error for importing from declaration file

* Update unit test

* Add explicit flag for importing from .ts extensions

* Add module specifier resolution changes

* Add auto-import tests

* Disallow relative imports into node_modules

* Ensure auto-imports don’t suggest ./node_modules;

* Test a non-portable declaration emit issue

* Test auto-importing TSX file

* Update path completions

* Fix lint due to merge

* Remove minimal-specific stuff

* Remove minimal tests

* Update unit tests

* Add options

* Add customConditions option

* Add first tests

* CJS constructs are not allowed

* Add another test

* Fix extension adding/replacing priority

* Update test to reflect the choice not to block on unrecognized extensions

* Add auto-imports and string completions tests

* Revamp string completions ending preferences

* Comment test

* Auto-imports of declaration files cannot use .ts extension

* Have declaration file auto imports default to extensionless instead

* Add test for custom conditions

* Fix indentation

* Add baseline showing resolvePackageJsonImports/Exports compatibility

* Fix test and prevent CJS require from resolving

* Update unit test baselines

* Fix bad merge conflict resolution

* Make resolvedUsingTsExtension optional

* Update missed baselines

* Revert now-unnecessary API implementation changes

* Clean up

* Update baselines to es5 emit

* Rename to `bundler`
2022-12-13 13:35:16 -08:00
Ron BucktonandGitHub 6d41964fd0 Reduce polymorphism resulting from unstable Node shapes (#51682)
* Move .symbol to Declaration

* simplify some factories

* Move localSymbol to Declaration

* Ensure JSDocContainer types are properly initialized

* Move contextualType from Node to NodeLinks

* Move 'locals' and 'nextContainer' out of Node

* Move 'flowNode' out of 'Node'

* Pre-define endFlowNode/returnFlowNode

* Pre-define some SourceFile properties and a more stable cloneNode

* Don't add excess properties to type nodes in typeToTypeNode

* Refactor wrapSymbolTrackerToReportForContext to improve perf
2022-12-13 15:11:10 -05:00
navya9singhandGitHub 7267fcaeb9 Fix(29118): tsconfig.extends as array (#50403)
* tsconfig.extends as array

* Updated baselines

* Changes for pr

* Changes for pr comments

* Fixed formatting and edited a test

* Resolved errors after a merge conflict

* Added "string | list" type implentation

* Removed string | list type implementation

* Fixed formatting

* Added compiler test

* Resolving programUpdate errors

* Fixing commandLineParser error
2022-12-13 11:16:07 -08:00
Sheetal NandiandGitHub 3716ffe748 Make getSupportedCodeFixes on LS so it can be proxied by plugins (#51769)
Fixes #28966
2022-12-08 09:52:25 -08:00
Daniel RosenwasserandGitHub 3c99d50da5 Replace a few type assertions with annotations and satisfies. (#51685) 2022-12-06 11:52:17 -08:00
Jake BaileyandGitHub 00dc0b6674 Flip imports to case insensitive sorting (#51579) 2022-11-17 15:35:28 -08:00
Jake BaileyandGitHub 2d2a4343b8 Reformat imports to be one identifier per line (#51565) 2022-11-17 13:42:18 -08:00
Andrew BranchandGitHub 89ce16ccfd Fix auto-import when paths points to project reference redirect (#51492)
* Fix auto-import when `paths` points to project reference redirect

* Put paths specifiers to redirects in lower priority bucket
2022-11-15 14:19:15 -08:00
Jake BaileyandGitHub 9f64a3a58c Remove ts.{Map,Set,ESMap,Iterator} and associated types (#51439) 2022-11-09 15:06:31 -08:00
Sheetal NandiandGitHub 6e0a62e8dd Detangle unittests to reference helpers directly (#51450)
* Remove unnecessary redirection now that we are not in namespaces

* Move the tsc helpers in one place

* Move virtual file system with watch in unittests folder instead of harness since harness doesnt use it anyways

* Replace protocol and commandNames

* Revert incorrect pick
2022-11-09 10:02:40 -08:00
Jake Bailey 3cd72e76b2 Change build system to hereby
This eliminates a significant number of dependencies, eliminating all
npm audit issues, speeding up `npm ci` by 20%, and overall making the
build faster (faster startup, direct code is faster than streams, etc)
and clearer to understand.

I'm finding it much easier to make build changes for the module
transform with this; I can more clearly indicate task dependencies and
prevent running tasks that don't need to be run.

Given we're changing our build process entirely (new deps, new steps),
it seems like this is a good time to change things up.
2022-11-07 13:35:48 -08:00
Jake Bailey 4139807e75 Add build via esbuild
This configures the existing build tasks to use esbuild by default. If
using the plain files is desired, passing `--bundle=false` will build
using plain files and still produce a runnable system.

This is only a basic build; a more efficient build is provided later
when gulp is replaced by hereby.
2022-11-07 13:34:44 -08:00
Jake Bailey 36e29448e9 Get codebase building pre bundling
This isn't totally complete, but enough to get everything building and
tests running manually. The next commit will make the build work fully.
2022-11-07 13:34:44 -08:00
Jake Bailey 01e5200096 Convert require calls to imports
Although the existing require calls would work fine, it's more
consistent to make them actual imports and let them be converted at
compile/bundle time. It also lets us emit ESM if needed.

There are still conditional requires present for things like the node
System, but that's a more difficult problem to solve.
2022-11-07 13:34:44 -08:00
Jake Bailey d12116d8da Fix all internal JSDoc comments
If these are regular comments, then they won't appear in our d.ts files.
But, now we are relying on an external d.ts bundler to produce our final
merged, so they need to be present in the "input" d.ts files, meaning
they have to be JSDoc comments.

These comments only work today because all of our builds load their TS
files from scratch, so they see the actual source files and their
non-JSDoc comments.

The comments also need to be attached to a declaration, not floating,
otherwise they won't be used by api-extractor, so move them if needed.
2022-11-07 13:34:44 -08:00
Jake Bailey 07758c08ab Generated module conversion step - inlineImports
This step converts as many explicit accesses as possible in favor of direct imports from the modules in which things were declared. This restores the code (as much as possible) back to how it looked originally before the explicitify step, e.g. instead of "ts.Node" and "ts.Symbol", we have just "Node" and "Symbol".
2022-11-07 13:33:07 -08:00
Jake Bailey b6c0538826 Generated module conversion step - stripNamespaces
This step converts each file into an exported module by hoisting the namespace bodies into the global scope and transferring internal markers down onto declarations as needed.

The namespaces are reconstructed as "barrel"-style modules, which are identical to the old namespace objects in structure. These reconstructed namespaces are then imported in the newly module-ified files, making existing expressions like "ts." valid.
2022-11-07 13:32:03 -08:00
Jake Bailey 9a0b85ce2a Generated module conversion step - explicitify
This step makes all implicit namespace accesses explicit, e.g. "Node" turns into "ts.Node".
2022-11-07 13:29:05 -08:00
Jake Bailey 94724a8c2e Generated module conversion step - unindent
This step makes further commits look clearer by unindenting all of the top level namespaces preemptively.
2022-11-07 13:28:13 -08:00