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

chore: Peer dependency script experiment #2450

Closed
wants to merge 3 commits into from

Conversation

pan-kot
Copy link
Member

@pan-kot pan-kot commented Jul 9, 2024

Description

Related links, issue #, if available: n/a

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

// Helper function to execute shell commands and log output
function execCommand(command, options = {}) {
try {
execSync(command, { stdio: 'inherit', ...options });

Check warning

Code scanning / CodeQL

Shell command built from environment values Medium

This shell command depends on an uncontrolled
absolute path
.
Copy link
Member Author

Choose a reason for hiding this comment

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

Can we dismiss that?

Copy link

codecov bot commented Jul 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.66%. Comparing base (e59783d) to head (65b423a).

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #2450    +/-   ##
========================================
  Coverage   95.66%   95.66%            
========================================
  Files         725      725            
  Lines       19380    19380            
  Branches     6169     6505   +336     
========================================
  Hits        18540    18540            
  Misses        832      832            
  Partials        8        8            

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -20,6 +20,7 @@ import {
PropertyFilterProperty,
PropertyFilterToken,
} from '@cloudscape-design/collection-hooks';
import { PropertyFilterTokenGroup } from '@cloudscape-design/collection-hooks/cjs/interfaces';
Copy link
Member Author

Choose a reason for hiding this comment

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

These are temporary changes just to prove that the PR indeed fetches code from the collection-hooks branch: cloudscape-design/collection-hooks#74

// Copy built peer dependency to node_modules
console.log(`Copying built ${targetRepository} to node_modules...`);
execCommand(`mkdir -p ${nodeModulesPackagePath}`);
execCommand(`cp -R ${tempDir}/lib/* ${nodeModulesPackagePath}`);
Copy link
Member Author

Choose a reason for hiding this comment

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

This part is shaky. In collection-hooks we package the distribution to the lib folder entirely. In other packages we might use the root folder or dist. We can either parametrise this line or make all packages better consistent.

Copy link
Member

@michaeldowseza michaeldowseza Jul 10, 2024

Choose a reason for hiding this comment

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

This is not an issue. We standardised everything to package to lib folder 👍🏻

Copy link
Member

Choose a reason for hiding this comment

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

Where it might be an issue is some packages produce multiple artifacts in the lib folder. E.g. test-utils, theming-core, components, board-components, code-view

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