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

fix(nx-plugin): resolve new swc transpilation regression within build executor #199

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

Hotell
Copy link
Contributor

@Hotell Hotell commented Jul 12, 2024

New behaviour:

  • build executor uses new swc cli argument https://swc.rs/docs/usage/cli#--strip-leading-paths in order to mitiage regression that will create build assets within provided source root

  • force generated change file for resize-handler in order to trigger new release for affected package

  • added tests for build executor


@Hotell Hotell changed the title Nx plugin/fix build executor fix(nx-plugin): resolve new swc transpilation regression within build executor Jul 12, 2024
"semver": "^7.5.2",
"@nx/devkit": "^17.3.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

leftover from #191

context.projectsConfigurations.projects[context.projectName];

const { root: workspaceRoot } = context;
const paths = getPackagePaths(workspaceRoot, root);
if (!projectConfig) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed validation logic - we care only if project exists or not

function copyPackageJson(paths: PackagePaths) {
const packageJson = readJsonFile(paths.packageJson);
Object.assign(packageJson, {
types: './src/index.d.ts',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

dupe for tsc d.ts type retrieval - unified with fluent core

dist: path.join(workspaceRoot, 'dist', rootPath),
esm: path.join(workspaceRoot, 'dist', rootPath, 'lib'),
commonjs: path.join(workspaceRoot, 'dist', rootPath, 'lib-commonjs'),
main: joinPathFragments(rootPath, 'src', 'index.ts'),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

less repetition - DRY

@Hotell Hotell marked this pull request as ready for review July 12, 2024 17:24
@Hotell Hotell requested review from a team as code owners July 12, 2024 17:24
@Hotell Hotell merged commit ca0a0f2 into microsoft:main Jul 15, 2024
4 checks passed
@Hotell Hotell deleted the nx-plugin/fix-build-executor branch July 15, 2024 08:51
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.

[Bug][P0]: Failed to resolve entry for package - extra src directory in lib after build and publish
3 participants