Skip to content

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

Closed

Description

@Darkle

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/[email protected]/dist/lib/operators.js and also on jsdelivr: https://cdn.jsdelivr.net/npm/[email protected]/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.

Activity

  1. Darkle commented on Dec 18, 2021

    @Darkle
    Author

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

  2. sdepold commented on Dec 18, 2021

    @sdepold
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions