Skip to content

feat(build-tools): Add generate:node10Entrypoints command#22937

Merged
sonalideshpandemsft merged 5 commits into
microsoft:mainfrom
sonalideshpandemsft:node10-compat-cmd
Nov 1, 2024
Merged

feat(build-tools): Add generate:node10Entrypoints command#22937
sonalideshpandemsft merged 5 commits into
microsoft:mainfrom
sonalideshpandemsft:node10-compat-cmd

Conversation

@sonalideshpandemsft
Copy link
Copy Markdown
Contributor

@sonalideshpandemsft sonalideshpandemsft commented Oct 30, 2024

This PR add a new command to generate node10 type declaration entrypoints. Most of the node10 code is extracted from generate entrypoint command.

@github-actions github-actions Bot added base: main PRs targeted against main branch area: build Build related issues dependencies Pull requests that update a dependency file labels Oct 30, 2024
@github-actions github-actions Bot removed the dependencies Pull requests that update a dependency file label Oct 30, 2024
@sonalideshpandemsft sonalideshpandemsft marked this pull request as ready for review October 30, 2024 17:47
Comment thread build-tools/packages/build-cli/src/library/index.ts Outdated
Comment thread build-tools/packages/build-cli/src/commands/generate/node10Entrypoints.ts Outdated
Comment thread build-tools/packages/build-cli/src/commands/generate/node10Entrypoints.ts Outdated
Comment thread build-tools/packages/build-cli/src/commands/generate/node10Entrypoints.ts Outdated
Comment thread build-tools/packages/build-cli/src/commands/generate/node10Entrypoints.ts Outdated
import type { Node10CompatExportData } from "../../library/packageExports.js";
import type { CommandLogger } from "../../logging.js";

export default class GenerateNode10EntrypointsCommand extends BaseCommand<
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: not a blocker. Ideally either the path to the folder or package.json would be a flag, even if it has a default
value. Makes it easier to test. But it can always be added later.

Copy link
Copy Markdown
Member

@tylerbutler tylerbutler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. I suggest adding these two input flags from the existing command: --outDir and --mainEntrypoint. Those will give us more flexibility when we start using this. But no need to block on this if you do a follow-up. We could still get this merged as-is.

@sonalideshpandemsft
Copy link
Copy Markdown
Contributor Author

Approved. I suggest adding these two input flags from the existing command: --outDir and --mainEntrypoint. Those will give us more flexibility when we start using this. But no need to block on this if you do a follow-up. We could still get this merged as-is.

I think node10 will not require these flags. It only need the package exports. mainEntrypoint flag won’t be used for Node 10 entry points and outDir will always be the root of the package. Setting outDir to anything other than the package root could lead to an incorrect export path.

@sonalideshpandemsft sonalideshpandemsft merged commit 533de79 into microsoft:main Nov 1, 2024
@sonalideshpandemsft sonalideshpandemsft deleted the node10-compat-cmd branch November 1, 2024 19:33
Josmithr pushed a commit that referenced this pull request Nov 5, 2024
This PR add a new command to generate node10 type declaration
entrypoints. Most of the node10 code is extracted from [generate
entrypoint](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/build-cli/src/library/commands/generateEntrypoints.ts)
command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build related issues base: main PRs targeted against main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants