Skip to content

Commit c6e8a24

Browse files
The "ono" package is now just a wrapper around the scoped "@jsdevtools/ono" package
1 parent 3d32e92 commit c6e8a24

File tree

5 files changed

+59
-0
lines changed

5 files changed

+59
-0
lines changed

.github/workflows/CI-CD.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,15 @@ jobs:
145145
uses: JS-DevTools/npm-publish@v1
146146
with:
147147
token: ${{ secrets.NPM_TOKEN }}
148+
149+
- name: Prepare the non-scoped packaged
150+
run: |
151+
cp LICENSE *.md dist
152+
VERSION=$(node -e "console.log(require('./package.json').version)")
153+
sed -i "s/X.X.X/${VERSION}/g" dist/package.json
154+
155+
- name: Publish the non-scoped package to NPM
156+
uses: JS-DevTools/npm-publish@v1
157+
with:
158+
token: ${{ secrets.NPM_TOKEN }}
159+
package: dist/package.json

dist/index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import ono from "@jsdevtools/ono";
2+
export * from "@jsdevtools/ono";
3+
export default ono;

dist/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"use strict";
2+
module.exports = require("@jsdevtools/ono");

dist/index.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import ono from "@jsdevtools/ono";
2+
export * from "@jsdevtools/ono";
3+
export default ono;

dist/package.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "ono",
3+
"version": "X.X.X",
4+
"description": "Throw better errors.",
5+
"keywords": [
6+
"throw",
7+
"error",
8+
"errors",
9+
"exception",
10+
"printf",
11+
"format",
12+
"wrap",
13+
"inner",
14+
"original",
15+
"stack",
16+
"properties"
17+
],
18+
"author": {
19+
"name": "James Messinger",
20+
"url": "https://jamesmessinger.com"
21+
},
22+
"license": "MIT",
23+
"homepage": "https://jstools.dev/ono",
24+
"repository": {
25+
"type": "git",
26+
"url": "https://github.com/JS-DevTools/ono.git"
27+
},
28+
"main": "index.js",
29+
"module": "index.mjs",
30+
"typings": "index.d.ts",
31+
"files": [
32+
"index.js",
33+
"index.mjs",
34+
"index.d.ts"
35+
],
36+
"dependencies": {
37+
"@jsdevtools/ono": "X.X.X"
38+
}
39+
}

0 commit comments

Comments
 (0)