Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @code.store/arcxp-sdk-ts

## 5.0.0

### Major Changes

- ESM + CJS, refactor structure, regenerate types, section utils

## 4.49.1

### Patch Changes
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ src/api/{service}/

```typescript
import type { GlobalType } from '../../types/entity';
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api';
import type { LocalParamsType } from './types';
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
import type { LocalParamsType } from './types.js';

export class ArcServiceName extends ArcAbstractAPI {
constructor(options: ArcAPIOptions) {
Expand Down Expand Up @@ -219,7 +219,7 @@ Ensure types are exported from the service's `types.ts` and re-exported in `src/

```typescript
// In src/index.ts
export * from './api/{service}/types';
export * from './api/{service}/types.js';
```

#### 6. Document Changes
Expand Down Expand Up @@ -339,7 +339,7 @@ import type { AGallery } from '../../types/gallery';
import type { AnImage } from '../../types/story';

// Importing local types
import type { GetStoryParams, SearchResponse } from './types';
import type { GetStoryParams, SearchResponse } from './types.js';
```

### Handling Unclear Specifications
Expand Down Expand Up @@ -423,7 +423,7 @@ Write tests for new functionality:

```typescript
import { describe, it, expect } from 'vitest';
import { ArcServiceName } from './index';
import { ArcServiceName } from './index.js';

describe('ArcServiceName', () => {
it('should fetch item by id', async () => {
Expand Down
20 changes: 20 additions & 0 deletions ans-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "https://github.com/washingtonpost/ans-schema",
"title": "Root",
"description": "",
"type": "object",
"additionalProperties": false,
"properties": {
"gallery_root": {
"$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.12/gallery.json"
},
"story_root": {
"$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.12/story.json"
},
"video_root": {
"$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.12/video.json"
}
},
"required": ["gallery_root", "story_root", "video_root"]
}
36 changes: 26 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
{
"name": "@code.store/arcxp-sdk-ts",
"version": "4.49.1",
"version": "5.0.0",
"description": "A strongly typed set of ArcXP API's and utilities reduce the amount of work required to develop with ArcXP, starting with reducing the boilerplate code you have to write.",
"type": "commonjs",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"engines": {
"node": ">=22.x",
"pnpm": ">=10.x"
Expand All @@ -17,15 +24,14 @@
"dist"
],
"scripts": {
"build": "tsc",
"build": "tsc --noEmit && rollup -c",
"format": "npx @biomejs/biome format --write .",
"check": "npx @biomejs/biome check --write .",
"lint": "tsc --noEmit && npx @biomejs/biome lint --write --unsafe .",
"test": "npx vitest",
"coverage": "npx vitest run --coverage",
"gen:ts": "npx ts-node-dev ./src/scripts/json-schema-to-ts.ts",
"cs": "npx changeset && npx changeset version",
"swaggerToTypes": "npx swagger-typescript-api -p ./tmp/swagger.json -o ./tmp -n swaggerTypes.ts"
"gen:ts": "npx tsx ./src/scripts/json-schema-to-ts.ts",
"cs": "npx changeset && npx changeset version"
},
"keywords": [
"ArcXP",
Expand All @@ -49,16 +55,26 @@
"@biomejs/biome": "^1.9.4",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@types/node": "^20.0.0",
"@types/tap": "^15.0.8",
"@types/uuid": "^9.0.7",
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-commonjs": "^28.0.6",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.2",
"@rollup/plugin-replace": "^6.0.2",
"@rollup/plugin-typescript": "^12.1.4",
"@types/node": "^22.0.0",
"@types/uuid": "^9.0.0",
"@types/ws": "^8.5.5",
"@vitest/coverage-v8": "^3.0.9",
"json-schema-to-typescript": "13.1.1",
"nock": "^14.0.10",
"openapi-typescript": "^6.2.7",
"rollup": "^4.52.4",
"rollup-plugin-auto-external": "^2.0.0",
"rollup-plugin-node-polyfills": "^0.2.1",
"rollup-plugin-polyfill-node": "^0.13.0",
"rollup-plugin-terser": "^7.0.2",
"tap": "^16.3.4",
"ts-node-dev": "^2.0.0",
"tslib": "^2.8.1",
"typescript": "^5.3.3",
"vite": "^7.1.4",
"vitest": "^3.2.4"
Expand Down
Loading
Loading