Skip to content

Fix jsdoc type resolution #24106

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

Closed
wants to merge 94 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
c49ef36
First half of fix
sandersn May 10, 2018
fdd0780
Added deferred to FileStats telemetry
May 11, 2018
bb178d3
Small test fixes
May 11, 2018
904f8df
Fix repeated merging of js initializers
sandersn May 11, 2018
bb615ac
Add declarationDir to excludeSpec
a-tarasyuk May 11, 2018
de9ff1b
Assert:only merge into transient symbols
sandersn May 11, 2018
2792ff9
Add fourslash test case
sandersn May 11, 2018
cc36cfc
Merge pull request #24050 from Microsoft/fix-js-initializer-merging
mhegazy May 11, 2018
60d39d7
add tests
a-tarasyuk May 11, 2018
b0c67fd
Merge pull request #24056 from a-tarasyuk/bug/23891-declarationDir-ne…
mhegazy May 11, 2018
5cc833a
Merge pull request #24049 from armanio123/AddDeferredToProjectTelemetry
May 11, 2018
dfef2fa
Add another test of js special assignment merging (#24070)
sandersn May 11, 2018
69f73eb
Return mapped locations in alternate fields
RyanCavanaugh May 2, 2018
70b6bd9
Cut back on more 'caught exceptions' from vfs
rbuckton May 12, 2018
8a63a8c
LEGO: check in for master to temporary branch.
csigs May 12, 2018
d990f29
LEGO: Merge pull request 24077
csigs May 12, 2018
f5281d6
Fix async generator rejection handling
rbuckton May 12, 2018
8a0aa99
Inject token into push like vsts does
weswigham May 14, 2018
d470b02
LEGO: check in for master to temporary branch.
csigs May 14, 2018
6148e73
LEGO: Merge pull request 24097
csigs May 14, 2018
dd520f9
Merge pull request #24078 from Microsoft/fix24014
rbuckton May 14, 2018
672d8e5
Merge pull request #24076 from Microsoft/fix24006
rbuckton May 14, 2018
86145ee
Update API baselines
RyanCavanaugh May 14, 2018
560371d
Alter basic auth strategy
weswigham May 14, 2018
7c07b16
Fix JSDoc type resolution
sandersn May 14, 2018
64b1c23
Push through original mapping location
RyanCavanaugh May 14, 2018
b58e4e1
Reduce aggression of parenthesis removal in ts transform (#24073)
weswigham May 14, 2018
9b6378b
Use SHA256 hash for project info telemetry (#24099)
May 14, 2018
7e3af08
Don't add a suggestion to convert to an es6 module if no commonjs imp…
May 14, 2018
ba4bf21
Cache simplified indexed accesses to better handle circularly constra…
weswigham May 14, 2018
7be8595
Add test for module resolution with package json containing main fiel…
sheetalkamat May 14, 2018
5447f88
Check for prototype method assignments first
sandersn May 14, 2018
3444c61
Undo dedupe changes to getJSDocTags
sandersn May 14, 2018
22d5b0e
Do not remove extension js or jsx from the subModuleName if the subMo…
sheetalkamat May 14, 2018
dc50fe5
Apart from typing, use main field in package json to resolve typescri…
sheetalkamat May 14, 2018
6baaddc
Add 'inspector' to known node modules
mhegazy May 14, 2018
b8c2eca
Reorder, add `"http2"`, `"async-hooks"` and `"perf_hooks"`
mhegazy May 14, 2018
f01338f
Comments/naming
RyanCavanaugh May 15, 2018
0bda862
Remove assert
mhegazy May 15, 2018
573e68c
JS Type aliases can't refer to host type params
sandersn May 15, 2018
2ca0792
Merge pull request #24074 from RyanCavanaugh/splitTransparentGoToDef
RyanCavanaugh May 15, 2018
5756ae1
External runner fixes (#24115)
weswigham May 15, 2018
e1f22ac
Combine signatureHelp testing methods (#24132)
May 15, 2018
7e515af
Copy allowTextChangesInNewFiles property to protocol.ts (#24127)
May 15, 2018
0ba8998
Fix stack overflow in merge symbol (#24134)
sandersn May 15, 2018
9484653
Merge pull request #24114 from Microsoft/inspectorToModules
mhegazy May 15, 2018
86dce41
Move synthetic comments from arrow body expressions to return stateme…
weswigham May 15, 2018
cbbe34b
Fix conversion of TextChanges to FileCodeEdits for new file (#24126)
May 15, 2018
77168e5
Merge pull request #24112 from Microsoft/packageJsonWithMainInSubDire…
sheetalkamat May 15, 2018
339a56f
Avoid duplicates when finding jsdoc (#24086)
sandersn May 15, 2018
d4a3c9c
Fix placement of indent for @ts-ignore comment (#24143)
May 15, 2018
2200c94
Fix unused diagnostic for rename-destructuring `{ a: b }` (#24145)
May 15, 2018
b4ca23d
Fix bug: Converting 'module.exports = {...}' to ES6 doesn't introduce…
May 15, 2018
6f4ed3a
Handel synthetic rest parameter declarations
mhegazy May 16, 2018
c52b069
LEGO: check in for master to temporary branch.
csigs May 16, 2018
ea2bc4c
LEGO: Merge pull request 24157
csigs May 16, 2018
0fde07f
fix trailing comma in accessor generator
Kingwl May 16, 2018
b79986e
Give checklist checkboxes
KSXGitHub May 16, 2018
4264629
Give issue template's checklist checkboxes
KSXGitHub May 16, 2018
b7f725d
fix generate accessor if starting with underscore
Kingwl May 16, 2018
da3724e
LEGO: check in for master to temporary branch.
csigs May 16, 2018
c3df6ed
LEGO: Merge pull request 24163
csigs May 16, 2018
32c43bb
Merge pull request #24161 from KSXGitHub/patch-2
RyanCavanaugh May 16, 2018
06eabf7
LEGO: check in for master to temporary branch.
csigs May 16, 2018
62921d5
LEGO: Merge pull request 24171
csigs May 16, 2018
60df467
Fix jsx element parsing within ternary (#24149)
weswigham May 16, 2018
e923016
Merge pull request #24160 from KSXGitHub/patch-1
mhegazy May 16, 2018
7f8ddc8
Merge pull request #24158 from Kingwl/fix-trailing-comma-in-accessor-…
mhegazy May 16, 2018
aab8d65
Update authors for release-2.9
mhegazy May 16, 2018
13ac886
Merge pull request #24162 from Kingwl/fix-generate-accessor-starting-…
mhegazy May 16, 2018
424dba1
codeFixInferFromUsage: Avoid duplicate fix for variable declaration (…
May 16, 2018
8ce5811
Bump user test enumeration timeout
weswigham May 16, 2018
f0997c1
Merge branch 'master' of github.com:Microsoft/TypeScript
weswigham May 16, 2018
e509ee5
Have bot force push his branch so he can run multiple times a day
weswigham May 16, 2018
15c09ef
Add temp module dir to gitignore to reduce git intellisense load when…
weswigham May 16, 2018
5bf6e30
Use jsdoc aliases if visible when printing types (#24153)
weswigham May 16, 2018
e01c7d2
Correctly show instantiated signatures for JSX element signature help…
weswigham May 16, 2018
a85f1d5
Fix lint
weswigham May 16, 2018
d9cf2be
Merge branch 'master' of github.com:Microsoft/TypeScript
weswigham May 16, 2018
a9ff9c2
Have the bot link the build associated with the PR (#24176)
weswigham May 16, 2018
0b89460
Don't collect open-file telemetry on the syntax server
amcasey May 16, 2018
d70da64
Use newer signature help check (#24179)
weswigham May 16, 2018
bc79917
Merge pull request #24178 from amcasey/SyntaxServerOpenFileTelemetry
amcasey May 16, 2018
21acf4f
Merge pull request #24136 from Microsoft/inferFromUsageFixes
mhegazy May 16, 2018
7c52cab
LEGO: check in for master to temporary branch.
csigs May 16, 2018
6704679
LEGO: Merge pull request 24183
csigs May 16, 2018
6af5d8b
Add Unicode ThirdPartyNotice
mhegazy May 16, 2018
159c808
Sort the whole diagnostic, plus giving up on isolating tests (#24186)
weswigham May 17, 2018
63a7263
LEGO: check in for master to temporary branch.
csigs May 17, 2018
2722d2e
LEGO: Merge pull request 24188
csigs May 17, 2018
5d23305
add quick fix for import type missing typeof
Kingwl May 17, 2018
dbd4ef4
Merge pull request #24192 from Kingwl/quick-fix-for-import-type
mhegazy May 17, 2018
aa7e2b0
Add callback tag, with type parameters (#23947)
sandersn May 17, 2018
fbf0380
Merge branch 'master' into js/fix-jsdoc-type-resolution
sandersn May 17, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ What shortcomings exist with current approaches?
## Checklist

My suggestion meets these guidelines:
[ ] This wouldn't be a breaking change in existing TypeScript / JavaScript code
[ ] This wouldn't change the runtime behavior of existing JavaScript code
[ ] This could be implemented without emitting different JS based on the types of the expressions
[ ] This isn't a runtime feature (e.g. new expression-level syntax)
* [ ] This wouldn't be a breaking change in existing TypeScript / JavaScript code
* [ ] This wouldn't change the runtime behavior of existing JavaScript code
* [ ] This could be implemented without emitting different JS based on the types of the expressions
* [ ] This isn't a runtime feature (e.g. new expression-level syntax)

11 changes: 6 additions & 5 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
Thank you for submitting a pull request!

Here's a checklist you might find useful.
[ ] There is an associated issue that is labeled
* [ ] There is an associated issue that is labeled
'Bug' or 'help wanted' or is in the Community milestone
[ ] Code is up-to-date with the `master` branch
[ ] You've successfully run `jake runtests` locally
[ ] You've signed the CLA
[ ] There are new or updated unit tests validating the change
* [ ] Code is up-to-date with the `master` branch
* [ ] You've successfully run `jake runtests` locally
* [ ] You've signed the CLA
* [ ] There are new or updated unit tests validating the change

Refer to CONTRIBUTING.MD for more details.
https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md
-->

Fixes #

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
.node_modules/
built/*
tests/cases/rwc/*
tests/cases/test262/*
Expand Down
23 changes: 21 additions & 2 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ Remo H. Jansen <[email protected]>
Sean Barag <[email protected]>
Sharon Rolel <[email protected]>
Stanislav Iliev <[email protected]>
Wenlu Wang <[email protected]> wenlu.wang <[email protected]> kingwl <[email protected]>
Wenlu Wang <[email protected]> wenlu.wang <[email protected]> kingwl <[email protected]> 王文璐 <[email protected]> 王文璐 <[email protected]>
Wilson Hobbs <[email protected]>
Yuval Greenfield <[email protected]>
Daniel <[email protected]> # @nieltg
Expand All @@ -321,4 +321,23 @@ AdityaDaflapurkar <[email protected]> # Aditya Daflapurkar
Eric Grube <[email protected]>
Martyn Janes <[email protected]>
Ricardo N Feliciano <[email protected]>
Sergii Bezliudnyi <[email protected]>
Sergii Bezliudnyi <[email protected]>
Adrien Gibrat <[email protected]>
Alex Ryan <[email protected]>
Alexader <[email protected]> Alexander T <[email protected]> # Alexander Tarasyuk
Andrew Faulkner <[email protected]>
Artem Tyurin <[email protected]>
Brandon Slade <[email protected]>
Derek P Sifford <[email protected]>
Dhruv Rajvanshi <[email protected]>
Holger Jeromin <[email protected]>
Jordi Oliveras Rovira <[email protected]>
Joscha Feth <[email protected]> Joscha Feth <[email protected]>
Ken703 <[email protected]> # Bowden Kenny
Kevin Donnelly <[email protected]>
Maarten Sijm <[email protected]>
Paul Koerbitz <[email protected]>
EcoleKeine <[email protected]> # Ecole Keine
Khải <[email protected]>
rhysd <[email protected]> # @rhysd
Zen <[email protected]> Zzzen <[email protected]> # @Zzzen
21 changes: 20 additions & 1 deletion AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ TypeScript is authored by:
* Aditya Daflapurkar
* Adnan Chowdhury
* Adrian Leonhard
* Adrien Gibrat
* Ahmad Farid
* Akshar Patel
* Alan Agius
* Alex Chugaev
* Alex Eagle
* Alex Khomchenko
* Alex Ryan
* Alexander Kuvaev
* Alexander Rusakov
* Alexander Tarasyuk
* Ali Sabzevari
* Aliaksandr Radzivanovich
* Aluan Haddad
Expand All @@ -22,6 +25,7 @@ TypeScript is authored by:
* Andreas Martin
* Andrej Baran
* Andrew Casey
* Andrew Faulkner
* Andrew Ochsner
* Andrew Stegmaier
* Andrew Z Allen
Expand All @@ -34,6 +38,7 @@ TypeScript is authored by:
* Armando Aguirre
* Arnaud Tournier
* Arnav Singh
* Artem Tyurin
* Arthur Ozga
* Asad Saeeduddin
* Avery Morin
Expand All @@ -49,6 +54,8 @@ TypeScript is authored by:
* Blake Embrey
* @bootstraponline
* Bowden Kelly
* Bowden Kenny
* Brandon Slade
* Brett Mayen
* Bryan Forbes
* Caitlin Potter
Expand Down Expand Up @@ -76,6 +83,8 @@ TypeScript is authored by:
* David Sheldrick
* David Souther
* Denis Nedelyaev
* Derek P Sifford
* Dhruv Rajvanshi
* Dick van den Brink
* Diogo Franco (Kovensky)
* Dirk Bäumer
Expand All @@ -84,6 +93,7 @@ TypeScript is authored by:
* Donald Pipowitch
* Doug Ilijev
* @e-cloud
* Ecole Keine
* Elisée Maurer
* Emilio García-Pumarino
* Eric Grube
Expand Down Expand Up @@ -118,6 +128,7 @@ TypeScript is authored by:
* Hendrik Liebau
* Henry Mercer
* Herrington Darkholme
* Holger Jeromin
* Homa Wong
* Iain Monro
* @IdeaHunter
Expand Down Expand Up @@ -155,6 +166,8 @@ TypeScript is authored by:
* Jonathan Toland
* Jonathan Turner
* Jonathon Smith
* Jordi Oliveras Rovira
* Joscha Feth
* Josh Abernathy
* Josh Goldberg
* Josh Kalderimis
Expand All @@ -170,7 +183,9 @@ TypeScript is authored by:
* Keith Mashinter
* Ken Howard
* Kenji Imamula
* Kevin Donnelly
* Kevin Lang
* Khải
* Kitson Kelly
* Klaus Meinhardt
* Kris Zyp
Expand All @@ -179,6 +194,7 @@ TypeScript is authored by:
* Lorant Pinter
* Lucien Greathouse
* Lukas Elmer
* Maarten Sijm
* Magnus Hiie
* Magnus Kulke
* Manish Giri
Expand Down Expand Up @@ -223,6 +239,7 @@ TypeScript is authored by:
* Oussama Ben Brahim
* Patrick Zhong
* Paul Jolly
* Paul Koerbitz
* Paul van Brenk
* @pcbro
* Pedro Maltez
Expand All @@ -240,6 +257,7 @@ TypeScript is authored by:
* Raj Dosanjh
* Reiner Dolp
* Remo H. Jansen
* @rhysd
* Ricardo N Feliciano
* Richard Karmazín
* Richard Knoll
Expand Down Expand Up @@ -309,4 +327,5 @@ TypeScript is authored by:
* Yuval Greenfield
* Zeeshan Ahmed
* Zev Spitz
* Zhengbo Li
* Zhengbo Li
* @Zzzen
91 changes: 76 additions & 15 deletions ThirdPartyNoticeText.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,96 @@
/*!----------------- TypeScript ThirdPartyNotices -------------------------------------------------------

The TypeScript software is based on or incorporates material and code from the projects listed below
(collectively "Third Party Code"). Microsoft is not the original author of the
Third Party Code. The original copyright notice and the license, under which
Microsoft received such Third Party Code, are set forth below. Such license and
notices are provided for informational purposes only. Microsoft licenses the Third
The TypeScript software is based on or incorporates material and code from the projects listed below
(collectively "Third Party Code"). Microsoft is not the original author of the
Third Party Code. The original copyright notice and the license, under which
Microsoft received such Third Party Code, are set forth below. Such license and
notices are provided for informational purposes only. Microsoft licenses the Third
Party Code to you under the terms of the Apache 2.0 License.
All Third Party Code licensed by Microsoft under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may obtain a copy
All Third Party Code licensed by Microsoft under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR
CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR
CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions and
See the Apache Version 2.0 License for specific language governing permissions and
limitations under the License.
---------------------------------------------
Third Party Code Components
--------------------------------------------

------------------- DefinitelyTyped --------------------
This file is based on or incorporates material from the projects listed below (collectively "Third Party Code"). Microsoft is not the original author of the Third Party Code. The original copyright notice and the license, under which Microsoft received such Third Party Code, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft, not the third party, licenses the Third Party Code to you under the terms set forth in the EULA for the Microsoft Product. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise.
This file is based on or incorporates material from the projects listed below (collectively "Third Party Code"). Microsoft is not the original author of the Third Party Code. The original copyright notice and the license, under which Microsoft received such Third Party Code, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft, not the third party, licenses the Third Party Code to you under the terms set forth in the EULA for the Microsoft Product. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise.
DefinitelyTyped
This project is licensed under the MIT license.
Copyrights are respective of each contributor listed at the beginning of each definition file.
Provided for Informational Purposes Only
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------------

------------------- Unicode --------------------
UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE

Unicode Data Files include all data files under the directories
http://www.unicode.org/Public/, http://www.unicode.org/reports/,
http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
http://www.unicode.org/utility/trac/browser/.

Unicode Data Files do not include PDF online code charts under the
directory http://www.unicode.org/Public/.

Software includes any source code published in the Unicode Standard
or under the directories
http://www.unicode.org/Public/, http://www.unicode.org/reports/,
http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and
http://www.unicode.org/utility/trac/browser/.

NOTICE TO USER: Carefully read the following legal agreement.
BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
TERMS AND CONDITIONS OF THIS AGREEMENT.
IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
THE DATA FILES OR SOFTWARE.

COPYRIGHT AND PERMISSION NOTICE

Copyright (c) 1991-2017 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in http://www.unicode.org/copyright.html.

Permission is hereby granted, free of charge, to any person obtaining
a copy of the Unicode data files and any associated documentation
(the "Data Files") or Unicode software and any associated documentation
(the "Software") to deal in the Data Files or Software
without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, and/or sell copies of
the Data Files or Software, and to permit persons to whom the Data Files
or Software are furnished to do so, provided that either
(a) this copyright and permission notice appear with all copies
of the Data Files or Software, or
(b) this copyright and permission notice appear in associated
Documentation.

THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THE DATA FILES OR SOFTWARE.

Except as contained in this notice, the name of a copyright holder
shall not be used in advertising or otherwise to promote the sale,
use or other dealings in these Data Files or Software without prior
written authorization of the copyright holder.
--------------------------------------------------------------------------------------

------------- End of ThirdPartyNotices --------------------------------------------------- */
5 changes: 3 additions & 2 deletions scripts/open-user-pr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ const userName = process.env.GH_USERNAME;
const reviewers = ["weswigham", "sandersn", "mhegazy"]
const now = new Date();
const branchName = `user-update-${now.getFullYear()}${padNum(now.getMonth())}${padNum(now.getDay())}`;
const remoteUrl = `https://github.com/${userName}/TypeScript.git`;
const remoteUrl = `https://${process.argv[2]}@github.com/${userName}/TypeScript.git`;
runSequence([
["git", ["checkout", "."]], // reset any changes
["node", ["./node_modules/jake/bin/cli.js", "baseline-accept"]], // accept baselines
["git", ["checkout", "-b", branchName]], // create a branch
["git", ["add", "."]], // Add all changes
["git", ["commit", "-m", `"Update user baselines"`]], // Commit all changes
["git", ["remote", "add", "fork", remoteUrl]], // Add the remote fork
["git", ["push", "--set-upstream", "fork", branchName]] // push the branch
["git", ["push", "--set-upstream", "fork", branchName, "-f"]] // push the branch
]);

const gh = new Octokit();
Expand All @@ -44,6 +44,7 @@ gh.pullRequests.create({
base: "master",
body:
`Please review the diff and merge if no changes are unexpected.
You can view the build log [here](https://typescript.visualstudio.com/TypeScript/_build/index?buildId=${process.env.BUILD_BUILDID}&_a=summary).

cc ${reviewers.map(r => "@" + r).join(" ")}`,
}).then(r => {
Expand Down
Loading