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

operators.ts instead of operators.js file showing up on npm install #13788

Closed
5 tasks
Darkle opened this issue Dec 18, 2021 · 2 comments
Closed
5 tasks

operators.ts instead of operators.js file showing up on npm install #13788

Darkle opened this issue Dec 18, 2021 · 2 comments

Comments

@Darkle
Copy link

Darkle commented Dec 18, 2021

Issue Creation Checklist

[x ] I have read the contribution guidelines

Bug Description

What do you expect to happen?

There should be an operator.js file in the node_modules/sequelize/lib/ folder after installing sequelize.

What is actually happening?

There is an operators.ts file instead of the operator.js file in the node_modules/sequelize/lib/ folder after installing sequelize.

Additional context

Screenshot:

sq

I am unuable to reproduce this locally though. When i git clone the sequelize repo and run npm run build it does spit out an operators.js file as you can see in this screenshot:

sq2

Also, another bit of weirdness: It shows up properly on unpkg: https://unpkg.com/browse/sequelize@6.12.0/dist/lib/operators.js and also on jsdelivr: https://cdn.jsdelivr.net/npm/sequelize@6.12.0/dist/lib/operators.js. However, if you try to download the gzipped tar from npm, the issue mentioned above is present: https://registry.npmjs.org/sequelize/-/sequelize-6.12.0.tgz

So perhaps its an issue with the tar?

I also tried running npm cache clean --force but after a reinstall it is still showing operators.ts instead of operators.js.

Related I think: #13731

Environment

  • Debian Linux
  • Sequelize version: 6.12.0
  • Node.js version: v16.13.0
  • npm version: 8.3.0

Bug Report Checklist

How does this problem relate to dialects?

  • [ x] I think this problem happens regardless of the dialect.
  • I think this problem happens only for the following dialect(s):
  • I don't know, I was using PUT-YOUR-DIALECT-HERE, with connector library version XXX and database version XXX

Would you be willing to resolve this issue by submitting a Pull Request?

  • Yes, I have the time and I know how to start.
  • [x ] Yes, I have the time but I don't know how to start, I would need guidance.
  • No, I don't have the time, although I believe I could do it if I had the time...
  • No, I don't have the time and I wouldn't even know how to start.
@Darkle
Copy link
Author

Darkle commented Dec 18, 2021

Ok I think it is showing up now. I have other issues relating to typescript so I will close this.

@Darkle Darkle closed this as completed Dec 18, 2021
@sdepold
Copy link
Member

sdepold commented Dec 18, 2021

Actually you are correct: there is no lib/operators.js anymore. It is part of the dist directory however. I'd suggest to use the exported Op property of the sequelize object

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

2 participants