-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallyFix AvailableA PR has been opened for this issueA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
Milestone
Description
Bug Report
π Search Terms
"npm 7"
π Version & Regression Information
- This is the behavior in every version I tried
β― Playground Link
N/A
π» Code
//@filename: index.js
'use strict';
var debug = require('debug');
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
package.json
{
"name": "express-app11",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node app"
},
"description": "ExpressApp11",
"author": {
"name": ""
},
"dependencies": {
"body-parser": "^1.15.0",
"cookie-parser": "^1.4.0",
"debug": "^2.2.0",
"express": "^4.14.0",
"morgan": "^1.7.0",
"pug": "^2.0.0-beta6",
"serve-favicon": "^2.3.0"
},
"engines": {
"node": "~6.10.x"
}
}
π Actual behavior
Typings installer log:
Found package names: ["accepts","acorn","acorn-globals","align-text","array-flatten","asap","babel-runtime","babel-types","babylon","basic-auth","body-parser","bytes","call-bind","camelcase","center-align","character-parser","clean-css","cliui","content-disposition","content-type","cookie","cookie-parser","cookie-signature","core.js","core-js","debug","decamelize","depd","destroy","doctypes","ee-first","encodeurl","escape-html","esutils","etag","express","finalhandler","forwarded","fresh","function-bind","get-intrinsic","has","has-symbols","http-errors","inherits","is-buffer","is-core-module","is-expression","is-promise","is-regex","js-stringify","jstransformer","kind-of","lazy-cache","lodash","longest","media-typer","merge-descriptors","methods","mime","mime-db","mime-types","morgan","ms","negotiator","object-assign","on-finished","on-headers","parseurl","path-parse","path-to-regexp","promise","proxy-addr","pug","pug-attrs","pug-code-gen","pug-error","pug-filters","pug-lexer","pug-linker","pug-load","pug-parser","pug-runtime","pug-strip-comments","pug-walk","qs","range-parser","raw-body","regenerator-runtime","repeat-string","resolve","right-align","safer-buffer","send","serve-favicon","serve-static","statuses","to-fast-properties","toidentifier","token-stream","type-is","uglify-js","uglify-to-browserify","unpipe","utils-merge","vary","void-elements","window-size","with","wordwrap","yargs"]
π Expected behavior
Typings installer log:
Found package names: ["body-parser","cookie-parser","core.js","debug","express","morgan","pug","serve-favicon"]
Investigation notes
ATA discovers typings from the node modules folder by parsing each depedency's package.json
and using the _requiredBy
field to determine whether it's a top-level dependency or not.
In NPM 7, this field was removed, so every dependency is considered top-level and has its typings installed.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallyFix AvailableA PR has been opened for this issueA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone