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

fix: fix import/export path #289

Merged
merged 3 commits into from
Oct 14, 2022
Merged

fix: fix import/export path #289

merged 3 commits into from
Oct 14, 2022

Conversation

fisker
Copy link
Member

@fisker fisker commented Oct 14, 2022

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Oct 14, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (a2563ea) compared to base (4cd94c1).
Patch has no changes to coverable lines.

❗ Current head a2563ea differs from pull request most recent head 2106700. Consider uploading reports for the commit 2106700 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #289   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           77        77           
  Lines          530       530           
  Branches       131       131           
=========================================
  Hits           530       530           
Impacted Files Coverage Δ
src/yaml.ts 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@fisker fisker marked this pull request as ready for review October 14, 2022 07:49
@fisker fisker merged commit 5c41875 into prettier:main Oct 14, 2022
@fisker fisker deleted the exports branch October 14, 2022 07:56
@@ -3,18 +3,22 @@
// tslint:disable:variable-name

import YAML from "yaml";
import { CST } from "yaml/parse-cst.js";
// eslint-disable-next-line import/extensions
import { CST } from "yaml/parse-cst";
Copy link
Member

@thorn0 thorn0 Oct 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should these imports be without extensions?

Copy link
Member Author

@fisker fisker Oct 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old yaml use

"exports": {
    ".": "./index.js",
    "./parse-cst": "./parse-cst.js",
    "./types": [
      {
        "import": "./types.mjs"
      },
      "./types.js"
    ],
    "./util": [
      {
        "import": "./util.mjs"
      },
      "./util.js"
    ],
    "./": "./" // <-- problem
  },

, can't be import with yaml/parse-cst.js, but can be imported with yaml/parse-cst.

https://unpkg.com/browse/[email protected]/package.json

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.

3 participants