Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@labshare/semantic-release-config

Package Overview
Dependencies
Maintainers
23
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@labshare/semantic-release-config

Shared semantic-release configuration for LabShare Github projects

  • 1.1.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
125
increased by8.7%
Maintainers
23
Weekly downloads
 
Created
Source

semantic-release-config

semantic-release

Shared configuration for Semantic Release. Details: shared-config.

Available Configurations

Labshare repositories can use the following configurations:

Default:

Defined in index.js file, loaded by default when requiring @labshare/semantic-release-config. Used by both client-side and server-side projects, contains the standard release procedure for semantic-release.

Usage Instructions:

  • Install this module as devDependency: npm i @labshare/semantic-release-config --save-dev
  • Add to your semantic-release config file:
{
  "extends": "@labshare/semantic-release-config"
}

Angular Lib:

Defined in angular-lib.js file, specific for Angular Libraries. Loaded by default when requiring @labshare/semantic-release-config/angular-lib and adapted for the following requirements:

  • Angular Libraries are built with NgPackagr. During build step (npm run build:lib), NgPackagr will create a new folder for the bundled package (/dist, by default). This happens because:
    • Several bundle types will be compiled - FESM2015, FESM5, UMD, Minified UMD bundle, etc.
    • Package metadata will be altered - "main", "module", "es2015" and other fields will be created; npm scripts will be removed (security vulnerabilities)
    • Extra Dependencies might be necessary and will be added automatically.
    • Package Typings and Metadata will be generated by Ngc AOT and exported automatically.

In order for NgPackagr and Semantic-Release integrate correctly, some adjustments have been made necessary:

  • Npm released package should only contain the bundle inside /dist
  • Semantic-release plugin will automatically update package.json and package-lock.json versions to reflect updates on Git repository after a release. However, since the default folder is now /dist, this specific configuration has to update root package.json and package-lock.json files with customized scripts.

Usage Instructions:

In your Angular Library repository:

  • Install ngPackagr as devDependency and configure it

  • Make sure you have build:lib script configured to call ng-packagr in the repo to be built, as well as semantic-release script.

  • Install this module as devDependency: npm i @labshare/semantic-release-config --save-dev

  • Add to your semantic-release config file:

{
  "extends": "@labshare/semantic-release-config/angular-lib"
}
  • Setup your Travis.yml to call build and semantic-release scripts during release step. E.g.:
jobs:
  include:
    - stage: release
      if: branch = master
      node_js: lts/*
      script:
        - npm run build:lib
      deploy:
        provider: script
        skip_cleanup: true
        script:
          - npm run semantic-release
  • Make sure you have configured Travis CI Environment Tokens for Semantic-Release correctly.
    • NPM_TOKEN owner should have publish permission on NPM groups.
    • GH_TOKEN owner should have push permission for the Git Repository.

Keywords

FAQs

Package last updated on 10 Jun 2022

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