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

[api-extractor]: Upgrade typescript minor to 3.4 #1124

Merged
merged 3 commits into from
Apr 11, 2019

Conversation

rudolf
Copy link
Contributor

@rudolf rudolf commented Mar 1, 2019

Upgrades the typescript version used by api-extractor to analyze projects.

@octogonz
Copy link
Collaborator

octogonz commented Mar 1, 2019

FYI you are upgrading the compiler that is used to compile API Extractor itself. If you want to upgrade the compiler that API Extractor uses when analyzing a project, that's this line:

https://github.com/Microsoft/web-build-tools/blob/5fcdc42baf2dab3a03f7608c6d7673e08eb4b2fd/apps/api-extractor/package.json#L41

@rudolf rudolf requested a review from patmill as a code owner March 4, 2019 09:48
@rudolf rudolf changed the title [api-extractor]: use rush-stack-compiler-3.3 [api-extractor]: Upgrade typescript minor to 3.3.3333 Mar 4, 2019
@rudolf
Copy link
Contributor Author

rudolf commented Mar 4, 2019

@octogonz Thanks, I've changed the PR to correctly upgrade typescript.

@rudolf
Copy link
Contributor Author

rudolf commented Mar 6, 2019

I'm really battling with the rush build system here. @octogonz or @iclanton Can you offer some guidance for how I should go about upgrading api-extractor's typescript version?

@octogonz
Copy link
Collaborator

octogonz commented Mar 6, 2019

@iclanton maybe you could help with this? It seems that API-Extractor-on-TypeScript 3.3.3333 is not able to analyze projects that build using rush-stack-compiler-3.2, whereas API-Extractor-on-TypeScript 3.1.6 (our current master) seems to work okay.

Here's an example error when building the rushell library (which uses rush-stack-compiler-3.2):

Warning - [api-extractor] Warning: wbt/common/temp/node_modules/.registry.npmjs.org/typescript/3.2.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts:43:6 - (TS2585) 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the lib compiler option to es2015 or later.

@iclanton I wonder if RSC should always invoke API Extractor using the --typescript-compiler-folder option.

We could probably "solve" this by upgrading all the WBT projects to the latest RSC, but the scenario is supposed to work: The whole idea is that we don't want to have to maintain separate API Extractor release branches for each TypeScript compiler release, and we also don't want to be forced to constantly upgrade everything to the latest compiler.

@octogonz
Copy link
Collaborator

@iclanton I wonder if RSC should always invoke API Extractor using the --typescript-compiler-folder option.

Actually, it appears that we're already doing that:

ApiExtractorRunner.ts

          message.handled = true;
        },
        typescriptCompilerFolder: ToolPaths.typescriptPackagePath
      };

I'm going to update this PR and see if I can figure out what's going on.

@octogonz octogonz changed the title [api-extractor]: Upgrade typescript minor to 3.3.3333 [api-extractor]: Upgrade typescript minor to 3.4 Apr 11, 2019
@octogonz
Copy link
Collaborator

Weird... I started over with a clean upgrade: API Extractor now uses typescript 3.4 for analysis, while API Extractor itself is still built using RSC 3.2. It worked perfectly the first time. The typescriptCompilerFolder feature seems to be working perfectly. I'm not sure what we were doing wrong before, but... problem solved, so I'm not going to investigate it heheh.

@octogonz octogonz merged commit 83917c9 into microsoft:master Apr 11, 2019
@rudolf
Copy link
Contributor Author

rudolf commented Apr 11, 2019

Awesome 🎉

@rudolf rudolf deleted the rm-api-exporter-bump branch April 11, 2019 07:23
@octogonz
Copy link
Collaborator

This feature was published with the API Extractor beta release 7.0.41

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.

2 participants