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

support package "exports" #87

Open
jkowalleck opened this issue Jun 22, 2022 · 0 comments
Open

support package "exports" #87

jkowalleck opened this issue Jun 22, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jkowalleck
Copy link
Member

jkowalleck commented Jun 22, 2022

currently only the main context is directly exported.
This means, that a Model for example needs to be required like

const { Models: { Component } }  = require('@cyclonedx/cyclonedx-library');

of as

const Component  = require('@cyclonedx/cyclonedx-library').Models.Component;

-> this requires a wider import than needed.

Feature request:

allow imports ala

const { Component }  = require('@cyclonedx/cyclonedx-library/models');

implementation:

utilize package.json's "exports" key. attention! have typing, web and node confugured properly for each sub path export.

additionally:

have a functional test that reads this data and tests that the mentioned files actually exist.

@jkowalleck jkowalleck added the enhancement New feature or request label Aug 4, 2022
@jkowalleck jkowalleck added the help wanted Extra attention is needed label Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant