-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[typings-generator] Add some options to typings generation and introd…
…uce a Heft plugin for generating loc file typings. (#4894) * Include an option for a documentation comment for typings default exports. * Add options to parseAndGenerateTypings return. * Include a inferDefaultExportInterfaceNameFromFilename option for TypingsGenerator. * Add a heft plugin for generating localization file tyings. * Clean up inferred exports names. * Fix an issue and leave a note. * Update Readme. * Rename getVerbose to getVerboseOutput. * General updates and cleanup to make the change not breaking. * Introduce a test for StringValuesTypingsGenerator. * Rush change. * Code cleanup. * Random code cleanup in API Extractor. * Add a Text.splitByNewLines function to NCL. * Code cleanup. * Add slashNormalizedBuildFolderPath property to HeftConfiguration. * Tweak schema. * Add a test case for the loc typings generator plugin. * Work around an API Extractor issue.
- Loading branch information
Showing
67 changed files
with
1,438 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* Defines configuration used by core Heft. | ||
*/ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft.schema.json", | ||
|
||
// TODO: Add comments | ||
"phasesByName": { | ||
"build": { | ||
"cleanFiles": [{ "includeGlobs": ["dist", "lib", "lib-commonjs"] }], | ||
|
||
"tasksByName": { | ||
"loc-typings": { | ||
"taskPlugin": { | ||
"pluginPackage": "@rushstack/heft-localization-typings-plugin", | ||
"options": { | ||
"generatedTsFolder": "temp/loc-json-ts" | ||
} | ||
} | ||
}, | ||
"typescript": { | ||
"taskDependencies": ["loc-typings"], | ||
"taskPlugin": { | ||
"pluginPackage": "@rushstack/heft-typescript-plugin" | ||
} | ||
}, | ||
"lint": { | ||
"taskDependencies": ["typescript"], | ||
"taskPlugin": { | ||
"pluginPackage": "@rushstack/heft-lint-plugin" | ||
} | ||
}, | ||
"webpack": { | ||
"taskDependencies": ["typescript"], | ||
"taskPlugin": { | ||
"pluginPackage": "@rushstack/heft-webpack4-plugin" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
build-tests/localization-plugin-test-02/config/typescript.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* Configures the TypeScript plugin for Heft. This plugin also manages linting. | ||
*/ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/heft/v0/typescript.schema.json", | ||
|
||
"staticAssetsToCopy": { | ||
"fileExtensions": [".resx", ".json", ".resjson"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
build-tests/localization-plugin-test-02/src/strings3.loc.json
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
build-tests/localization-plugin-test-02/src/strings3.resjson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"string1": "string three with a \\ backslash", | ||
"_string1.comment": "the third string", | ||
|
||
"string2": "string four with an ' apostrophe", | ||
"_string2.comment": "the fourth string", | ||
|
||
"string3": "UNUSED STRING", | ||
"_string3.comment": "UNUSED STRING" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
common/changes/@microsoft/api-extractor/loc-typings-heft-plugin_2024-08-21-00-29.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@microsoft/api-extractor", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@microsoft/api-extractor" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@microsoft/rush/loc-typings-heft-plugin_2024-08-20-22-59.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@microsoft/rush", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@microsoft/rush" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@rushstack/heft-config-file/loc-typings-heft-plugin_2024-08-20-22-59.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@rushstack/heft-config-file", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@rushstack/heft-config-file" | ||
} |
10 changes: 10 additions & 0 deletions
10
...stack/heft-localization-typings-plugin/loc-typings-heft-plugin-impl_2024-08-17-00-18.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@rushstack/heft-localization-typings-plugin", | ||
"comment": "Initial release.", | ||
"type": "minor" | ||
} | ||
], | ||
"packageName": "@rushstack/heft-localization-typings-plugin" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@rushstack/heft-sass-plugin/loc-typings-heft-plugin_2024-08-21-00-55.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@rushstack/heft-sass-plugin", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@rushstack/heft-sass-plugin" | ||
} |
10 changes: 10 additions & 0 deletions
10
common/changes/@rushstack/heft/loc-typings-heft-plugin_2024-08-21-00-55.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@rushstack/heft", | ||
"comment": "Add a `slashNormalizedBuildFolderPath` property to `HeftConfiguration`.", | ||
"type": "minor" | ||
} | ||
], | ||
"packageName": "@rushstack/heft" | ||
} |
Oops, something went wrong.