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

Fix incomplete package entrypoint definitions #42

Merged
merged 4 commits into from
Dec 13, 2024
Merged

Fix incomplete package entrypoint definitions #42

merged 4 commits into from
Dec 13, 2024

Conversation

wadimw
Copy link
Contributor

@wadimw wadimw commented Dec 12, 2024

Fixed package.jsons in multiple monorepo packages to resolve some potential edge cases where various older setups might exhibit unexpected behaviour (like trouble loading them) due to missing or inconsistent main, module and exports entrypoint definitions

ilib-loctool-properties:test
cache miss, executing 104049eb1388b187

> ilib-loctool-properties@1.0.5 test /home/runner/work/ilib-mono/ilib-mono/packages/ilib-loctool-properties
> jest

FAIL test/PropertiesFile.test.js
  ● Test suite failed to run

    Cannot find module 'ilib-tools-common' from '../ilib-po/lib/Parser.js'

    Require stack:
      /home/runner/work/ilib-mono/ilib-mono/packages/ilib-po/lib/Parser.js
      /home/runner/work/ilib-mono/ilib-mono/packages/ilib-po/lib/POFile.js
      /home/runner/work/ilib-mono/ilib-mono/packages/ilib-po/lib/index.js
      /home/runner/work/ilib-mono/ilib-mono/packages/loctool/lib/POIntermediateFile.js
      /home/runner/work/ilib-mono/ilib-mono/packages/loctool/lib/IntermediateFileFactory.js
      /home/runner/work/ilib-mono/ilib-mono/packages/loctool/lib/LocalRepository.js
      /home/runner/work/ilib-mono/ilib-mono/packages/loctool/lib/Project.js
      /home/runner/work/ilib-mono/ilib-mono/packages/loctool/lib/CustomProject.js
      test/PropertiesFile.test.js

      45 | };
      46 | Object.defineProperty(exports, "__esModule", { value: true });
    > 47 | const ilib_tools_common_1 = require("ilib-tools-common");
         |                             ^
      48 | // @ts-expect-error -- untyped package
      49 | const ilib_locale_1 = __importDefault(require("ilib-locale"));
      50 | const SyntaxError_1 = __importDefault(require("./SyntaxError"));

      at Resolver.resolveModule (../../node_modules/.pnpm/jest-resolve@26.6.2/node_modules/jest-resolve/build/index.js:306:11)
      at Object.<anonymous> (../ilib-po/lib/Parser.js:47:29)
      at Object.<anonymous> (../ilib-po/lib/POFile.js:27:34)
      at Object.<anonymous> (../ilib-po/lib/index.js:25:34)
      at Object.<anonymous> (../loctool/lib/POIntermediateFile.js:21:10)
      at Object.<anonymous> (../loctool/lib/IntermediateFileFactory.js:23:26)
      at Object.<anonymous> (../loctool/lib/LocalRepository.js:27:27)
      at Object.<anonymous> (../loctool/lib/Project.js:27:23)
      at Object.<anonymous> (../loctool/lib/CustomProject.js:24:15)
      at Object.<anonymous> (test/PropertiesFile.test.js:23:26)

Also checked in a script to validate package.json entrypoints in bulk.

Copy link

changeset-bot bot commented Dec 12, 2024

🦋 Changeset detected

Latest commit: e28db79

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
ilib-lint-python-gnu Patch
ilib-tools-common Patch
ilib-lint-common Patch
ilib-lint-python Patch
ilib-data-utils Patch
ilib-lint-react Patch
ilib-assemble Patch
ilib-lint Patch
tmxtool Patch
ilib-loctool-tap-i18n Patch
ilib-po Patch
ilib-tmx Patch
ilib-yaml Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@wadimw
Copy link
Contributor Author

wadimw commented Dec 12, 2024

Tested locally that #31 rebased on top of this passes tests

@wadimw wadimw merged commit f9f1095 into main Dec 13, 2024
1 check passed
@wadimw wadimw deleted the fix-exports branch December 13, 2024 14:49
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.

2 participants