Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: npm/npm-lifecycle
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: latest
Choose a base ref
...
head repository: pnpm/npm-lifecycle
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Sep 5, 2018

  1. fix: set only one PATH env variable for child proc

    #22 caused a regression in pnpm when users had a version of npm
    without the revert and a new version of pnpm with rever #22.
    
    Old npm was duplicating the PATH env variables.
    New pnpm was not overriding all of them.
    
    Using only one PATH env variable will reduce uncertainty.
    zkochan authored Sep 5, 2018
    Copy the full SHA
    371d634 View commit details

Commits on Sep 6, 2018

  1. Copy the full SHA
    fabae1a View commit details
  2. chore: add renovate

    zkochan committed Sep 6, 2018
    Copy the full SHA
    c44c2ff View commit details
  3. Copy the full SHA
    a9fa411 View commit details
  4. 2.1.1

    zkochan committed Sep 6, 2018
    Copy the full SHA
    a4330d9 View commit details

Commits on Dec 27, 2018

  1. Copy the full SHA
    a468250 View commit details
  2. 2.2.0

    zkochan committed Dec 27, 2018
    Copy the full SHA
    ec87afa View commit details

Commits on May 6, 2019

  1. feat: update dependencies

    BREAKING CHANGE:
    
    require Node.js>=8.15
    zkochan committed May 6, 2019
    Copy the full SHA
    96ad8bb View commit details
  2. ci: test with pnpm

    zkochan committed May 6, 2019
    Copy the full SHA
    a78e887 View commit details
  3. test: fix

    zkochan committed May 6, 2019
    Copy the full SHA
    b42624a View commit details
  4. refactor: use modern syntax

    zkochan committed May 6, 2019
    Copy the full SHA
    eeef49c View commit details
  5. 3.0.0

    zkochan committed May 6, 2019
    Copy the full SHA
    f437c0d View commit details

Commits on Jun 9, 2019

  1. feat: opts.extraBinPaths

    zkochan committed Jun 9, 2019
    Copy the full SHA
    cde3ee0 View commit details
  2. 3.1.0

    zkochan committed Jun 9, 2019
    Copy the full SHA
    6513825 View commit details

Commits on Jun 10, 2019

  1. Copy the full SHA
    38bc83b View commit details
  2. 3.1.1

    zkochan committed Jun 10, 2019
    Copy the full SHA
    0dcc84d View commit details

Commits on Jun 14, 2019

  1. Copy the full SHA
    c3acca4 View commit details
  2. 3.1.2

    zkochan committed Jun 14, 2019
    Copy the full SHA
    109de52 View commit details

Commits on Oct 3, 2019

  1. chore(deps): pin dependencies

    renovate-bot authored and zkochan committed Oct 3, 2019
    Copy the full SHA
    355ea7e View commit details

Commits on Oct 4, 2019

  1. Copy the full SHA
    e694b1b View commit details
  2. Copy the full SHA
    eed2ce7 View commit details
  3. Copy the full SHA
    d1673c7 View commit details
  4. Copy the full SHA
    352bab7 View commit details
  5. 3.1.3

    zkochan committed Oct 4, 2019
    Copy the full SHA
    c514fb0 View commit details

Commits on Oct 29, 2019

  1. Copy the full SHA
    47af964 View commit details
  2. 3.1.4

    zkochan committed Oct 29, 2019
    Copy the full SHA
    a601d4e View commit details

Commits on Nov 21, 2019

  1. Copy the full SHA
    f73ac03 View commit details

Commits on Dec 22, 2019

  1. Copy the full SHA
    363f72f View commit details

Commits on Jan 22, 2020

  1. Copy the full SHA
    87f1ac8 View commit details
  2. Copy the full SHA
    7e3cdc0 View commit details
  3. Copy the full SHA
    b94034c View commit details
  4. Copy the full SHA
    654774a View commit details

Commits on Feb 21, 2020

  1. Copy the full SHA
    47faab9 View commit details

Commits on Apr 4, 2020

  1. Copy the full SHA
    aec20dd View commit details
  2. Copy the full SHA
    e30ff4f View commit details

Commits on May 8, 2020

  1. Copy the full SHA
    40f3554 View commit details

Commits on May 30, 2020

  1. feat: opt.extraEnv

    zkochan committed May 30, 2020
    Copy the full SHA
    e489659 View commit details
  2. 3.2.0

    zkochan committed May 30, 2020
    Copy the full SHA
    c59e22a View commit details
  3. chore: add .npmrc

    zkochan committed May 30, 2020
    Copy the full SHA
    27c5a9f View commit details

Commits on Jun 5, 2020

  1. Copy the full SHA
    ac59a2d View commit details
  2. Copy the full SHA
    f3ce664 View commit details
  3. feat: drop Node.js 8 support

    zkochan committed Jun 5, 2020
    Copy the full SHA
    3c9c575 View commit details
  4. 4.0.0

    zkochan committed Jun 5, 2020
    Copy the full SHA
    dab04f7 View commit details

