Skip to content

Commit 3bc5af6

Browse files
Merge pull request #51 from adzerk/simonramzi/sc-48140/javascript-decision-sdk-ignores-some-fields
Fixed Typescript Compilation After Testing Locally
2 parents 9a036d4 + 68c88b7 commit 3bc5af6

File tree

4 files changed

+58
-31
lines changed

4 files changed

+58
-31
lines changed

.github/workflows/publish-decision-spec-packages.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [published]
66

77
env:
8-
WORKINGDIRECTORY_DECISION: build/ts/decision
8+
WORKINGDIRECTORY_DECISION: .build/ts/decision
99

1010
jobs:
1111
typescript:
@@ -22,6 +22,13 @@ jobs:
2222
with:
2323
node-version: 18
2424

25+
- id: f7414109-3255-4132-a3c9-6e38a68e54fe
26+
name: Setup Java (Needed by Generator)
27+
uses: actions/setup-java@v3
28+
with:
29+
distribution: temurin
30+
java-version: 17
31+
2532
- id: e75378b3-35d5-4f84-a871-d47e518f2d04
2633
name: Install Dependencies
2734
run: npm clean-install
@@ -44,8 +51,8 @@ jobs:
4451
name: Compile Package
4552
working-directory: ${{ env.WORKINGDIRECTORY_DECISION }}
4653
run: |
47-
tsc --outDir dist --declaration --showConfig *.ts
48-
tsc --outDir dist --declaration *.ts
54+
tsc --outDir dist --declaration --target es6 --moduleResolution nodenext --showConfig *.ts
55+
tsc --outDir dist --declaration --target es6 --moduleResolution nodenext *.ts
4956
5057
- id: edd89b5d-54fa-4951-8206-54b1cef91968
5158
name: Configure Project-Level .npmrc File
@@ -65,7 +72,7 @@ jobs:
6572
working-directory: ${{ env.WORKINGDIRECTORY_DECISION }}
6673
run: |
6774
echo "Publishing tag ${GITHUB_REF_NAME} to ${NPM_REGISTRY}."
68-
npm publish --dry-run
75+
npm publish
6976
7077
- id: c3c47fb3-2620-4dd1-898b-e867303278ea
7178
name: Publish Package to GitHub Packages
@@ -75,4 +82,4 @@ jobs:
7582
working-directory: ${{ env.WORKINGDIRECTORY_DECISION }}
7683
run: |
7784
echo "Publishing tag ${GITHUB_REF_NAME} to ${NPM_REGISTRY}."
78-
npm publish --dry-run
85+
npm publish

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.build
12
build
23
.DS_Store
4+
.env
35
node_modules
6+
.secrets

CHANGELOG.md

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,61 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- [sc-48140] Typescript stage in publish workflow to target the correct version of Javascript. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
13+
14+
### Changed
15+
16+
- [sc-48140] Updated build directory for generated assets. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
17+
- [sc-48140] Removed `--dry-run` option from `npm publish` so that package is uploaded to registries. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
18+
19+
### Added
20+
21+
- [sc-48140] Setup of Java stage as it is needed by generator when testing. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
22+
- [sc-48140] Entries to `.gitignore` to assist testing of workflows. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
23+
- [sc-48140] Added work card ids to changelog for tracking. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
24+
25+
## [1.0.6] - [sc-48140] 2023-08-14
26+
1027
### Added
1128

12-
- Debug statement to workflow. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
29+
- [sc-48140] Debug statement to workflow. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
1330

14-
## [1.0.5] - 2023-08-14
31+
## [1.0.5] - [sc-48140] 2023-08-14
1532

1633
### Fixed
1734

18-
- Typescript compiler error by fixing to version `5.x` on install. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
35+
- [sc-48140] Typescript compiler error by fixing to version `5.x` on install. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
1936

20-
## [1.0.4] - 2023-08-14
37+
## [1.0.4] - [sc-48140] 2023-08-14
2138

2239
### Fixed
2340

24-
- GitHub Actions working directory references `publish-decision-spec-packages.yml`. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
41+
- [sc-48140] GitHub Actions working directory references `publish-decision-spec-packages.yml`. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
2542

26-
## [1.0.3] - 2023-08-14
43+
## [1.0.3] - [sc-48140] 2023-08-14
2744

2845
### Fixed
2946

30-
- `package-lock.json` file as prior one didn't work with `npm clean-install`. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
47+
- [sc-48140] `package-lock.json` file as prior one didn't work with `npm clean-install`. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
3148

3249
### Changed
3350

34-
- `package.json` file version to latest released. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
51+
- [sc-48140] `package.json` file version to latest released. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
3552

36-
[1.0.2] - 2023-08-14
53+
[1.0.2] - [sc-48140] 2023-08-14
3754

3855
### Changed
3956

40-
- Updated `@openapitools/openapi-generator-cli` to latest. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
41-
- Updated `generator-cli` version. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
57+
- [sc-48140] Updated `@openapitools/openapi-generator-cli` to latest. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
58+
- [sc-48140] Updated `generator-cli` version. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
4259

4360
### Added
4461

45-
- This `CHANGELOG.md` file to track changes. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
46-
- Schema definition for `SkipFilters` in `decision/openapi-3.yaml`. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
47-
- `SkipFilters` parameter to Placement object in non-breaking, optional manner. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
48-
- Base information to project `package.json`. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
49-
- NPM build scripts to `package.json` for both the decision and management specifications. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
50-
- CI/CD workflow that allows for Typescript implementation of the api spec to be deployed as a package to a npm registry (currently a dry-run). By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
62+
- [sc-48140] This `CHANGELOG.md` file to track changes. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
63+
- [sc-48140] Schema definition for `SkipFilters` in `decision/openapi-3.yaml`. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
64+
- [sc-48140] `SkipFilters` parameter to Placement object in non-breaking, optional manner. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
65+
- [sc-48140] Base information to project `package.json`. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
66+
- [sc-48140] NPM build scripts to `package.json` for both the decision and management specifications. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
67+
- [sc-48140] CI/CD workflow that allows for Typescript implementation of the api spec to be deployed as a package to a npm registry (currently a dry-run). By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
22
"name": "@adzerk/api-specification",
3-
"version": "1.0.2",
3+
"version": "1.0.6",
44
"license": "Apache-2.0",
55
"description": "Kevel API Specification",
66
"main": "index.js",
77
"scripts": {
88
"build-all": "npm run build-decision-all && npm run build-management-all",
99
"build-decision-all": "npm run build-decision-csharp && npm run build-decision-java && npm run build-decision-python && npm run build-decision-ruby && npm run build-decision-typescript",
10-
"build-decision-csharp": "npx @openapitools/openapi-generator-cli generate --input-spec ./decision/openapi-3.yaml --generator-name csharp --output ./build/cs/decision --config ./decision/codegen-config/csharp-netcore.json",
11-
"build-decision-java": "npx @openapitools/openapi-generator-cli generate --input-spec ./decision/openapi-3.yaml --generator-name java --output ./build/java/decision --config ./decision/codegen-config/java.json",
12-
"build-decision-python": "npx @openapitools/openapi-generator-cli generate --input-spec ./decision/openapi-3.yaml --generator-name python --output ./build/py/decision --config ./decision/codegen-config/python.json",
13-
"build-decision-ruby": "npx @openapitools/openapi-generator-cli generate --input-spec ./decision/openapi-3.yaml --generator-name ruby --output ./build/rb/decision --config ./decision/codegen-config/ruby.json",
14-
"build-decision-typescript": "npx @openapitools/openapi-generator-cli generate --input-spec ./decision/openapi-3.yaml --generator-name typescript-fetch --output ./build/ts/decision --config ./decision/codegen-config/typescript-fetch.json",
10+
"build-decision-csharp": "npx @openapitools/openapi-generator-cli generate --input-spec ./decision/openapi-3.yaml --generator-name csharp --output ./.build/cs/decision --config ./decision/codegen-config/csharp-netcore.json",
11+
"build-decision-java": "npx @openapitools/openapi-generator-cli generate --input-spec ./decision/openapi-3.yaml --generator-name java --output ./.build/java/decision --config ./decision/codegen-config/java.json",
12+
"build-decision-python": "npx @openapitools/openapi-generator-cli generate --input-spec ./decision/openapi-3.yaml --generator-name python --output ./.build/py/decision --config ./decision/codegen-config/python.json",
13+
"build-decision-ruby": "npx @openapitools/openapi-generator-cli generate --input-spec ./decision/openapi-3.yaml --generator-name ruby --output ./.build/rb/decision --config ./decision/codegen-config/ruby.json",
14+
"build-decision-typescript": "npx @openapitools/openapi-generator-cli generate --input-spec ./decision/openapi-3.yaml --generator-name typescript-fetch --output ./.build/ts/decision --config ./decision/codegen-config/typescript-fetch.json",
1515
"build-management-all": "npm run build-management-csharp && npm run build-management-ruby && npm run build-management-typescript",
16-
"build-management-csharp": "npx @openapitools/openapi-generator-cli generate --input-spec ./management/openapi-3.yaml --generator-name csharp --output ./build/cs/management --config ./management/codegen-config/csharp-netcore.json --skip-validate-spec",
17-
"build-management-ruby": "npx @openapitools/openapi-generator-cli generate --input-spec ./management/openapi-3.yaml --generator-name ruby --output ./build/rb/management --config ./management/codegen-config/ruby.json --skip-validate-spec",
18-
"build-management-typescript": "npx @openapitools/openapi-generator-cli generate --input-spec ./management/openapi-3.yaml --generator-name typescript-fetch --output ./build/ts/management --config ./management/codegen-config/typescript-fetch.json --skip-validate-spec",
16+
"build-management-csharp": "npx @openapitools/openapi-generator-cli generate --input-spec ./management/openapi-3.yaml --generator-name csharp --output ./.build/cs/management --config ./management/codegen-config/csharp-netcore.json --skip-validate-spec",
17+
"build-management-ruby": "npx @openapitools/openapi-generator-cli generate --input-spec ./management/openapi-3.yaml --generator-name ruby --output ./.build/rb/management --config ./management/codegen-config/ruby.json --skip-validate-spec",
18+
"build-management-typescript": "npx @openapitools/openapi-generator-cli generate --input-spec ./management/openapi-3.yaml --generator-name typescript-fetch --output ./.build/ts/management --config ./management/codegen-config/typescript-fetch.json --skip-validate-spec",
1919
"clean": "rm -rf build"
2020
},
2121
"repository": {

0 commit comments

Comments
 (0)