Skip to content

Commit 2ddbe68

Browse files
committed
Merge branch 'develop'
2 parents 260cc7c + 892279b commit 2ddbe68

38 files changed

Lines changed: 3534 additions & 910 deletions

.github/workflows/ci.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: tests/audit
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
audit:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [24.x]
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
- run: npm audit --parseable --production --audit-level=moderate
22+
23+
test:
24+
runs-on: ubuntu-latest
25+
strategy:
26+
matrix:
27+
node-version: [16.x, 24.x, 25.x]
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: Use Node.js ${{ matrix.node-version }}
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: ${{ matrix.node-version }}
34+
- run: npm ci --omit=optional
35+
env:
36+
CI: true
37+
- run: npm run test
38+
39+
lint:
40+
runs-on: ubuntu-latest
41+
strategy:
42+
matrix:
43+
node-version: [24.x]
44+
steps:
45+
- uses: actions/checkout@v4
46+
- name: Use Node.js ${{ matrix.node-version }}
47+
uses: actions/setup-node@v4
48+
with:
49+
node-version: ${{ matrix.node-version }}
50+
- run: npm ci --omit=optional
51+
env:
52+
CI: true
53+
- run: npm run lint
54+
55+
coveralls:
56+
runs-on: ubuntu-latest
57+
strategy:
58+
matrix:
59+
node-version: [24.x]
60+
steps:
61+
- uses: actions/checkout@v4
62+
- name: Use Node.js ${{ matrix.node-version }}
63+
uses: actions/setup-node@v4
64+
with:
65+
node-version: ${{ matrix.node-version }}
66+
- run: npm ci --no-optional
67+
env:
68+
CI: true
69+
- run: npm run test:coverage
70+
- name: Submit to Coveralls
71+
uses: coverallsapp/github-action@v2

