-
Notifications
You must be signed in to change notification settings - Fork 63
refactor: separate API facade from public contracts #1787
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
cb081e1
refactor: separate public API concerns
edvilme 6e2fe48
Address PR feedback
edvilme 3585a2f
fix: resolve extensionless api imports in webpack
edvilme ddf364f
refactor: preserve internal manager names
edvilme cb7f9df
fix: address API packaging review feedback; decouple API/extension ve…
Copilot fce6466
Merge remote-tracking branch 'origin/main' into api-refactor-types
Copilot 55edc09
docs: remove sample extension example
edvilme 4edc090
Merge origin/main into api-refactor-types
edvilme e91bb93
fix: address remaining API PR comments
edvilme File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| # Copied from ../src/api.ts by the publish pipeline (build/azure-pipeline.npm.yml). | ||
| # This is the published package entry point; it is produced at publish time and | ||
| # intentionally NOT committed. src/api.ts is the single source of truth. | ||
| # Copied from ../src/api.ts, ../src/types.ts, ../src/publicErrors.ts by the publish pipeline | ||
| # (build/azure-pipeline.npm.yml). These are the published package sources; they are produced | ||
| # at publish time and intentionally NOT committed. src/api.ts, src/types.ts, and | ||
| # src/publicErrors.ts are the single sources of truth. | ||
| src/main.ts | ||
| src/types.ts | ||
| src/publicErrors.ts | ||
|
edvilme marked this conversation as resolved.
|
||
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,25 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| // Repopulates the package's generated `src` sources from the single sources of | ||
| // truth in `../src`. These files are gitignored and are removed by the | ||
| // `git clean -xfd .` step in `all:publish`, so they must be copied back before | ||
| // TypeScript can compile. Mirrors the copy step in build/azure-pipeline.npm.yml. | ||
|
|
||
| const fs = require('node:fs'); | ||
| const path = require('node:path'); | ||
|
|
||
| const packageRoot = path.resolve(__dirname, '..'); | ||
| const repoRoot = path.resolve(packageRoot, '..'); | ||
| const srcDir = path.join(packageRoot, 'src'); | ||
|
|
||
| const sources = [ | ||
| { from: path.join(repoRoot, 'src', 'api.ts'), to: path.join(srcDir, 'main.ts') }, | ||
| { from: path.join(repoRoot, 'src', 'types.ts'), to: path.join(srcDir, 'types.ts') }, | ||
| { from: path.join(repoRoot, 'src', 'publicErrors.ts'), to: path.join(srcDir, 'publicErrors.ts') }, | ||
| ]; | ||
|
|
||
| fs.mkdirSync(srcDir, { recursive: true }); | ||
| for (const { from, to } of sources) { | ||
| fs.copyFileSync(from, to); | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.