Skip to content
Open
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
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: CI

on:
push:

jobs:
test:
uses: ./.github/workflows/test.yml
15 changes: 6 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ name: Publish to npm
on:
push:
tags:
- "*"
- "**"

permissions:
id-token: write # Required for OIDC
contents: read

jobs:
test:
uses: ./.github/workflows/test.yml

publish:
needs: test
runs-on: ubuntu-latest

steps:
Expand All @@ -19,26 +23,19 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "20.x"
node-version: "22.x"
registry-url: "https://registry.npmjs.org"

- name: Update npm
run: npm install -g npm@'>=11.5.1'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run tests
run: npm test

- name: Set version from tag
run: |
VERSION=${GITHUB_REF#refs/tags/}
sed -i 's/"version": "0\.0\.0"/"version": "'"$VERSION"'"/g' package.json
sed -i 's/"version": "0\.0\.0"/"version": "'"$VERSION"'"/g' package-lock.json

- name: Publish to npm
run: npm publish
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/node-tests.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
name: Node Tests
name: Test

on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_call:

jobs:
build:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x, 22.x, 24.x]
node-version: [22.x, 24.x, 26.x]

steps:
- uses: actions/checkout@v6
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Build outputs dual formats via Rollup: `dist/cjs/` (CommonJS), `dist/esm/` (ESM)

## Architecture

This is the official JavaScript SDK for Smarty address validation APIs. It supports both Node.js (CommonJS/ESM) and browser environments. The entire codebase is TypeScript.
This is the official JavaScript SDK for Smarty address validation APIs. Compatible with Node.js 22 and later. It supports both Node.js (CommonJS/ESM) and browser environments. The entire codebase is TypeScript.

### Sender Chain Pattern

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ version:
sed -i.bak -e 's/^ "version": "0\.0\.0",/ "version": "$(VERSION)",/g' "$(VERSION_FILE1)" && rm -f "$(VERSION_FILE1).bak"
sed -i.bak -e 's/^ "version": "0\.0\.0",/ "version": "$(VERSION)",/g' "$(VERSION_FILE2)" && rm -f "$(VERSION_FILE2).bak"

publish: test build version
publish: build version
npm publish

.PHONY: test fmt clean build compile cover examples examples-ts examples-js integrate version publish
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

# Smarty JavaScript SDK

The official JavaScript/TypeScript SDK for accessing [Smarty](https://www.smarty.com) address validation APIs. Works in both Node.js and browser environments.
The official JavaScript/TypeScript SDK for accessing [Smarty](https://www.smarty.com) address validation APIs. Compatible with Node.js 22 and later. Works in both Node.js and browser environments.

[![npm](https://img.shields.io/npm/v/smartystreets-javascript-sdk)](https://www.npmjs.com/package/smartystreets-javascript-sdk)
[![node](https://img.shields.io/node/v/smartystreets-javascript-sdk)](https://nodejs.org)
[![license](https://img.shields.io/npm/l/smartystreets-javascript-sdk)](LICENSE.md)

## Installation
Expand Down
Loading