Skip to content

Commit

Permalink
feat: add support for bun (#45)
Browse files Browse the repository at this point in the history
## Changes

- add support for bun (resolves #43)
- add `release` workflow for GitHub actions (resolves #20)
- update dependencies
  • Loading branch information
mheob authored Oct 29, 2023
1 parent b3ce22d commit 91d80a2
Show file tree
Hide file tree
Showing 7 changed files with 683 additions and 630 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
module.exports = {
root: true,
extends: ['@mheob/eslint-config'],
rules: {
'unicorn/no-null': 'off',
},
};
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
version: latest

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
release:
types: [created]

jobs:
release:
name: release

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: latest

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
registry-url: "https://registry.npmjs.org"

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Release binary
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
lts/*
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Lightweight script to detect which package manager executes the current process.

Currently, only the package manager `npm`, `yarn` and `pnpm` are supported.
Currently, only the package manager `bun`, `npm`, `yarn` and `pnpm` are supported.

## Installation

Expand All @@ -24,6 +24,12 @@ or
pnpm add used-pm
```

or

```sh
bun add used-pm
```

## Usage

In `esm`:
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "used-pm",
"version": "1.0.3",
"version": "1.1.0",
"description": "Detects what package manager executes the process",
"keywords": [
"npm",
Expand Down Expand Up @@ -50,20 +50,20 @@
}
},
"devDependencies": {
"@commitlint/cli": "^17.7.2",
"@commitlint/config-conventional": "^17.7.0",
"@mheob/commitlint-config": "^1.1.0",
"@mheob/eslint-config": "^5.1.0",
"@mheob/prettier-config": "^3.1.0",
"@commitlint/cli": "^18.2.0",
"@commitlint/config-conventional": "^18.1.0",
"@mheob/commitlint-config": "^1.1.1",
"@mheob/eslint-config": "^5.1.1",
"@mheob/prettier-config": "^3.1.1",
"@mheob/tsconfig": "^2.0.0",
"@types/node": "^20.8.2",
"@types/node": "^20.8.9",
"@vitest/coverage-c8": "^0.33.0",
"commitizen": "^4.3.0",
"concurrently": "^8.2.1",
"concurrently": "^8.2.2",
"cz-git": "^1.7.1",
"eslint": "^8.50.0",
"eslint": "^8.52.0",
"husky": "^8.0.3",
"lint-staged": "^14.0.1",
"lint-staged": "^15.0.2",
"prettier": "^3.0.3",
"rimraf": "^5.0.5",
"ts-node": "^10.9.1",
Expand Down
Loading

0 comments on commit 91d80a2

Please sign in to comment.