Skip to content

Commit 5ee4213

Browse files
Merge pull request #12 from CASParser/release-please--branches--main--changes--next--components--cas-parser-node
release: 1.6.2
2 parents a184d15 + 9246576 commit 5ee4213

47 files changed

Lines changed: 188 additions & 100 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish-npm.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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/CASParser/cas-parser-node/actions/workflows/publish-npm.yml
4+
name: Publish NPM
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
path:
9+
description: The path to run the release in, e.g. '.' or 'packages/mcp-server'
10+
required: true
11+
12+
release:
13+
types: [published]
14+
15+
jobs:
16+
publish:
17+
name: publish
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: write
21+
id-token: write
22+
23+
steps:
24+
- uses: actions/checkout@v6
25+
26+
- name: Set up Node
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: '20'
30+
31+
- name: Set up pnpm
32+
uses: pnpm/action-setup@v4
33+
34+
- name: Install dependencies
35+
run: |
36+
pnpm install
37+
38+
- name: Publish to NPM
39+
run: |
40+
if [ -n "${{ github.event.inputs.path }}" ]; then
41+
PATHS_RELEASED='[\"${{ github.event.inputs.path }}\"]'
42+
else
43+
PATHS_RELEASED='[\".\", \"packages/mcp-server\"]'
44+
fi
45+
pnpm tsn scripts/publish-packages.ts "{ \"paths_released\": \"$PATHS_RELEASED\" }"
46+
47+
- name: Upload MCP Server DXT GitHub release asset
48+
run: |
49+
gh release upload ${{ github.event.release.tag_name }} \
50+
packages/mcp-server/cas_parser_node_api.mcpb
51+
env:
52+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.6.1"
2+
".": "1.6.2"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 17
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser%2Fcas-parser-56b0f699c5437d9e5326626d35dfc972c17d01f12cb416c7f4854c8ea6d0e95e.yml
33
openapi_spec_hash: 158f405c1880706266d83e6ff16b9d2f
4-
config_hash: 7d8b6bdc6c935a3e6dd7092667c00a5e
4+
config_hash: e78bb30ba7c06b2a6d20092a5872aec2

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 1.6.2 (2026-02-14)
4+
5+
Full Changelog: [v1.6.1...v1.6.2](https://github.com/CASParser/cas-parser-node/compare/v1.6.1...v1.6.2)
6+
7+
### Chores
8+
9+
* update SDK settings ([05b29e9](https://github.com/CASParser/cas-parser-node/commit/05b29e9d60bfd19087cb14cabc32f2c8221e8e8a))
10+
* update SDK settings ([2361eff](https://github.com/CASParser/cas-parser-node/commit/2361eff0fb2b2cad4781d0bcf3cbe04524446732))
11+
312
## 1.6.1 (2026-02-14)
413

514
Full Changelog: [v1.6.0...v1.6.1](https://github.com/CASParser/cas-parser-node/compare/v1.6.0...v1.6.1)

CONTRIBUTING.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ $ cd cas-parser-node
5555
# With yarn
5656
$ yarn link
5757
$ cd ../my-package
58-
$ yarn link cas-parser
58+
$ yarn link cas-parser-node
5959

6060
# With pnpm
6161
$ pnpm link --global
6262
$ cd ../my-package
63-
$ pnpm link -—global cas-parser
63+
$ pnpm link -—global cas-parser-node
6464
```
6565

6666
## Running tests
@@ -91,3 +91,17 @@ To format and fix all lint issues automatically:
9191
```sh
9292
$ pnpm 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/CASParser/cas-parser-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: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Cas Parser TypeScript API Library
22

3-
[![NPM version](<https://img.shields.io/npm/v/cas-parser.svg?label=npm%20(stable)>)](https://npmjs.org/package/cas-parser) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/cas-parser)
3+
[![NPM version](<https://img.shields.io/npm/v/cas-parser-node.svg?label=npm%20(stable)>)](https://npmjs.org/package/cas-parser-node) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/cas-parser-node)
44

55
This library provides convenient access to the Cas Parser REST API from server-side TypeScript or JavaScript.
66

@@ -20,19 +20,16 @@ Use the Cas Parser MCP Server to enable AI assistants to interact with this API,
2020
## Installation
2121

2222
```sh
23-
npm install git+ssh://git@github.com:CASParser/cas-parser-node.git
23+
npm install cas-parser-node
2424
```
2525

26-
> [!NOTE]
27-
> Once this package is [published to npm](https://www.stainless.com/docs/guides/publish), this will become: `npm install cas-parser`
28-
2926
## Usage
3027

3128
The full API of this library can be found in [api.md](api.md).
3229

3330
<!-- prettier-ignore -->
3431
```js
35-
import CasParser from 'cas-parser';
32+
import CasParser from 'cas-parser-node';
3633

3734
const client = new CasParser({
3835
apiKey: process.env['CAS_PARSER_API_KEY'], // This is the default and can be omitted
@@ -50,7 +47,7 @@ This library includes TypeScript definitions for all request params and response
5047

5148
<!-- prettier-ignore -->
5249
```ts
53-
import CasParser from 'cas-parser';
50+
import CasParser from 'cas-parser-node';
5451

5552
const client = new CasParser({
5653
apiKey: process.env['CAS_PARSER_API_KEY'], // This is the default and can be omitted
@@ -173,7 +170,7 @@ The log level can be configured in two ways:
173170
2. Using the `logLevel` client option (overrides the environment variable if set)
174171

175172
```ts
176-
import CasParser from 'cas-parser';
173+
import CasParser from 'cas-parser-node';
177174

178175
const client = new CasParser({
179176
logLevel: 'debug', // Show all log messages
@@ -201,7 +198,7 @@ When providing a custom logger, the `logLevel` option still controls which messa
201198
below the configured level will not be sent to your logger.
202199

203200
```ts
204-
import CasParser from 'cas-parser';
201+
import CasParser from 'cas-parser-node';
205202
import pino from 'pino';
206203

207204
const logger = pino();
@@ -270,7 +267,7 @@ globalThis.fetch = fetch;
270267
Or pass it to the client:
271268

272269
```ts
273-
import CasParser from 'cas-parser';
270+
import CasParser from 'cas-parser-node';
274271
import fetch from 'my-fetch';
275272

276273
const client = new CasParser({ fetch });
@@ -281,7 +278,7 @@ const client = new CasParser({ fetch });
281278
If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
282279

283280
```ts
284-
import CasParser from 'cas-parser';
281+
import CasParser from 'cas-parser-node';
285282

286283
const client = new CasParser({
287284
fetchOptions: {
@@ -298,7 +295,7 @@ options to requests:
298295
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>
299296

300297
```ts
301-
import CasParser from 'cas-parser';
298+
import CasParser from 'cas-parser-node';
302299
import * as undici from 'undici';
303300

304301
const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
@@ -312,7 +309,7 @@ const client = new CasParser({
312309
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg" align="top" width="18" height="21"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>
313310

314311
```ts
315-
import CasParser from 'cas-parser';
312+
import CasParser from 'cas-parser-node';
316313

317314
const client = new CasParser({
318315
fetchOptions: {
@@ -324,7 +321,7 @@ const client = new CasParser({
324321
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>
325322

326323
```ts
327-
import CasParser from 'npm:cas-parser';
324+
import CasParser from 'npm:cas-parser-node';
328325

329326
const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
330327
const client = new CasParser({

bin/publish-npm

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
set -eux
44

5-
npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
5+
if [[ ${NPM_TOKEN:-} ]]; then
6+
npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
7+
elif [[ ! ${ACTIONS_ID_TOKEN_REQUEST_TOKEN:-} ]]; then
8+
echo "ERROR: NPM_TOKEN must be set if not running in a Github Action with id-token permission"
9+
exit 1
10+
fi
611

712
pnpm build
813
cd dist
@@ -57,5 +62,8 @@ else
5762
TAG="latest"
5863
fi
5964

65+
# Install OIDC compatible npm version
66+
npm install --prefix ../oidc/ npm@11.6.2
67+
6068
# Publish with the appropriate tag
61-
pnpm publish --no-git-checks --tag "$TAG"
69+
pnpm publish --npm-path "$(cd ../ && pwd)/oidc/node_modules/.bin/npm" --no-git-checks --tag "$TAG"

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default tseslint.config(
2525
{
2626
patterns: [
2727
{
28-
regex: '^cas-parser(/.*)?',
28+
regex: '^cas-parser-node(/.*)?',
2929
message: 'Use a relative import, not a package import.',
3030
},
3131
],

jest.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ const config: JestConfigWithTsJest = {
77
'^.+\\.(t|j)sx?$': ['@swc/jest', { sourceMaps: 'inline' }],
88
},
99
moduleNameMapper: {
10-
'^cas-parser$': '<rootDir>/src/index.ts',
11-
'^cas-parser/(.*)$': '<rootDir>/src/$1',
10+
'^cas-parser-node$': '<rootDir>/src/index.ts',
11+
'^cas-parser-node/(.*)$': '<rootDir>/src/$1',
1212
},
1313
modulePathIgnorePatterns: [
1414
'<rootDir>/ecosystem-tests/',

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "cas-parser",
3-
"version": "1.6.1",
2+
"name": "cas-parser-node",
3+
"version": "1.6.2",
44
"description": "The official TypeScript library for the Cas Parser API",
55
"author": "Cas Parser <sameer@casparser.in>",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)