Skip to content

Commit

Permalink
Merge branch 'main' into chore/remove-winston
Browse files Browse the repository at this point in the history
  • Loading branch information
daogrady authored Feb 24, 2025
2 parents c71bfde + 238ce46 commit e8ef502
Show file tree
Hide file tree
Showing 18 changed files with 348 additions and 241 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
name: Dependabot auto-merge

on: pull_request

permissions:
contents: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true


jobs:
dependabot:
runs-on: ubuntu-latest
Expand All @@ -21,3 +27,4 @@ jobs:
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

17 changes: 17 additions & 0 deletions .github/workflows/enforce-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Enforce Changelog

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true


jobs:
enforce-changelog:
uses: cap-js/.github/.github/workflows/enforce-changelog.yml@main
secrets: inherit
permissions:
pull-requests: write
8 changes: 5 additions & 3 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
workflow_dispatch:

concurrency:
group: integration-test-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -32,15 +32,17 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}

# running test:setup inside run-as-non-admin causes problems with creating OS links
# -> run it outside of run-as-non-admin
- run: |
npm i -g npm
npm ci
npm install file:. --no-save --force
npm run prerelease:ci-fix
npm run test:setup
npm run rollup:off
- name: Run integration test with non-admin user on windows
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ on:
branches: [main]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true


jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Run Linter
run: |
npm ci
npm run lint
uses: cap-js/.github/.github/workflows/lint.yml@main
secrets: inherit
30 changes: 30 additions & 0 deletions .github/workflows/prepare-next-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Prepare Next Version

on:
workflow_dispatch:
inputs:
increment:
description: Increment version
required: true
default: patch
type: choice
options:
- patch
- minor
- major

permissions:
contents: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true


jobs:
prepare-next-version:
uses: cap-js/.github/.github/workflows/prepare-next-version.yml@main
secrets: inherit
with:
increment: ${{ github.event.inputs.increment }}
60 changes: 22 additions & 38 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,37 @@
name: Release

on:
push:
branches: main

workflow_dispatch:
inputs:
npmtag:
description: 'tag to use on npmjs'
dry-run:
description: Dry run
required: false
default: false
type: boolean
tag:
description: The tag to use during publish, values are latest, next
required: false
default: latest
type: choice
options:
- latest
- next
default: 'latest'
required: true

permissions:
contents: write

jobs:

publish-npm:
runs-on: ubuntu-latest
environment: npm
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

- name: Run Unit Tests
run: |
npm ci
npm install file:. --no-save --force
npm run prerelease:ci-fix
npm run rollup && npm run rollup:on
npm run test

- name: get-version
id: package-version
uses: martinbeentjes/[email protected]
- name: Parse changelog
id: parse-changelog
uses: schwma/[email protected]
with:
version: '${{ steps.package-version.outputs.current-version }}'
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: 'v${{ steps.package-version.outputs.current-version }}'
body: '${{ steps.parse-changelog.outputs.body }}'
- run: npm publish --tag ${{ github.event.inputs.npmtag }} --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
jobs:
release:
uses: cap-js/.github/.github/workflows/release.yml@main
secrets: inherit
with:
dry-run: ${{ github.event.inputs.dry-run || false }}
tag: ${{ github.event.inputs.tag || 'latest'}}
13 changes: 5 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:

concurrency:
group: test-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -20,17 +20,14 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}

- name: Run Unit Tests
run: |
npm ci
npm install file:. --no-save --force
npm run prerelease:ci-fix
npm run rollup:off
npm run test
npm run rollup && npm run rollup:on
npm run test
npm run test:setup
npm run test:rollup-off
npm run test:rollup-on
29 changes: 0 additions & 29 deletions .reuse/dep5

This file was deleted.

43 changes: 27 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,20 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).
The format is based on [Keep a Changelog](https://keepachangelog.com/).

## Version 0.10.0 - tbd
## [Unreleased]
### Added
- Added support for new builtin type `cds.Map`
- Added types for `SELECT.hints()` of `cds.ql` API

### Changed
- `CHANGELOG.md` and `LICENSE` files are no longer part of the npm package.

### Deprecated
### Removed
### Fixed
### Security

## Version 0.9.0 - 25-01-13
## [0.9.0] - 25-01-13
### Added
- Added missing properties for `log` in `cds.env`
- Added overload for `service.read` to be called with a `ref`
Expand All @@ -28,7 +39,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
- Variants of `SELECT.one(T)` will now return `T | null`, instead of `T`
- Documentation link to `srv.emit`

## Version 0.8.0 - 24-11-26
## [0.8.0] - 24-11-26

### Fixed
- Added missing type for `Request.before('commit', …)`
Expand All @@ -39,7 +50,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
- Calling `SELECT.one('...').from(Plural)` now properly returns a single instance


## Version 0.7.0 - 24-10-24
## [0.7.0] - 24-10-24

### Fixed
- Added missing type for `cds.context.model`
Expand All @@ -61,14 +72,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
- `cds.connect.to` now also supports using a precompiled model.
- Properties of entities are no longer optional in projections, eliminating the need to perform optional chaining on them when using nested projections

## Version 0.6.5 - 2024-08-13
## [0.6.5] - 2024-08-13
### Fixed
- The `@types/sap__cds` link created by the `postinstall` script now also works in monorepo setups where the target `@cap-js/cds-types` might already be preinstalled (often hoisted some levels up).

### Removed
- Removed array-like methods from model parts (`.map`, `.find`, etc.). To still use them, apply spreading to object in question first.

## Version 0.6.4 - 2024-08-05
## [0.6.4] - 2024-08-05
### Added
- `Service.emit(...)` can now also be called with custom events
- `Service.before(...)` and `Service.after(...)` now accept bound and unbound functions as parameter
Expand All @@ -81,40 +92,40 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
### Fixed
- `EACH` event has appropriately been renamed `each` to reflect runtime behaviour

## Version 0.6.3 - 2024-07-19
## [0.6.3] - 2024-07-19
### Fixed
- Installation no longer fails if symlink `@types/sap__cds` exists

## Version 0.6.2 - 2024-07-18
## [0.6.2] - 2024-07-18
### Fixed
- Symlink `@types/sap__cds` correctly created in case of upgrading `@cap-js/cds-types`.

## Version 0.6.1 - 2024-07-18
## [0.6.1] - 2024-07-18
### Fixed
- Scripts `postinstall` and `prerelease:ci-fix` now work correctly on windows.

### Changed
- `postinstall` script now creates a relative symlink from `@types/sap__cds` to allow the project to be moved/ renamed.

## Version 0.6.0 - 2024-07-05
## [0.6.0] - 2024-07-05
This is a prerelease version (`next`) as a preview for the upcoming release of cds 8.
### Changed
- Wrapped all types into an augmented module declaration for `@sap/cds`.
- Added a postinstall script to symlink `@cap-js/cds-types` to `@types/sap__cds` to benefit from the default type resolution mechanism employed by Definitely Typed.

## Version 0.5.0 - 2024-06-20
## [0.5.0] - 2024-06-20
This is a prerelease version (`next`) as a preview for the upcoming release of cds 8.

### Fixed
- Linked definitions are now available via `cds.linked`, especially `cds.linked.LinkedCSN` and `cds.linked.classes` with its relevant type definitions

## Version 0.4.0 - 2024-05-23
## [0.4.0] - 2024-05-23
This is a prerelease version (`next`) as a preview for the upcoming release of cds 8.

### Fixed
- Corrected `exist(…)` to `exists(…)`

## Version 0.3.0-beta.1 - 2024-05-23
## [0.3.0-beta.1] - 2024-05-23

### Added
- Added signatures for `cds.outboxed` and `cds.unboxed`
Expand All @@ -135,7 +146,7 @@ This is a prerelease version (`next`) as a preview for the upcoming release of c
- `cds.log` can now also be called with the names of log levels
- Reintroduced missing `QueryAPI.tx` and add deprecation note for `QueryAPI.transaction`

## Version 0.2.0 - 2024-01-17
## [0.2.0] - 2024-01-17

### Added

Expand All @@ -155,7 +166,7 @@ This is a prerelease version (`next`) as a preview for the upcoming release of c
- `SELECT.from` got its `ref` property back


## Version 0.1.0 - 2023-12-13
## [0.1.0] - 2023-12-13

### Changed

Expand All @@ -165,7 +176,7 @@ This is a prerelease version (`next`) as a preview for the upcoming release of c

- TSDoc comments have a proper structure

## Version 0.0.1 - 2023-12-06
## [0.0.1] - 2023-12-06

### Added

Expand Down
Loading

0 comments on commit e8ef502

Please sign in to comment.