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

Publish new version on npm #1369

Closed
sebamarynissen opened this issue Jan 11, 2021 · 4 comments
Closed

Publish new version on npm #1369

sebamarynissen opened this issue Jan 11, 2021 · 4 comments

Comments

@sebamarynissen
Copy link

sebamarynissen commented Jan 11, 2021

I was wondering whether it would be possible to publish a new version on npm. As the Node world is slowly shifting towards native esm, it would be nice to have

import { expect } from 'chai';

but the last version on npm is from 2 years ago.

The functionality has already been added and merged into master (#1340), so unless I'm mistaken, I don't think there's anything holding it back. The feature has been implemented in a fully backwards compatible way, so I suggest it be a semver minor to 4.3.0.

Currently this is the only thing holding me back to migrate an entire codebase to native esm as the tests are the first thing I'm planning to migrate. You can get around this by using npm install https://github.com/chaijs/chai#master if you really want, but it's not the neatest solution.

/cc @giltayar

@giltayar
Copy link

I saw that it was merged, and was wondering why it wasn't yet in the released. I am working on a new (large) codebase that is totally on the ESM, and having to write

import chai from 'chai'
const {expect} = chai

is definitely a thorn in my side. I would love a new release based on my ESM entry points.

@sebamarynissen
Copy link
Author

In another project that is also completely esm I got around it with

import { expect } from './chai.js';

and then write the functionality manually in that chai.js file. It's only really viable though if all your tests are in a single folder. In my other project this is not the case and would result in creating this chai.js file in every test directory.

@keithamus
Copy link
Member

4.3.0 has been released.

@sebamarynissen
Copy link
Author

Thanks a lot!

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