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

No way to import ExtendedCookieJar #761

Closed
gera2ld opened this issue Apr 2, 2024 · 2 comments
Closed

No way to import ExtendedCookieJar #761

gera2ld opened this issue Apr 2, 2024 · 2 comments
Labels
bug Something isn't working released

Comments

@gera2ld
Copy link

gera2ld commented Apr 2, 2024

Bug Report

According to the docs, we can set a ExtendedCookieJar to persist the cookies.
However, there is no way to import ExtendedCookieJar because it is not properly exported.

Describe the bug

There is no way to import ExtendedCookieJar because it is not properly exported in package.json or ./dist/esm/src/index-node.js.

Minimal Reproduction

  • Create a new project, install yahoo-finance2.
  • Create index.mjs with following content:
import { ExtendedCookieJar } from 'yahoo-finance2/dist/esm/src/lib/cookieJar.js';

console.log(ExtendedCookieJar);

Get error: ERR_PACKAGE_PATH_NOT_EXPORTED

Environment

Browser or Node: Node
Node version (if applicable): 21.7.1
Npm version: 10.5.0
Browser verion (if applicable):
Library version (e.g. 1.10.1): 2.11.0

Additional Context

@gera2ld gera2ld added the bug Something isn't working label Apr 2, 2024
@gadicc gadicc closed this as completed in 5f99351 Apr 5, 2024
@gadicc
Copy link
Owner

gadicc commented Apr 5, 2024

Right you are, @gera2ld; thanks for reporting.

This has been fixed and will be in the next release; there will be an automated message here when that happens.

You can also now import directly from the package root, i.e., in your index.mjs example above:

import { ExtendedCookieJar } from 'yahoo-finance2'

console.log(ExtendedCookieJar); // works now

Thanks again.

gadicc pushed a commit that referenced this issue Apr 5, 2024
## [2.11.1](v2.11.0...v2.11.1) (2024-04-05)

### Bug Fixes

* **cookieJar:** re-export ExtendedCJ from package root (fixes [#761](#761)) ([5f99351](5f99351))
@gadicc
Copy link
Owner

gadicc commented Apr 5, 2024

🎉 This issue has been resolved in version 2.11.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gadicc gadicc added the released label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

2 participants