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

Sync and bump release 4.7 to RC #49007

Merged
merged 123 commits into from May 7, 2022
Merged

Sync and bump release 4.7 to RC #49007

merged 123 commits into from May 7, 2022

Conversation

DanielRosenwasser
Copy link
Member

No description provided.

sheetalkamat and others added 30 commits April 6, 2022 12:46
* Some refactoring for baselining for easy update

* Set modified time in baseline

* Some renames per feedback
…48589)

* Permit type alias variance annotations only for certain object types

* Accept new baselines
* Some refactoring of baselines

* Some refactoring of baselines
…bstitutions are consistently read (#48558)

* Ensure late painted statements are only transformed once, so inner substitutions are consistently read

* PR suggestion

* Fix lint
* do not flag index signatures as a control flow container

* add tests and baselines
Also baseline buildinfo so its easier to detect mistakes
* preserve this when extracting functions

* rename IsThisReferringToFunction to UsesThisInFunction

* refactor

* update tests
LEGO: Merge pull request 48612
12 -> 14 (we have odd test errors on 12 that aren't worth debugging)
Update node versions
…union with `undefined` (#48605)

* Reuse type nodes from optional parameters and properties even when not written as a union with `undefined`

* Remove newly unneeded NodeBuilderFlag

* Update public API

* Update baselines from main
LEGO: Merge pull request 48621
LEGO: Merge pull request 48633
Andarist and others added 25 commits May 3, 2022 17:05
…48939)

* Allow type keywords with the same names as other completions

* Only add type keywords that are the same as other completions in type locations
* Skip ambient modules in globalThis

Previously, globalThis mistakenly included ambient modules, even though
these are not values:

```ts
declare module "ambientModule" {
  export type typ = 1
  export var val: typ
}
type Oops = (typeof globalThis)[\"ambientModule\"]
```

This PR adds ambient modules to the kinds of things that are skipped
when constructing `globalThis`' properties, along with block-scoped
variables.

* Skip only modules with every declaration ambient

The modules are required to have at least one declaration so that our
treatment of `globalThis` stays the same, and
`globalThis.globalThis.globalThis` remains legal.
* No error on toplevel return in JS

Turns out it's only an error in modules.
It's possible to keep this error on the list of "OK for JS" errors and
make the checker code stop issuing it for JS scripts only. However, I
don't think the error is valuable enough to do that.

Fixes #48224

* Restore 'return' statement.

* Update Baselines and/or Applied Lint Fixes

* Re-add missing baselines

* No error in toplevel script files

Only issue "no top-level return" error for modules, not scripts,
regardless of whether it's TS or JS.

* Keep Disallowing return in ambient locations

* Allow toplevel return only in non-ESM JS files

* Add test of toplevel return in JS script

* Revert "Add test of toplevel return in JS script"

This reverts commit 2a6dec4.

* Revert "Allow toplevel return only in non-ESM JS files"

This reverts commit 6291ae3.

* Revert "Keep Disallowing return in ambient locations"

This reverts commit 714ea8e.

* Revert "No error in toplevel script files"

This reverts commit 2056e13.

* restore orphaned baseline

Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com>
…47925)

* Allow export map entries to remap back to input files for a program

* Fix file casing issues on windows

* Implement abiguity error, doesnt quite work

* Refine selection logic in error case to use getCommonSourceDirectory, add more tests
Getting an empty result doesn't seem expected, but a deeper fix doesn't make sense until #48619 is merged.

Fixes #48963
* Add `Intl.Segmenter` type

* Update baseline

* Fix useless generics

* Fix indent size

* Fix `ResolvedSegmenterOptions`
)

* Respect importModuleSpecifierEnding inside node_modules packages

* Add tests for missing package.json
* Flag resolution mode assertions in non-nightly builds

* Add checker check
@typescript-bot
Copy link
Collaborator

Thanks for the PR! It looks like you've changed the TSServer protocol in some way. Please ensure that any changes here don't break consumers of the current TSServer API. For some extra review, we'll ping @sheetalkamat, @amcasey, @mjbvz, @minestarks for you. Feel free to loop in other consumers/maintainers if necessary

@DanielRosenwasser
Copy link
Member Author

This should be merged, not squashed.

@DanielRosenwasser DanielRosenwasser merged commit a5ec725 into release-4.7 May 7, 2022
@DanielRosenwasser DanielRosenwasser deleted the bump-4.7-rc branch May 7, 2022 00:21
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.

None yet