.github/workflows/npm_build.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/npm_test_coverage.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish to NPM
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
permissions:
9+
id-token: write
10+
contents: read
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '24'
24+
registry-url: 'https://registry.npmjs.org'
25+
26+
- name: Upgrade npm
27+
run: npm i -g npm@latest
28+
29+
- name: Install dependencies
30+
run: npm ci --no-optional
31+
32+
- name: Publish pre-release to NPM
33+
if: contains(github.ref_name, '-')
34+
run: npm publish --provenance --tag next
35+
36+
- name: Publish release to NPM
37+
if: "!contains(github.ref_name, '-')"
38+
run: npm publish --provenance

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./CONTRIBUTING.md

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
# [1.7.0-4](https://github.com/snatalenko/declarative-mapper/compare/v1.6.4...v1.7.0-4) (2026-03-03)
2+
3+
4+
### Features
5+
6+
* Support template-based dynamic output keys ([7ff2070](https://github.com/snatalenko/declarative-mapper/commit/7ff207027262225063dc34609907811a2dc6f3ce))
7+
8+
### Changes
9+
10+
* Apache 2.0 license ([f200a2a](https://github.com/snatalenko/declarative-mapper/commit/f200a2a88f1a3b394276b62c39a46588b615fe43))
11+
12+
### Refactoring
13+
14+
* Remove unused default parameters from inner functions ([2ce8aa4](https://github.com/snatalenko/declarative-mapper/commit/2ce8aa4038c9bec7ee2281152a9d4199491f8076))
15+
* Cleanup types; use imports with TS extensions ([2ed24bc](https://github.com/snatalenko/declarative-mapper/commit/2ed24bc70855313c28d086261ccaae1e74bbb412))
16+
17+
### Documentation
18+
19+
* Fix tests workflow badge ([e02d95f](https://github.com/snatalenko/declarative-mapper/commit/e02d95f1e6b05b039a1f1555d150ce4963d7e511))
20+
* Add contributing guidelines and development setup instructions ([7361601](https://github.com/snatalenko/declarative-mapper/commit/7361601adce8bda1a0a3ccdb083c924405e15523))
21+
22+
### Tests
23+
24+
* Add missing tests to improve coverage ([8b3606a](https://github.com/snatalenko/declarative-mapper/commit/8b3606add20870c6256bc6e18583bb3f037d4047))
25+
* Add missing tests to improve coverage ([851e673](https://github.com/snatalenko/declarative-mapper/commit/851e67314ca77b9be910bade56e3763018f85720))
26+
* Allow running individual tests with `npm t` ([adb76a4](https://github.com/snatalenko/declarative-mapper/commit/adb76a46b09ba6780745d78dde12598846dc6e1e))
27+
28+
### Build System
29+
30+
* Re-generate changelog content on every version ([33218c6](https://github.com/snatalenko/declarative-mapper/commit/33218c6bcc394dd751df97b94a2a24cb40b59d0a))
31+
* Add automatic pre-release tags cleanup ([2477330](https://github.com/snatalenko/declarative-mapper/commit/2477330ba96f90dccb70c415958d89e45a49aee3))
32+
* Add pre-release publishing script ([7448cfc](https://github.com/snatalenko/declarative-mapper/commit/7448cfcc47f416f820db453bd4afd7c5e3436886))
33+
* Add eslint ([f6b5b4b](https://github.com/snatalenko/declarative-mapper/commit/f6b5b4b6d47d9a83e1225d3d4c2649b80c73b2d0))
34+
* Add separate CJS and ESM builds ([bce1531](https://github.com/snatalenko/declarative-mapper/commit/bce1531c8cd21cdb04837e622f4028eecb4b82fa))
35+
* Update dev dependencies ([24b1d4c](https://github.com/snatalenko/declarative-mapper/commit/24b1d4cde4fb5650e9d495600a27c02c6e41000a))
36+
37+
138
## [1.6.4](https://github.com/snatalenko/declarative-mapper/compare/v1.6.3...v1.6.4) (2025-07-25)
239

340

@@ -311,3 +348,7 @@
311348
* Add tests badge ([fe40f8c](https://github.com/snatalenko/declarative-mapper/commit/fe40f8ccbaf7e86a4e292b1e6a7c95cd0eb34701))
312349

313350

351+
# 1.0.0 (2020-06-23)
352+
353+
354+

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./CONTRIBUTING.md

CONTRIBUTING.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Contributing
2+
3+
Thanks for taking the time to contribute!
4+
5+
## Development setup
6+
7+
Prerequisites:
8+
9+
- Node.js 16+
10+
- npm
11+
12+
Clone and install:
13+
14+
```bash
15+
git clone git@github.com:snatalenko/declarative-mapper.git
16+
cd declarative-mapper
17+
npm ci
18+
```
19+
20+
## Project structure
21+
22+
- `src/` - mapper runtime and public APIs
23+
- `tests/unit/` - Jest tests
24+
- `tests/unit/data/` - test fixtures
25+
- `schemas/` - JSON schemas
26+
- `scripts/changelog/` - changelog templates/config
27+
- `dist/` and `types/` - generated build output
28+
29+
## Common tasks
30+
31+
```bash
32+
npm run cleanup # Remove dist/, types/, coverage/
33+
npm test
34+
npm run test:coverage # Run tests with coverage report
35+
npm run lint # Run ESLint
36+
npm run build # Build both ESM and CJS outputs
37+
npm run build:esm # Build ESM only (generates dist/esm/ and types/)
38+
npm run build:cjs # Build CJS only (generates dist/cjs/)
39+
```
40+
41+
### Running a single test file
42+
43+
```bash
44+
npm test tests/unit/mappingSchema.test.ts
45+
```
46+
47+
## Code style
48+
49+
Code style and formatting are enforced via [EditorConfig](https://editorconfig.org) ([.editorconfig](.editorconfig)) and [ESLint](https://eslint.org) ([eslint.config.mjs](eslint.config.mjs)).
50+
51+
- **Indentation:** Tabs (not spaces)
52+
- **Quotes:** Single quotes
53+
- **Semicolons:** Required
54+
- **Brace style:** Stroustrup
55+
- **No `console.log`** in production code
56+
- **No trailing commas**
57+
- **Line length:** Warn at 120 chars
58+
- **Type-only imports:** Use the `type` keyword for imports that are only used as types
59+
- **`.ts` file extensions in imports:** Always use explicit `.ts` extensions in relative import paths
60+
61+
## Commits and pull requests
62+
63+
- Keep commits focused and include tests for behavior changes
64+
- For PRs, include a short problem/solution summary and link the related issue (if any)
65+
- Use one of the following prefixes for the commit messages:
66+
- `New:`, `Feat:` - New functionality
67+
- `Change:` - Change to existing behavior
68+
- `Fix:`, `Fixes:` - Bug-fix
69+
- `Perf:` - Performance improvement
70+
- `Security:` - Fix of a security issue
71+
- `Docs:` - Documentation
72+
- `Tests:` - Tests
73+
- `Build:`, `CI:` - Build scripts change
74+
- `Chore:`, `Internal Fix:` - Internal changes or fixes of not-yet-released functionality
75+
76+
## Licensing
77+
78+
By contributing, you agree that your contributions are licensed under the project license.

0 commit comments

Comments
 (0)