Skip to content

Commit

Permalink
Merge pull request #51 from adzerk/simonramzi/sc-48140/javascript-dec…
Browse files Browse the repository at this point in the history
…ision-sdk-ignores-some-fields

Fixed Typescript Compilation After Testing Locally
  • Loading branch information
honeycomb-cheesecake authored Aug 15, 2023
2 parents 9a036d4 + 68c88b7 commit 3bc5af6
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 31 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/publish-decision-spec-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [published]

env:
WORKINGDIRECTORY_DECISION: build/ts/decision
WORKINGDIRECTORY_DECISION: .build/ts/decision

jobs:
typescript:
Expand All @@ -22,6 +22,13 @@ jobs:
with:
node-version: 18

- id: f7414109-3255-4132-a3c9-6e38a68e54fe
name: Setup Java (Needed by Generator)
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

- id: e75378b3-35d5-4f84-a871-d47e518f2d04
name: Install Dependencies
run: npm clean-install
Expand All @@ -44,8 +51,8 @@ jobs:
name: Compile Package
working-directory: ${{ env.WORKINGDIRECTORY_DECISION }}
run: |
tsc --outDir dist --declaration --showConfig *.ts
tsc --outDir dist --declaration *.ts
tsc --outDir dist --declaration --target es6 --moduleResolution nodenext --showConfig *.ts
tsc --outDir dist --declaration --target es6 --moduleResolution nodenext *.ts
- id: edd89b5d-54fa-4951-8206-54b1cef91968
name: Configure Project-Level .npmrc File
Expand All @@ -65,7 +72,7 @@ jobs:
working-directory: ${{ env.WORKINGDIRECTORY_DECISION }}
run: |
echo "Publishing tag ${GITHUB_REF_NAME} to ${NPM_REGISTRY}."
npm publish --dry-run
npm publish
- id: c3c47fb3-2620-4dd1-898b-e867303278ea
name: Publish Package to GitHub Packages
Expand All @@ -75,4 +82,4 @@ jobs:
working-directory: ${{ env.WORKINGDIRECTORY_DECISION }}
run: |
echo "Publishing tag ${GITHUB_REF_NAME} to ${NPM_REGISTRY}."
npm publish --dry-run
npm publish
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.build
build
.DS_Store
.env
node_modules
.secrets
51 changes: 34 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,61 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- [sc-48140] Typescript stage in publish workflow to target the correct version of Javascript. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).

### Changed

- [sc-48140] Updated build directory for generated assets. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
- [sc-48140] Removed `--dry-run` option from `npm publish` so that package is uploaded to registries. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).

### Added

- [sc-48140] Setup of Java stage as it is needed by generator when testing. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
- [sc-48140] Entries to `.gitignore` to assist testing of workflows. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
- [sc-48140] Added work card ids to changelog for tracking. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).

## [1.0.6] - [sc-48140] 2023-08-14

### Added

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

## [1.0.5] - 2023-08-14
## [1.0.5] - [sc-48140] 2023-08-14

### Fixed

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

## [1.0.4] - 2023-08-14
## [1.0.4] - [sc-48140] 2023-08-14

### Fixed

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

## [1.0.3] - 2023-08-14
## [1.0.3] - [sc-48140] 2023-08-14

### Fixed

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

### Changed

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

[1.0.2] - 2023-08-14
[1.0.2] - [sc-48140] 2023-08-14

### Changed

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

### Added

- This `CHANGELOG.md` file to track changes. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
- Schema definition for `SkipFilters` in `decision/openapi-3.yaml`. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
- `SkipFilters` parameter to Placement object in non-breaking, optional manner. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
- Base information to project `package.json`. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
- NPM build scripts to `package.json` for both the decision and management specifications. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
- 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).
- [sc-48140] This `CHANGELOG.md` file to track changes. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
- [sc-48140] Schema definition for `SkipFilters` in `decision/openapi-3.yaml`. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
- [sc-48140] `SkipFilters` parameter to Placement object in non-breaking, optional manner. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
- [sc-48140] Base information to project `package.json`. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
- [sc-48140] NPM build scripts to `package.json` for both the decision and management specifications. By [@honeycomb-cheesecake](https://github.com/honeycomb-cheesecake).
- [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).
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "@adzerk/api-specification",
"version": "1.0.2",
"version": "1.0.6",
"license": "Apache-2.0",
"description": "Kevel API Specification",
"main": "index.js",
"scripts": {
"build-all": "npm run build-decision-all && npm run build-management-all",
"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",
"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",
"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",
"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",
"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",
"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",
"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",
"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",
"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",
"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",
"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",
"build-management-all": "npm run build-management-csharp && npm run build-management-ruby && npm run build-management-typescript",
"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",
"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",
"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",
"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",
"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",
"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",
"clean": "rm -rf build"
},
"repository": {
Expand Down

0 comments on commit 3bc5af6

Please sign in to comment.