np icon indicating copy to clipboard operation
np copied to clipboard

contents does not work when defined in config file

Open smeijer opened this issue 2 years ago • 4 comments

Description

np --contents=./lib and np with contents: './lib' in .np-config.js have different outcomes.

Steps to reproduce

  1. publish a package with np --contents=./lib
  2. publish a package with np having module.exports = { contents: './lib' } in .np-config.js

Expected behavior

The outcomes of 1 and 2 should be the same, but they are not. The contents property in a config file seems to be ignored. Passing it as an argument to np has the expected outcome.

Environment

np - 7.5.0 Node.js - 16.3.0 npm - 7.18.1 Git - 2.25.1 OS - Ubuntu 20.04 LTS

smeijer avatar Sep 11 '21 11:09 smeijer

I think local .np-config.js files are skipped entirely.

smeijer avatar Sep 11 '21 11:09 smeijer

I think local .np-config.js files are skipped entirely.

Is json extension are not?

johnsiras avatar Jul 03 '22 12:07 johnsiras

@sindresorhus will you able to fix this?

johnsiras avatar Jul 04 '22 10:07 johnsiras

I think that works but why am i getting this?

image

johnsiras avatar Jul 04 '22 10:07 johnsiras