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

[devops]: Remove references to internal/vendor packages #12010

Merged

Conversation

m4olivei
Copy link
Contributor

@m4olivei m4olivei commented Sep 4, 2024

Related Ticket(s)

Closes #12008

Description

Adjusts all internal/vendor imports to use the package imports instead.

Changelog

Changed

  • All imports of the form [...]/internal/vendor/@carbon/[package][rest] changed to @carbon/[package]/es[rest]

Removed

  • vendor build steps

@m4olivei m4olivei added Feature request A new adopter requested feature adopter: AEM used when component or pattern will be used by this adopter owner: AEM owner: Innovation Team used when the engineering work will be done by Hybrid Cloud with DDS engineers as consultants v2 labels Sep 4, 2024
@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Sep 4, 2024

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Sep 4, 2024

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Sep 4, 2024

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Sep 4, 2024

@m4olivei m4olivei marked this pull request as ready for review September 5, 2024 13:22
@m4olivei m4olivei requested a review from a team as a code owner September 5, 2024 13:23
@m4olivei m4olivei requested review from kennylam, annawen1, bruno-amorim, marcelojcs, andy-blum and Valentin-Sorin-Nicolae and removed request for a team September 5, 2024 13:23
@andy-blum andy-blum added test: CDN preview used for generating @carbon/ibmdotcom-web-components CDN for testing test: CWC CDN preview test: CDN preview used for generating @carbon/web-components CDN for testing labels Sep 5, 2024
@andy-blum andy-blum closed this Sep 5, 2024
@andy-blum andy-blum reopened this Sep 5, 2024
@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Sep 5, 2024

Deploy preview created for package IBM.com Web Components Deploy Preview CDN:
https://ibmdotcom-cdn.s3.us-east.cloud-object-storage.appdomain.cloud/deploy-previews/12010/index.html

Built with commit: 299e7d8758e02815422a6fd13d6880a37d1f0ae6

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Sep 5, 2024

Deploy preview created for package Carbon Web Components Deploy Preview CDN:
https://carbon-web-components-cdn.s3.us-east.cloud-object-storage.appdomain.cloud/deploy-previews/12010/index.html

Built with commit: 5275b71534400d9f7867c9fe4682278c7dadf334

Copy link
Member

@andy-blum andy-blum left a comment

Choose a reason for hiding this comment

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

Passes all the tests, and I don't see any stragglers still importing from internal/vendor.

Even after yarn clean yarn install and yarn build, I am still seeing built files importing from those paths, but maybe that can be a followup?

@m4olivei
Copy link
Contributor Author

Passes all the tests, and I don't see any stragglers still importing from internal/vendor.

Even after yarn clean yarn install and yarn build, I am still seeing built files importing from those paths, but maybe that can be a followup?

I see one place where those are coming from. Fix incoming.

@m4olivei
Copy link
Contributor Author

Passes all the tests, and I don't see any stragglers still importing from internal/vendor.
Even after yarn clean yarn install and yarn build, I am still seeing built files importing from those paths, but maybe that can be a followup?

I see one place where those are coming from. Fix incoming.

Fixed in 86ef4f5. There was a build script for icons that was automating creation of modules that used an internal/vendor import path.

@andy-blum
Copy link
Member

@m4olivei
Copy link
Contributor Author

Looks good - should we remove the documentation around the vendor dirs?

https://github.com/carbon-design-system/carbon-for-ibm-dotcom/blob/main/packages/web-components/IMPLEMENTATION_NOTES.md#vendor-directory

Addressed in e47e8c1

@m4olivei
Copy link
Contributor Author

m4olivei commented Sep 26, 2024

@kennylam There was a big merge conflict here after the CWC removal PR landed. It was caused by a lot of overlap in adjusting import statements. I've addressed the conflicts and this should now be ready to go.

Note that we have a few more v2 PRs coming in the next week, after which we'll probably look for a new v2 release in the first or second week of Oct.

Copy link
Member

@kennylam kennylam left a comment

Choose a reason for hiding this comment

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

LGTM!

@kennylam kennylam added the Ready to merge Label for the pull requests that are ready to merge label Sep 26, 2024
@kodiakhq kodiakhq bot merged commit cf0b033 into carbon-design-system:main Sep 26, 2024
15 of 19 checks passed
kodiakhq bot pushed a commit that referenced this pull request Oct 18, 2024
…tore (#12079)

### Related Ticket(s)

Closes #12078 

### Description

Turns out we were overzealous in #12010 by removing internal references to `@carbon/ibmdotcom-services-store`. This package has to work this way b/c its not published to npm.

### Testing instructions

The best, most representative way I've found to test this is to build the project, then use `npm pack` to get a tarball, then install the tarball in a target application that bundles one or more modules in the `web-components/es/` folder, which itself uses modules from `@carbon/ibmdotcom-services-store`.

1. Checkout this branch locally, and run `yarn build`
2. Run `npm pack`
```
$ cd packages/web-components
$ npm pack --pack-destination=/Users/m4olivei/Desktop
```
3. Clone this test appilcation, or any other app that uses `@carbon/ibmdotcom-web-components` v2.14.0-rc.0. For example https://github.com/m4olivei/carbon-webpack-play/tree/services-store
4. Run the following in the application
```
$ cd carbon-webpack-play
$ npm install ~/Desktop/carbon-ibmdotcom-web-components-2.14.0-rc.0.tgz
$ npm run build
```
5. Should build clean

### Changelog

**New**

- Re-introduces copying compiled modules from `@carbon/ibmdotcom-services-store` to `web-components/src/internal` directory.

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adopter: AEM used when component or pattern will be used by this adopter Feature request A new adopter requested feature owner: AEM owner: Innovation Team used when the engineering work will be done by Hybrid Cloud with DDS engineers as consultants Ready to merge Label for the pull requests that are ready to merge test: CDN preview used for generating @carbon/ibmdotcom-web-components CDN for testing test: CWC CDN preview test: CDN preview used for generating @carbon/web-components CDN for testing v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[devops]: Remove references to internal/vendor packages
4 participants