New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@npmcli/template-oss

Package Overview
Dependencies
Maintainers
7
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@npmcli/template-oss

templated files used in npm CLI team oss projects

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5K
decreased by-50.97%
Maintainers
7
Weekly downloads
 
Created
Source

@npmcli/template-oss

This module bundles the npm CLI team's basics for package development into a single devDependency.

CAUTION: THESE CHANGES WILL OVERWRITE ANY LOCAL FILES AND SETTINGS

package.json patches

These fields will be set in the project's package.json:

{
  "author": "GitHub Inc.",
  "files": ["bin", "lib"],
  "license": "ISC",
  "templateVersion": "1.0.0",
  "scripts": {
    "lint": "eslint '**/*.js'",
    "lintfix": "npm run lint -- --fix",
    "preversion": "npm test",
    "postversion": "npm publish",
    "prepublishOnly": "git push origin --follow-tags",
    "snap": "tap",
    "test": "tap",
    "posttest": "npm run lint",
  }
}

The "templateVersion" field will be set to the version of this package being installed. This is used to determine if the postinstall script should take any action.

Extending

The changes constant located in lib/package.js should contain all patches for the package.json file. Be sure to correctly expand any object/array based values with the original package content.

Static files

Any existing .eslintrc.* files will be removed, unless they also match the pattern .eslintrc.local.*

These files will be copied, overwriting any existing files:

  • .eslintrc.js
  • .github/workflows/ci.yml
  • .gitignore
  • LICENSE.md
Extending

Place files in the lib/content/ directory, use only the file name and remove any leading . characters (i.e. .github/workflows/ci.yml becomes ci.yml and .gitignore becomes gitignore).

Modify the content object at the top of lib/content/index.js to include your new file. The object keys are destination paths, and values are source.

Package installation and removal

These packages will be removed:

  • eslint-plugin-import
  • eslint-plugin-promise
  • eslint-plugin-standard
  • @npmcli/lint

Afterwards, these packages will be installed as devDependencies:

  • eslint
  • eslint-plugin-node
  • @npmcli/eslint-config
  • tap
Extending

Make changes to the removeDeps and devDeps arrays in lib/install.js.

Keywords

FAQs

Package last updated on 01 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc