test-engines-node-version-check

    0.2.0 • Public • Published

    test-engines-node-version-check

    Tests experience for deprecated Node.js versions in package managers using engines field.

    With engines field

    Testing with Node.js version v8.11.3

    $ node --version
    v8.11.3

    npm

    The package installation succeeds, as engine-strict is not defined.

    $ npm --version
    5.6.0
    
    $ npm install test-engines-node-version-check@0.0.2
    npm notice created a lockfile as package-lock.json. You should commit this file.
    npm WARN test-warning@1.0.0 No description
    npm WARN test-warning@1.0.0 No repository field.
    
    + test-engines-node-version-check@0.0.2
    added 1 package in 0.725s

    yarn

    The package installation fails.

    $ yarn --version
    1.22.10
    
    $ yarn add test-engines-node-version-check@0.0.2
    yarn add v1.22.10
    info No lockfile found.
    [1/4] 🔍  Resolving packages...
    [2/4] 🚚  Fetching packages...
    error test-engines-node-version-check@0.0.2: The engine "node" is incompatible with this module. Expected version ">=10.0.0". Got "8.11.3"
    error Found incompatible module.
    info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

    pnpm

    The package installation succeeds, as engine-strict is not defined.

    $ pnpm --version
    3.8.1
    
    $ pnpm add test-engines-node-version-check@0.0.2
    Already up-to-date
    Resolving: total 1, reused 0, downloaded 1, done
    
    dependencies:
    + test-engines-node-version-check 0.0.2

    With engines field and engine-strict=true in user .npmrc

    Testing with Node.js version v8.11.3

    $ node --version
    v8.11.3

    npm

    The package installation fails.

    $ npm --version
    5.6.0
    
    $ npm install test-engines-node-version-check@0.0.2
    npm ERR! code ENOTSUP
    npm ERR! notsup Unsupported engine for test-engines-node-version-check@0.0.2: wanted: {"node":">=10.0.0"} (current: {"node":"8.11.3","npm":"5.6.0"})
    npm ERR! notsup Not compatible with your version of node/npm: test-engines-node-version-check@0.0.2
    npm ERR! notsup Not compatible with your version of node/npm: test-engines-node-version-check@0.0.2
    npm ERR! notsup Required: {"node":">=10.0.0"}
    npm ERR! notsup Actual:   {"npm":"5.6.0","node":"8.11.3"}

    yarn

    The package installation fails.

    $ yarn --version
    1.22.10
    
    $ yarn add test-engines-node-version-check@0.0.2
    yarn add v1.22.10
    info No lockfile found.
    [1/4] 🔍  Resolving packages...
    [2/4] 🚚  Fetching packages...
    error test-engines-node-version-check@0.0.2: The engine "node" is incompatible with this module. Expected version ">=10.0.0". Got "8.11.3"
    error Found incompatible module.
    info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

    pnpm

    The package installation fails.

    $ pnpm --version
    3.8.1
    
    $ pnpm add test-engines-node-version-check@0.0.2
     ERROR  Your Node version is incompatible with "registry.npmjs.org/test-engines-node-version-check/0.0.2".
    
    Expected version: >=10.0.0
    Got: v8.11.3
    
    This is happening because the package's manifest has an engines.node field specified.
    To fix this issue, install the required Node version.

    With engines field and engineStrict=true

    The feature engineStrict was used prior to npm 3.0.0, and it was used to treat this package as if the user had set engine-strict. It is no longer used.

    Testing with Node.js version v8.11.3

    $ node --version
    v8.11.3

    npm

    The package installation succeeds, as engine-strict is not defined.

    $ npm --version
    5.6.0
    
    $ npm install test-engines-node-version-check@0.1.1
    npm notice created a lockfile as package-lock.json. You should commit this file.
    npm WARN test-warning@1.0.0 No description
    npm WARN test-warning@1.0.0 No repository field.
    
    + test-engines-node-version-check@0.1.1
    added 1 package in 0.796s

    yarn

    The package installation fails.

    $ yarn --version
    1.22.10
    
    $ yarn add test-engines-node-version-check@0.1.1
    yarn add v1.22.10
    info No lockfile found.
    [1/4] 🔍  Resolving packages...
    [2/4] 🚚  Fetching packages...
    error test-engines-node-version-check@0.1.1: The engine "node" is incompatible with this module. Expected version ">=10.0.0". Got "8.11.3"
    error Found incompatible module.
    info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

    pnpm

    The package installation succeeds, as engine-strict is not defined.

    $ pnpm --version
    3.8.1
    
    $ pnpm add test-engines-node-version-check@0.1.1
    Already up-to-date
    Resolving: total 1, reused 0, downloaded 1, done
    
    dependencies:
    + test-engines-node-version-check 0.1.1

    Supported Node.js version v10.24.0

    $ node --version
    v10.24.0

    npm

    The package installation succeeds.

    $ npm --version
    6.14.11
    
    $ npm install test-engines-node-version-check@0.0.2
    npm notice created a lockfile as package-lock.json. You should commit this file.
    npm WARN test-warning@1.0.0 No description
    npm WARN test-warning@1.0.0 No repository field.
    
    + test-engines-node-version-check@0.0.2
    added 1 package from 1 contributor and audited 1 package in 0.544s
    found 0 vulnerabilities

    yarn

    The package installation succeeds.

    $ yarn --version
    1.22.10
    
    $ yarn add test-engines-node-version-check@0.0.2
    yarn add v1.22.10
    info No lockfile found.
    [1/4] 🔍  Resolving packages...
    [2/4] 🚚  Fetching packages...
    [3/4] 🔗  Linking dependencies...
    [4/4] 🔨  Building fresh packages...
    
    success Saved lockfile.
    success Saved 1 new dependency.
    info Direct dependencies
    └─ test-engines-node-version-check@0.0.2
    info All dependencies
    └─ test-engines-node-version-check@0.0.2
    ✨  Done in 0.28s.

    pnpm

    The package installation succeeds.

    $ pnpm --version
    5.18.9
    
    $ pnpm add test-engines-node-version-check@0.0.2
    Packages: +1
    +
    Packages are hard linked from the content-addressable store to the virtual store.
      Content-addressable store is at: /Users/trivikr/.pnpm-store/v3
      Virtual store is at:             node_modules/.pnpm
    Progress: resolved 1, reused 0, downloaded 1, added 1, done
    
    dependencies:
    + test-engines-node-version-check 0.0.2

    Keywords

    none

    Install

    npm i test-engines-node-version-check

    DownloadsWeekly Downloads

    9

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    8.18 kB

    Total Files

    5

    Last publish

    Collaborators

    • trivikr