Skip to content

Commit

Permalink
pm2@6.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech committed Feb 21, 2025
2 parents e3a327f + 653af36 commit 3586b31
Show file tree
Hide file tree
Showing 60 changed files with 1,611 additions and 822 deletions.
49 changes: 37 additions & 12 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,56 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on: [push, pull_request]

jobs:
build:

node-tests:
runs-on: ubuntu-latest
timeout-minutes: 30

strategy:
matrix:
node-version: [22.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [22.x]

steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: sudo apt install python3
- run: sudo apt install php-cli
- run: npm install
- run: npm run test:e2e
- run: npm run test:unit
- name: Install Python
run: sudo apt install python3
- name: Install PHP CLI
run: sudo apt install php-cli
- name: Install Node.js dependencies
run: npm install
- name: Run end-to-end tests
run: npm run test:e2e
- name: Run unit tests
run: npm run test:unit

bun-tests:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Remove Node.js installed by setup-node action (if any)
run: |
if command -v node &> /dev/null; then
sudo rm -rf "$(which node)"
fi
if command -v npm &> /dev/null; then
sudo rm -rf "$(which npm)"
fi
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies using Bun
run: bun install
- name: Run end-to-end tests with Bun
run: bun run test:e2e
- name: Run unit tests with Bun
run: bun run test:unit
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@

## 6.0.0

- Bun support - Fixes #5893 #5774 #5682 #5675 #5777
- Disable git parsing by default #5909 #2182 #5801 #5051 #5696
- Add WEBP content type for pm2 serve #5900 @tbo47
- Enable PM2 module update from tarball #5906 @AYOKINYA
- Fix treekil on FreeBSD #5896 @skeyby
- fix allowing to update namespaced pm2 NPM module (@org/module-name) #5915 @endelendel

## 5.4.3

- Update sub packages

## 5.4.2

- Update sub packages

## 5.4.1

- @pm2/io DeprecationWarning: The util._extend API is deprecated https://github.com/keymetrics/pm2-io-apm/issues/301 @egoroof
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div align="center">
<br/>

<picture>
<source
srcset="https://raw.githubusercontent.com/Unitech/pm2/master/pres/pm2-v4.png"
Expand Down Expand Up @@ -39,7 +40,7 @@
</div>


PM2 is a production process manager for Node.js applications with a built-in load balancer. It allows you to keep applications alive forever, to reload them without downtime and to facilitate common system admin tasks.
PM2 is a production process manager for Node.js/Bun applications with a built-in load balancer. It allows you to keep applications alive forever, to reload them without downtime and to facilitate common system admin tasks.

Starting an application in production mode is as easy as:

Expand All @@ -51,7 +52,7 @@ PM2 is constantly assailed by [more than 1800 tests](https://github.com/Unitech/

Official website: [https://pm2.keymetrics.io/](https://pm2.keymetrics.io/)

Works on Linux (stable) & macOS (stable) & Windows (stable). All Node.js versions are supported starting Node.js 12.X.
Works on Linux (stable) & macOS (stable) & Windows (stable). All Node.js versions are supported starting Node.js 12.X and Bun since v1


### Installing PM2
Expand All @@ -62,11 +63,17 @@ With NPM:
$ npm install pm2 -g
```

You can install Node.js easily with [NVM](https://github.com/nvm-sh/nvm#installing-and-updating) or [FNM](https://github.com/Schniz/fnm).
With Bun:

```bash
$ bun install pm2 -g
```

You can install Node.js easily with [NVM](https://github.com/nvm-sh/nvm#installing-and-updating) or [FNM](https://github.com/Schniz/fnm) and Bun with `curl -fsSL https://bun.sh/install | bash`

### Start an application

You can start any application (Node.js, Python, Ruby, binaries in $PATH...) like that:
You can start any application (Node.js, Bun, and also Python, Ruby, binaries in $PATH...) like that:

```bash
$ pm2 start app.js
Expand Down
6 changes: 5 additions & 1 deletion bin/pm2
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/usr/bin/env node
#!/bin/sh -
':' /*-
bun=$(bun --version 2>&1) && exec bun "$0" "$@"
node=$(node --version 2>&1) && exec node "$0" "$@"
*/

require('../lib/binaries/CLI.js');
6 changes: 5 additions & 1 deletion bin/pm2-dev
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/usr/bin/env node
#!/bin/sh -
':' /*-
bun=$(bun --version 2>&1) && exec bun "$0" "$@"
node=$(node --version 2>&1) && exec node "$0" "$@"
*/

require('../lib/binaries/DevCLI.js');
6 changes: 5 additions & 1 deletion bin/pm2-docker
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/usr/bin/env node
#!/bin/sh -
':' /*-
bun=$(bun --version 2>&1) && exec bun "$0" "$@"
node=$(node --version 2>&1) && exec node "$0" "$@"
*/

require('../lib/binaries/Runtime4Docker.js');
6 changes: 5 additions & 1 deletion bin/pm2-runtime
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/usr/bin/env node
#!/bin/sh -
':' /*-
bun=$(bun --version 2>&1) && exec bun "$0" "$@"
node=$(node --version 2>&1) && exec node "$0" "$@"
*/

require('../lib/binaries/Runtime4Docker.js');
3 changes: 3 additions & 0 deletions bin/pm2-windows
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node

require('../lib/binaries/CLI.js');
Loading

0 comments on commit 3586b31

Please sign in to comment.