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

[DOCS] npm pkg delete complex key #4829

Closed
2 tasks done
atomiks opened this issue Apr 30, 2022 · 4 comments
Closed
2 tasks done

[DOCS] npm pkg delete complex key #4829

atomiks opened this issue Apr 30, 2022 · 4 comments
Labels
Documentation documentation related issue Needs Triage needs review for next steps

Comments

@atomiks
Copy link

atomiks commented Apr 30, 2022

Is there an existing issue for this?

  • I have searched the existing issues

This is a CLI Docs Enhancement, not another kind of Docs Enhancement.

  • This is a CLI Docs Enhancement.

Description of Problem

The docs don't mention how to delete a complex key.

I have an exports key that I need to delete before publish, but I'm not sure how (or if it's possible). I want to delete "./src/index.ts" before publish because it's only used as an entry point in the monorepo for development:

  "exports": {
    ".": {
      "import": {
        "development": "./dist/floating-ui.dom.esm.development.js",
        "production": "./dist/floating-ui.dom.esm.min.js",
        "default": "./dist/floating-ui.dom.esm.js"
      },
      "require": "./dist/floating-ui.dom.cjs"
    },
    "./package.json": "./package.json",
    "./src/index.ts": "./src/index.ts"
  },

npm pkg delete exports../src/index.ts does not work. Tried escape characters/quotes too

Potential Solution

No response

Docs URL

https://docs.npmjs.com/cli/v8/commands/npm-pkg

@atomiks atomiks added Documentation documentation related issue Needs Triage needs review for next steps labels Apr 30, 2022
@ljharb
Copy link
Contributor

ljharb commented Apr 30, 2022

Why can’t the exports path remain, and you just npmignore the file?

@atomiks
Copy link
Author

atomiks commented Apr 30, 2022

Skypack CDN errors when building as it can't find the module: floating-ui/floating-ui#1661

@ljharb
Copy link
Contributor

ljharb commented Apr 30, 2022

Seems like a bug in skypack, since an unimported path shouldn’t even be checked.

@wraithgar
Copy link
Member

~/D/n/s/foo $ npm pkg set "foo[.].bar"=bin
~/D/n/s/foo $ npm pkg get foo
{
  ".": {
    "bar": "bin"
  }
}

Docs will be updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation documentation related issue Needs Triage needs review for next steps
Projects
None yet
Development

No branches or pull requests

4 participants
@wraithgar @ljharb @atomiks and others