Skip to content

Commit 4abc417

Browse files
authored
Merge pull request #2 from ZeroEntropy-AI/release-please--branches--main--changes--next--components--zeroentropy
release: 0.1.0-alpha.1
2 parents d93435e + 44f6356 commit 4abc417

12 files changed

+195
-13
lines changed

.github/workflows/publish-npm.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow is triggered when a GitHub release is created.
2+
# It can also be run manually to re-publish to NPM in case it failed for some reason.
3+
# You can run this workflow by navigating to https://www.github.com/ZeroEntropy-AI/zeroentropy-node/actions/workflows/publish-npm.yml
4+
name: Publish NPM
5+
on:
6+
workflow_dispatch:
7+
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
publish:
13+
name: publish
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Node
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: '18'
23+
24+
- name: Install dependencies
25+
run: |
26+
yarn install
27+
28+
- name: Publish to NPM
29+
run: |
30+
bash ./bin/publish-npm
31+
env:
32+
NPM_TOKEN: ${{ secrets.ZEROENTROPY_NPM_TOKEN || secrets.NPM_TOKEN }}

.github/workflows/release-doctor.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release Doctor
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
jobs:
9+
release_doctor:
10+
name: release doctor
11+
runs-on: ubuntu-latest
12+
if: github.repository == 'ZeroEntropy-AI/zeroentropy-node' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Check release environment
18+
run: |
19+
bash ./bin/check-release-environment
20+
env:
21+
NPM_TOKEN: ${{ secrets.ZEROENTROPY_NPM_TOKEN || secrets.NPM_TOKEN }}
22+

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.1.0-alpha.1"
3+
}

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Changelog
2+
3+
## 0.1.0-alpha.1 (2025-01-18)
4+
5+
Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/ZeroEntropy-AI/zeroentropy-node/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)
6+
7+
### Features
8+
9+
* **api:** update via SDK Studio ([d93435e](https://github.com/ZeroEntropy-AI/zeroentropy-node/commit/d93435e1edbdca31d3d347ddc0d526af6ae36e6e))
10+
* **api:** update via SDK Studio ([0427698](https://github.com/ZeroEntropy-AI/zeroentropy-node/commit/0427698178c8dbea7553aadd509bb73a6dd7a404))
11+
* **api:** update via SDK Studio ([b813bdf](https://github.com/ZeroEntropy-AI/zeroentropy-node/commit/b813bdf5e5d03eb778adc669c9168c1d3d94bd0b))
12+
* **api:** update via SDK Studio ([5f568a7](https://github.com/ZeroEntropy-AI/zeroentropy-node/commit/5f568a74481d64a7a01cafcd8ed9cb6bdaf8873a))
13+
* **api:** update via SDK Studio ([136c2e0](https://github.com/ZeroEntropy-AI/zeroentropy-node/commit/136c2e0192372f30067ab682080feae441cae307))
14+
* **api:** update via SDK Studio ([bdb9681](https://github.com/ZeroEntropy-AI/zeroentropy-node/commit/bdb96811c2dbb6ddb1e37269aa3eebd4499392c7))
15+
* **api:** update via SDK Studio ([f1026d5](https://github.com/ZeroEntropy-AI/zeroentropy-node/commit/f1026d5246ad6b85ddea953fa5eebcb84f56b7c5))
16+
* **api:** update via SDK Studio ([e444c1c](https://github.com/ZeroEntropy-AI/zeroentropy-node/commit/e444c1cce67ca418fab242bf70a3369188f51db9))
17+
* **api:** update via SDK Studio ([85d6bde](https://github.com/ZeroEntropy-AI/zeroentropy-node/commit/85d6bdea1496edb35bb16eeffa16b0477f576b0b))
18+
* **api:** update via SDK Studio ([c75e419](https://github.com/ZeroEntropy-AI/zeroentropy-node/commit/c75e4193d6f974b35f571f076541d5067ef2739a))
19+
* **api:** update via SDK Studio ([b12adb3](https://github.com/ZeroEntropy-AI/zeroentropy-node/commit/b12adb3af8dfe50e3e0850e8e040b042c385f350))
20+
21+
22+
### Chores
23+
24+
* go live ([#1](https://github.com/ZeroEntropy-AI/zeroentropy-node/issues/1)) ([26383db](https://github.com/ZeroEntropy-AI/zeroentropy-node/commit/26383db324ad84303730b74bd1afd1d2823b475f))
25+
* update SDK settings ([#3](https://github.com/ZeroEntropy-AI/zeroentropy-node/issues/3)) ([584e59b](https://github.com/ZeroEntropy-AI/zeroentropy-node/commit/584e59bbf5ba4604c829dd9e747efefa01884888))

CONTRIBUTING.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ If you’d like to use the repository from source, you can either install from g
4242
To install via git:
4343

4444
```sh
45-
$ npm install git+ssh://[email protected]:stainless-sdks/zeroentropy-node.git
45+
$ npm install git+ssh://[email protected]:ZeroEntropy-AI/zeroentropy-node.git
4646
```
4747

4848
Alternatively, to link a local copy of the repo:
4949

5050
```sh
5151
# Clone
52-
$ git clone https://www.github.com/stainless-sdks/zeroentropy-node
52+
$ git clone https://www.github.com/ZeroEntropy-AI/zeroentropy-node
5353
$ cd zeroentropy-node
5454

5555
# With yarn
@@ -91,3 +91,17 @@ To format and fix all lint issues automatically:
9191
```sh
9292
$ yarn fix
9393
```
94+
95+
## Publishing and releases
96+
97+
Changes made to this repository via the automated release PR pipeline should publish to npm automatically. If
98+
the changes aren't made through the automated pipeline, you may want to make releases manually.
99+
100+
### Publish with a GitHub workflow
101+
102+
You can release to package managers by using [the `Publish NPM` GitHub action](https://www.github.com/ZeroEntropy-AI/zeroentropy-node/actions/workflows/publish-npm.yml). This requires a setup organization or repository secret to be set up.
103+
104+
### Publish manually
105+
106+
If you need to manually release a package, you can run the `bin/publish-npm` script with an `NPM_TOKEN` set on
107+
the environment.

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ It is generated with [Stainless](https://www.stainlessapi.com/).
1111
## Installation
1212

1313
```sh
14-
npm install git+ssh://[email protected]:stainless-sdks/zeroentropy-node.git
14+
npm install zeroentropy
1515
```
1616

17-
> [!NOTE]
18-
> Once this package is [published to npm](https://app.stainlessapi.com/docs/guides/publish), this will become: `npm install zeroentropy`
19-
2017
## Usage
2118

2219
The full API of this library can be found in [api.md](api.md).
@@ -225,7 +222,7 @@ import Zeroentropy from 'zeroentropy';
225222
```
226223

227224
To do the inverse, add `import "zeroentropy/shims/node"` (which does import polyfills).
228-
This can also be useful if you are getting the wrong TypeScript types for `Response` ([more details](https://github.com/stainless-sdks/zeroentropy-node/tree/main/src/_shims#readme)).
225+
This can also be useful if you are getting the wrong TypeScript types for `Response` ([more details](https://github.com/ZeroEntropy-AI/zeroentropy-node/tree/main/src/_shims#readme)).
229226

230227
### Logging and middleware
231228

@@ -284,7 +281,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
284281

285282
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
286283

287-
We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/zeroentropy-node/issues) with questions, bugs, or suggestions.
284+
We are keen for your feedback; please open an [issue](https://www.github.com/ZeroEntropy-AI/zeroentropy-node/issues) with questions, bugs, or suggestions.
288285

289286
## Requirements
290287

bin/check-release-environment

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
3+
errors=()
4+
5+
if [ -z "${NPM_TOKEN}" ]; then
6+
errors+=("The ZEROENTROPY_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
7+
fi
8+
9+
lenErrors=${#errors[@]}
10+
11+
if [[ lenErrors -gt 0 ]]; then
12+
echo -e "Found the following errors in the release environment:\n"
13+
14+
for error in "${errors[@]}"; do
15+
echo -e "- $error\n"
16+
done
17+
18+
exit 1
19+
fi
20+
21+
echo "The environment is ready to push releases!"
22+

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "zeroentropy",
3-
"version": "0.0.1-alpha.0",
3+
"version": "0.1.0-alpha.1",
44
"description": "The official TypeScript library for the Zeroentropy API",
55
"author": "Zeroentropy <[email protected]>",
66
"types": "dist/index.d.ts",
77
"main": "dist/index.js",
88
"type": "commonjs",
9-
"repository": "github:stainless-sdks/zeroentropy-node",
9+
"repository": "github:ZeroEntropy-AI/zeroentropy-node",
1010
"license": "Apache-2.0",
1111
"packageManager": "[email protected]",
1212
"files": [

release-please-config.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"packages": {
3+
".": {}
4+
},
5+
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
6+
"include-v-in-tag": true,
7+
"include-component-in-tag": false,
8+
"versioning": "prerelease",
9+
"prerelease": true,
10+
"bump-minor-pre-major": true,
11+
"bump-patch-for-minor-pre-major": false,
12+
"pull-request-header": "Automated Release PR",
13+
"pull-request-title-pattern": "release: ${version}",
14+
"changelog-sections": [
15+
{
16+
"type": "feat",
17+
"section": "Features"
18+
},
19+
{
20+
"type": "fix",
21+
"section": "Bug Fixes"
22+
},
23+
{
24+
"type": "perf",
25+
"section": "Performance Improvements"
26+
},
27+
{
28+
"type": "revert",
29+
"section": "Reverts"
30+
},
31+
{
32+
"type": "chore",
33+
"section": "Chores"
34+
},
35+
{
36+
"type": "docs",
37+
"section": "Documentation"
38+
},
39+
{
40+
"type": "style",
41+
"section": "Styles"
42+
},
43+
{
44+
"type": "refactor",
45+
"section": "Refactors"
46+
},
47+
{
48+
"type": "test",
49+
"section": "Tests",
50+
"hidden": true
51+
},
52+
{
53+
"type": "build",
54+
"section": "Build System"
55+
},
56+
{
57+
"type": "ci",
58+
"section": "Continuous Integration",
59+
"hidden": true
60+
}
61+
],
62+
"release-type": "node",
63+
"extra-files": [
64+
"src/version.ts",
65+
"README.md"
66+
]
67+
}

src/_shims/index-deno.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function getDefaultAgent(url: string) {
7979
}
8080
export function fileFromPath() {
8181
throw new Error(
82-
'The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/stainless-sdks/zeroentropy-node#file-uploads',
82+
'The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/ZeroEntropy-AI/zeroentropy-node#file-uploads',
8383
);
8484
}
8585

0 commit comments

Comments
 (0)