Commits on Jul 12, 2020

  1. Copy the full SHA
    5055bff View commit details

Commits on Sep 21, 2020

  1. feat: opts.shellEmulator

    zkochan committed Sep 21, 2020
    Copy the full SHA
    4b1a3db View commit details
  2. chore(release): 4.1.0-0

    zkochan committed Sep 21, 2020
    Copy the full SHA
    a5e7e5d View commit details

Commits on Sep 23, 2020

  1. chore(release): 4.1.0

    zkochan committed Sep 23, 2020
    Copy the full SHA
    3d2d2ca View commit details

Commits on Nov 28, 2020

  1. Copy the full SHA
    720a2ac View commit details

Commits on Jan 7, 2021

  1. Copy the full SHA
    c8f74b5 View commit details
  2. Copy the full SHA
    2c2a014 View commit details
Showing with 6,527 additions and 9,950 deletions.
  1. +45 −0 .github/workflows/ci.yml
  2. +8 −5 .travis.yml
  3. +9 −3 README.md
  4. +5 −9 appveyor.yml
  5. +142 −150 index.js
  6. +61 −0 lib/extendPath.js
  7. +0 −9,663 package-lock.json
  8. +33 −20 package.json
  9. +6,020 −0 pnpm-lock.yaml
  10. +2 −0 pnpm-workspace.yaml
  11. +10 −0 renovate.json
  12. +8 −0 test/extendPath.test.js
  13. +3 −1 test/fixtures/count-to-10/package.json
  14. +3 −0 test/fixtures/count-to-10/postinstall.js
  15. +178 −99 test/index.js
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on: [push, pull_request]

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
build:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.platform }}-${{ matrix.node }}
cancel-in-progress: true

strategy:
fail-fast: false
matrix:
node:
- '16.14'
- '18'
- '20'
platform:
- ubuntu-latest
- windows-latest

name: '${{matrix.platform}} / Node.js ${{ matrix.node }}'
runs-on: ${{matrix.platform}}

steps:
- name: Checkout Commit
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v4.1.0
with:
standalone: true
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: pnpm install
run: pnpm install
# - name: Audit
# run: pnpm audit
- name: run tests
run: pnpm test
13 changes: 8 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
language: node_js
sudo: false
node_js:
- "14"
- "12"
- "10"
- "9"
- "8"
- "7"
- "6"
- "4"
before_install:
- curl -L https://unpkg.com/@pnpm/self-installer | node
install:
- pnpm install
script:
- pnpm test
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# npm-lifecycle [![npm version](https://img.shields.io/npm/v/npm-lifecycle.svg)](https://npm.im/npm-lifecycle) [![license](https://img.shields.io/npm/l/npm-lifecycle.svg)](https://npm.im/npm-lifecycle) [![Travis](https://img.shields.io/travis/npm/npm-lifecycle/latest.svg)](https://travis-ci.org/npm/npm-lifecycle) [![AppVeyor](https://img.shields.io/appveyor/ci/npm/npm-lifecycle/latest.svg)](https://ci.appveyor.com/project/npm/npm-lifecycle) [![Coverage Status](https://coveralls.io/repos/github/npm/npm-lifecycle/badge.svg?branch=latest)](https://coveralls.io/github/npm/npm-lifecycle?branch=latest)
# @pnpm/npm-lifecycle

[`npm-lifecycle`](https://github.com/npm/npm-lifecycle) is a standalone library for
[`@pnpm/npm-lifecycle`](https://github.com/pnpm/npm-lifecycle) is a standalone library for
executing packages' lifecycle scripts. It is extracted from npm itself and
intended to be fully compatible with the way npm executes individual scripts.

## Install

`$ npm install npm-lifecycle`
`$ pnpm add @pnpm/npm-lifecycle`

## Table of Contents

@@ -42,9 +42,15 @@ jump in if you'd like to, or even ask us questions if something isn't clear.

* `opts.stdio` - the [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio)
passed to the child process. `[0, 1, 2]` by default.
* `opts.runConcurrently` - *Boolean* - `false` by default. If `true`, lifecycle scripts may run concurrently.
* `opts.extraEnv` - *Record<string, string>* - add some extra env vars to the exec environment of the lifecycle script.

##### Example

```javascript
lifecycle()
```

## License

Artistic-2.0
14 changes: 5 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
environment:
matrix:
- nodejs_version: "14"
- nodejs_version: "12"
- nodejs_version: "10"
- nodejs_version: "9"
- nodejs_version: "8"
- nodejs_version: "7"
- nodejs_version: "6"
- nodejs_version: "4"

platform:
- x64

install:
- ps: Install-Product node $env:nodejs_version $env:platform
- npm config set spin false
- npm i -g npm@latest
- npm install
- curl -L https://unpkg.com/@pnpm/self-installer | node
- pnpm install

test_script:
- npm test
- pnpm test

matrix:
fast_finish: true
Loading