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

NPM package: Add more exports and fix dependencies #792

Merged
merged 2 commits into from
Feb 7, 2024
Merged

NPM package: Add more exports and fix dependencies #792

merged 2 commits into from
Feb 7, 2024

Conversation

tkohr
Copy link
Collaborator

@tkohr tkohr commented Feb 6, 2024

Description

This PR adds some more exports to the npm package.

04df603 also tends to resolve the following error encountered using the latest (2.2.0-dev.46643468) release:

✘ [ERROR] Could not resolve "marked"

    node_modules/geonetwork-ui/fesm2022/geonetwork-ui.mjs:61:23:
      61 │ import { marked } from 'marked';
         ╵                        ~~~~~~~~

  You can mark the path "marked" as external to exclude it from the bundle, which will remove this
  error.

✘ [ERROR] Could not resolve "basiclightbox"

    node_modules/geonetwork-ui/fesm2022/geonetwork-ui.mjs:76:31:
      76 │ import * as basicLightbox from 'basiclightbox';

Note: Somehow, I cannot even include the <gn-ui-markdown-parser> component in an external project, even though it is exported. Not sure if this is related to the dependency issue above.

Quality Assurance Checklist

  • Commit history is devoid of any merge commits and readable to facilitate reviews
  • If new logic ⚙️ is introduced: unit tests were added
  • If new user stories 🤏 are introduced: E2E tests were added
  • If new UI components 🕹️ are introduced: corresponding stories in Storybook were created
  • If breaking changes 🪚 are introduced: add the breaking change label
  • If bugs 🐞 are fixed: add the backport <release branch> label
  • The documentation website 📚 has received the love it deserves

Copy link
Contributor

github-actions bot commented Feb 6, 2024

Affected libs: api-repository, feature-catalog, feature-record, feature-router, feature-search, feature-map, feature-dataviz, feature-auth, common-domain, api-metadata-converter, feature-editor, ui-search, common-fixtures, ui-elements, ui-catalog, util-shared, ui-widgets, ui-inputs, ui-map, ui-dataviz,
Affected apps: metadata-editor, datahub, demo, webcomponents, map-viewer, search, datafeeder, metadata-converter, data-platform,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

Copy link
Collaborator

@jahow jahow left a comment

Choose a reason for hiding this comment

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

I think the new dependencies should be added there as well:

"dependencies": {

with this PR you're just suppressing the warnings, but the dependencies are still not included in the package.

I know, this workflow is tedious! I hope we can find some time to automate that in the future.

@coveralls
Copy link

coveralls commented Feb 6, 2024

Coverage Status

coverage: 83.112% (-3.3%) from 86.363%
when pulling 25a43c4 on npm-fixes
into 4664346 on main.

@tkohr
Copy link
Collaborator Author

tkohr commented Feb 6, 2024

I think the new dependencies should be added there as well:

"dependencies": {

Right, thanks, I've added them there as well.

@tkohr tkohr merged commit 2a6e8d6 into main Feb 7, 2024
8 checks passed
@tkohr tkohr deleted the npm-fixes branch February 7, 2024 10:18
@tkohr
Copy link
Collaborator Author

tkohr commented Feb 7, 2024

Hum, using the <gn-ui-markdown-parser> works well now, but I'm still getting Internal server error: Missing "./libs/common/domain/src/lib/platform.service.interface" specifier in "geonetwork-ui" package when trying to use PlatformServiceInterface. I don't see the index.ts that I've added in this PR in the generated package. Any idea where this export is failing @jahow ?

There's also already a new dep (@geospatial-sdk/geocoding) missing in the package, that I'll add in a follow-up PR. Yes I guess we'll have to try to automate this in the long run.

@tkohr
Copy link
Collaborator Author

tkohr commented Feb 7, 2024

To fix the dependency, I've opened #793

Regarding the missing PlatformServiceInterface export, we might not need it (yet), but I'm still curious.

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.

4 participants