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

Why is there a fucknpm directory when installing via npm? #212

Open
laurent22 opened this issue Mar 15, 2019 · 3 comments
Open

Why is there a fucknpm directory when installing via npm? #212

laurent22 opened this issue Mar 15, 2019 · 3 comments

Comments

@laurent22
Copy link

$ ll node_modules/js-sequence-diagrams/
total 72
drwxr-xr-x   15 laurent  staff   480B 15 Mar 22:04 .
drwxr-xr-x  604 laurent  staff    19K 15 Mar 22:04 ..
-rw-r--r--    1 laurent  staff    91B 24 Aug  2016 .gitmodules
-rw-r--r--    1 laurent  staff    32B 24 Aug  2016 .npmignore
-rw-r--r--    1 laurent  staff    50B 24 Aug  2016 .travis.yml
-rw-r--r--    1 laurent  staff   1.3K 24 Aug  2016 LICENCE
-rw-r--r--    1 laurent  staff   2.7K 24 Aug  2016 Makefile
-rw-r--r--    1 laurent  staff   6.3K 24 Aug  2016 README.md
drwxr-xr-x    4 laurent  staff   128B 15 Mar 22:04 _site
-rw-r--r--    1 laurent  staff   827B 24 Aug  2016 bower.json
drwxr-xr-x    3 laurent  staff    96B 15 Mar 22:04 fonts
drwxr-xr-x    8 laurent  staff   256B 15 Mar 22:04 fucknpm
-rw-r--r--    1 laurent  staff   1.7K 15 Mar 22:04 package.json
drwxr-xr-x    8 laurent  staff   256B 15 Mar 22:04 src
drwxr-xr-x    8 laurent  staff   256B 15 Mar 22:04 test

It seems to contain the required built files:

$ ll node_modules/js-sequence-diagrams/fucknpm/
total 656
drwxr-xr-x   8 laurent  staff   256B 15 Mar 22:04 .
drwxr-xr-x  15 laurent  staff   480B 15 Mar 22:04 ..
-rw-r--r--   1 laurent  staff    29K 24 Aug  2016 diagram-grammar.js
-rw-r--r--   1 laurent  staff    26K 24 Aug  2016 grammar.js
-rw-r--r--   1 laurent  staff    23K 24 Aug  2016 grammar.js.tmp
-rw-r--r--   1 laurent  staff    83K 24 Aug  2016 sequence-diagram-min.js
-rw-r--r--   1 laurent  staff    37K 24 Aug  2016 sequence-diagram-min.js.map
-rw-r--r--   1 laurent  staff   117K 24 Aug  2016 sequence-diagram.js

Not sure if the name is a joke or something but it doesn't inspire confidence as it makes it look like the npm repo has been hacked. Is it possible to get some info about it? If it's a joke, good, but please document it.

@bramp
Copy link
Owner

bramp commented Mar 16, 2019

I have no idea why that directory is named like that. How did you install this package? You can see in the Makefile that that directory should be called 'dist'.

@laurent22
Copy link
Author

I've ran npm i -s js-sequence-diagrams. I see that Boostnote, which also uses this package, has this directory too: https://github.com/BoostIO/Boostnote/blob/22d494d3f13a0d271432ee33da63c9c6683fa201/lib/main.html#L134

Maybe it's someone else who've repackaged your library?

@bramp
Copy link
Owner

bramp commented Mar 28, 2019

Yes, looks like you are using a fork https://www.npmjs.com/package/js-sequence-diagrams

I only have a package published in Bower (bramp/js-sequence-diagrams) not on npm.

Ma27 added a commit to Ma27/nixpkgs that referenced this issue Apr 7, 2019
This diff regenerates the package sets for `codimd` and `codemirror`
using NodeJS 8 to get rid of the deprecated[1] `nodejs-6_x`.

Additionally the following issues had to be fixed during the update:

* The package `js-sequence-diagram` has been removed from the NPM
  registry and was replaced by a security holding package[2]. The
  package was published by a third-party (upstream only supports bower
  builds), so it's unclear whether the package will re-appear[3].

  As the tarballs still exist (and the hash didn't change), the package
  will be loaded manually into the build env.

* For the babel-related packages, `dontNpmInstall` will be set for
  `node2nix` installs as some of those packages bundle a
  `package-lock.json` that triggers `ENOTCACHED` errors for optional
  dependencies[4].

For now it should be sufficient to use NodeJS 8 (`codimd` v1.2.x doesn't
support NodeJS 10), in the long term we probably want to use `yarn2nix`
here with NodeJS 10. This is much rather a fix to get rid of another
NodeJS 6 dependency.

[1] `nodejs-6_x` is about to be deprecated, see NixOS#58976
[2] https://www.npmjs.com/package/js-sequence-diagrams,
    https://github.com/npm/security-holder
[3] bramp/js-sequence-diagrams#212
[4] svanderburg/node2nix#134
lheckemann pushed a commit to NixOS/nixpkgs that referenced this issue Apr 7, 2019
This diff regenerates the package sets for `codimd` and `codemirror`
using NodeJS 8 to get rid of the deprecated[1] `nodejs-6_x`.

Additionally the following issues had to be fixed during the update:

* The package `js-sequence-diagram` has been removed from the NPM
  registry and was replaced by a security holding package[2]. The
  package was published by a third-party (upstream only supports bower
  builds), so it's unclear whether the package will re-appear[3].

  As the tarballs still exist (and the hash didn't change), the package
  will be loaded manually into the build env.

* For the babel-related packages, `dontNpmInstall` will be set for
  `node2nix` installs as some of those packages bundle a
  `package-lock.json` that triggers `ENOTCACHED` errors for optional
  dependencies[4].

For now it should be sufficient to use NodeJS 8 (`codimd` v1.2.x doesn't
support NodeJS 10), in the long term we probably want to use `yarn2nix`
here with NodeJS 10. This is much rather a fix to get rid of another
NodeJS 6 dependency.

[1] `nodejs-6_x` is about to be deprecated, see #58976
[2] https://www.npmjs.com/package/js-sequence-diagrams,
    https://github.com/npm/security-holder
[3] bramp/js-sequence-diagrams#212
[4] svanderburg/node2nix#134

(cherry picked from commit 5feec42,
PR #59118)
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

No branches or pull requests

2 participants