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

plone.staticresources release contains multiple package.json files that are picked up by Jest #73

Open
tisto opened this issue Apr 8, 2020 · 3 comments

Comments

@tisto
Copy link
Sponsor Member

tisto commented Apr 8, 2020

When running Jest (JS test runner) tests on a code-base with Plone, it picks up plone.staticresource files automatically:

    The name `react` was looked up in the Haste module map. It cannot be resolved, because there exists several different files, or packages, that provide a module for that particular name and platform. The platform is generic (no extension). You must delete or blacklist files until there remains only one of these:
      * `/home/iflameing/Documents/github/volto/api/eggs/plone.staticresources-1.2.1-py3.6.egg/plone/staticresources/static/components/react/npm-react/package.json` (package)
      * `/home/iflameing/Documents/github/volto/api/eggs/plone.staticresources-1.2.1-py3.6.egg/plone/staticresources/static/components/react/src/package.json` (package)

Is it possible to exclude package.json files from the releases via MANIFEST.in. IMHO those files do not belong into a release. Though, TBH I have no idea what plone.staticresources does or how it works. :/

@rodfersou
Copy link
Member

rodfersou commented Apr 8, 2020

looks like the docs changed; the option would be probably: https://jestjs.io/docs/en/configuration.html#testpathignorepatterns-arraystring

@thet
Copy link
Member

thet commented Aug 17, 2020

We need to add "package.json" to https://github.com/plone/plone.staticresources/blob/master/src/plone/staticresources/static/.gitignore and remove all package.json files from the https://github.com/plone/plone.staticresources/tree/master/src/plone/staticresources/static/components folder.

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

No branches or pull requests

3 participants