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

Add support for both esm and cjs output using rollup bundler, update node to 21, replace mocha test runner with native node test runner #68

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

anthony-y-zhu14
Copy link

@anthony-y-zhu14 anthony-y-zhu14 commented Mar 2, 2025

  • use rollup to produce both comonjs and esm output
  • remove mocha dependencies and use native node test runner
  • upversion dev dependencies to latest
  • update package-lock.json using node 21

output files:

.
├── LICENSE
├── README.md
├── README_0_2.md
├── lib
│   ├── Jsona.cjs
│   ├── Jsona.cjs.map
│   ├── Jsona.d.ts
│   ├── Jsona.js
│   ├── Jsona.js.map
│   ├── JsonaTypes.d.ts
│   ├── builders
│   │   ├── JsonDeserializer.cjs
│   │   ├── JsonDeserializer.cjs.map
│   │   ├── JsonDeserializer.d.ts
│   │   ├── JsonDeserializer.js
│   │   ├── JsonDeserializer.js.map
│   │   ├── ModelsSerializer.cjs
│   │   ├── ModelsSerializer.cjs.map
│   │   ├── ModelsSerializer.d.ts
│   │   ├── ModelsSerializer.js
│   │   ├── ModelsSerializer.js.map
│   │   ├── ReduxObjectDenormalizer.cjs
│   │   ├── ReduxObjectDenormalizer.cjs.map
│   │   ├── ReduxObjectDenormalizer.d.ts
│   │   ├── ReduxObjectDenormalizer.js
│   │   └── ReduxObjectDenormalizer.js.map
│   ├── cache.cjs
│   ├── cache.cjs.map
│   ├── cache.d.ts
│   ├── cache.js
│   ├── cache.js.map
│   ├── index.cjs
│   ├── index.cjs.map
│   ├── index.d.ts
│   ├── index.js
│   ├── index.js.map
│   ├── simplePropertyMappers.cjs
│   ├── simplePropertyMappers.cjs.map
│   ├── simplePropertyMappers.d.ts
│   ├── simplePropertyMappers.js
│   ├── simplePropertyMappers.js.map
│   ├── switchCasePropertyMappers.cjs
│   ├── switchCasePropertyMappers.cjs.map
│   ├── switchCasePropertyMappers.d.ts
│   ├── switchCasePropertyMappers.js
│   ├── switchCasePropertyMappers.js.map
│   ├── utils.cjs
│   ├── utils.cjs.map
│   ├── utils.d.ts
│   ├── utils.js
│   └── utils.js.map
├── package-lock.json
├── package.json
├── rollup.config.js
├── src
│   ├── Jsona.ts
│   ├── JsonaTypes.ts
│   ├── builders
│   │   ├── JsonDeserializer.ts
│   │   ├── ModelsSerializer.ts
│   │   └── ReduxObjectDenormalizer.ts
│   ├── cache.ts
│   ├── index.ts
│   ├── simplePropertyMappers.ts
│   ├── switchCasePropertyMappers.ts
│   └── utils.ts
├── tests
│   ├── Jsona.test.ts
│   ├── ModelsSerializer.test.ts
│   ├── ReduxObjectDenormalizer.test.ts
│   ├── mocks.ts
│   └── switchCasePropertyMappers.test.ts
└── tsconfig.json

- use rollup to produce both comonjs and esm output
- remove mocha dependencies and use native node test runner
- upversion dev dependencies to latest
- update package-lock.json using node 21
@anthony-y-zhu14 anthony-y-zhu14 changed the title feat: update node to 21, introduce rollup bundler to produce both commonjs and esm output for consumption, replace mocha test runner with native node test runner Add support for both esm and cjs output using rollup bundler, update node to 21, replace mocha test runner with native node test runner Mar 2, 2025
@anthony-y-zhu14
Copy link
Author

anthony-y-zhu14 commented Mar 2, 2025

this may also fix #66

@anthony-y-zhu14
Copy link
Author

@olosegres could you please review the changes to see if it's okay? I happy to explain our usecases but basically we are hoping to have a esm distribution of this library 🙂

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