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

@nx/rollup is exporting a schema.d.ts file, which breaks Jest #17391

Closed
1 of 4 tasks
christopher-francisco opened this issue Jun 2, 2023 · 1 comment · Fixed by #17392
Closed
1 of 4 tasks

@nx/rollup is exporting a schema.d.ts file, which breaks Jest #17391

christopher-francisco opened this issue Jun 2, 2023 · 1 comment · Fixed by #17392

Comments

@christopher-francisco
Copy link

christopher-francisco commented Jun 2, 2023

Current Behavior

A schema.d.ts is being exported. Breaks jest

Here's a patch that fixes it:

# generated by patch-package 6.4.14
#
# declared package:
#   @nx/rollup: 16.3.1
#
diff --git a/node_modules/@nx/rollup/index.js b/node_modules/@nx/rollup/index.js
index d6ac066..be8c315 100644
--- a/node_modules/@nx/rollup/index.js
+++ b/node_modules/@nx/rollup/index.js
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
 const tslib_1 = require("tslib");
 tslib_1.__exportStar(require("./src/generators/init/init"), exports);
 tslib_1.__exportStar(require("./src/generators/rollup-project/rollup-project"), exports);
-tslib_1.__exportStar(require("./src/executors/rollup/schema"), exports);
+// tslib_1.__exportStar(require("./src/executors/rollup/schema"), exports);
 tslib_1.__exportStar(require("./src/executors/rollup/rollup.impl"), exports);
 //# sourceMappingURL=index.js.map

Expected Behavior

A schema.d.ts would NOT be exported

GitHub Repo

No response

Steps to Reproduce

  1. Call libraryGenerator from @nx/react in your local generator
  2. Run jest with the default jest.config.ts generated by the @nx/plugin generator generator

Nx Report

>  NX   Report complete - copy this into the issue template

   Node   : 18.16.0
   OS     : darwin arm64
   pnpm   : 6.10.1
   Hasher : Native

   nx (global)        : 16.0.2
   nx                 : 16.3.1
   @nx/js             : 16.3.1
   @nx/jest           : 16.3.1
   @nx/linter         : 16.3.1
   @nx/workspace      : 16.3.1
   @nx/cypress        : 16.3.1
   @nx/devkit         : 16.3.1
   @nx/eslint-plugin  : 16.3.1
   @nx/plugin         : 16.3.1
   @nx/react          : 16.3.1
   @nx/rollup         : 16.3.1
   @nx/storybook      : 16.3.1
   @nrwl/tao          : 16.0.2
   @nx/webpack        : 16.3.1
   typescript         : 4.8.4
   ---------------------------------------
   Local workspace plugins:
         [REMOVED as these are enterprise packages]
   ---------------------------------------
   The following packages should match the installed version of nx
     - @nrwl/[email protected]

   To fix this, run `nx migrate [email protected]`

Failure Logs

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

The exact same problem, but on a different package is described in #12145. Is there a reason why we're using schema.d.ts instead of schema.ts files? Looks like the tooling is treating it as a JS file and creating a broken entrypoint for it?

@github-actions
Copy link

github-actions bot commented Jul 7, 2023

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant