Skip to content

Commit

Permalink
chore: Reuse check-public-api script from Cloud SDK GH action (#254)
Browse files Browse the repository at this point in the history
* test run

* typo

* test dep

* que?

* try

* set node path

* rename

* update check dep

* test changes

* typo

* fix: change input name

* chore: change to main

---------

Co-authored-by: deekshas8 <[email protected]>
Co-authored-by: Zhongpin Wang <[email protected]>
  • Loading branch information
3 people authored Nov 25, 2024
1 parent a7aa0f4 commit 8eb322e
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 410 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ jobs:
- run: pnpm lint
- name: Check CommonJS compatibility
run: pnpm compile:cjs
- name: Set NODE_PATH
run: echo "NODE_PATH=$(pwd)/node_modules" >> $GITHUB_ENV
- name: Check public API
run: pnpm check:public-api
uses: sap/cloud-sdk-js/.github/actions/check-public-api@main
with:
force_internal_exports: 'false'
ignored_path_pattern: '.*?/client/[^/]+/schema'
- name: Check dependencies
run: pnpm check:deps
- name: License Check
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"schema-tests": "pnpm -F=@sap-ai-sdk/schema-tests",
"sample-code": "pnpm -F=@sap-ai-sdk/sample-code",
"sample-cap": "pnpm -F=@sap-ai-sdk/sample-cap",
"check:public-api": "pnpm -r check:public-api",
"check:deps": "pnpm -r -F !./tests/smoke-tests -F !./tests/schema-tests -F !./sample-cap exec depcheck --ignores=\"nock,@jest/globals\" --quiet"
},
"devDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions packages/ai-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
"lint": "eslint . && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -c",
"lint:fix": "eslint . --fix && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -w --log-level error",
"generate": "openapi-generator --generateESM --clearOutputDir -i ./src/spec/AI_CORE_API.yaml -o ./src/client && pnpm update-imports && pnpm lint:fix",
"update-imports": "node --no-warnings --loader ts-node/esm ../../scripts/update-imports.ts ./src/client/AI_CORE_API",
"check:public-api": "node --loader ts-node/esm ../../scripts/check-public-api-cli.ts"
"update-imports": "node --no-warnings --loader ts-node/esm ../../scripts/update-imports.ts ./src/client/AI_CORE_API"
},
"dependencies": {
"@sap-ai-sdk/core": "workspace:^",
Expand Down
3 changes: 1 addition & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"compile:cjs": "tsc -p tsconfig.cjs.json",
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"lint": "eslint \"**/*.ts\" && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -c",
"lint:fix": "eslint \"**/*.ts\" --fix && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -w --log-level error",
"check:public-api": "node --loader ts-node/esm ../../scripts/check-public-api-cli.ts"
"lint:fix": "eslint \"**/*.ts\" --fix && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -w --log-level error"
},
"dependencies": {
"@sap-cloud-sdk/connectivity": "^3.23.0",
Expand Down
1 change: 0 additions & 1 deletion packages/foundation-models/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"lint": "eslint \"**/*.ts\" && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -c",
"lint:fix": "eslint \"**/*.ts\" --fix && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -w --log-level error",
"check:public-api": "node --loader ts-node/esm ../../scripts/check-public-api-cli.ts",
"generate": "pnpm generate:azure-openai",
"generate:azure-openai": "openapi-generator --generateESM --clearOutputDir -i ./src/azure-openai/spec/inference.yaml -o ./src/azure-openai/client --schemaPrefix AzureOpenAi",
"postgenerate:azure-openai": "rm ./src/azure-openai/client/inference/*.ts && pnpm lint:fix"
Expand Down
3 changes: 1 addition & 2 deletions packages/langchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"compile:cjs": "tsc -p tsconfig.cjs.json",
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"lint": "eslint \"**/*.ts\" && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -c",
"lint:fix": "eslint \"**/*.ts\" --fix && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -w --log-level error",
"check:public-api": "node --loader ts-node/esm ../../scripts/check-public-api-cli.ts"
"lint:fix": "eslint \"**/*.ts\" --fix && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -w --log-level error"
},
"dependencies": {
"@sap-ai-sdk/ai-api": "workspace:^",
Expand Down
3 changes: 1 addition & 2 deletions packages/orchestration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"lint:fix": "eslint \"**/*.ts\" --fix && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -w --log-level error",
"generate": "openapi-generator --generateESM --clearOutputDir -i ./src/spec/api.yaml -o ./src/client",
"postgenerate": "rm ./src/client/api/*.ts && pnpm rename-generated-files && pnpm lint:fix",
"rename-generated-files": "node --no-warnings --loader ts-node/esm ../../scripts/postgenerate-orchestration.ts ./src/client/api",
"check:public-api": "node --loader ts-node/esm ../../scripts/check-public-api-cli.ts"
"rename-generated-files": "node --no-warnings --loader ts-node/esm ../../scripts/postgenerate-orchestration.ts ./src/client/api"
},
"dependencies": {
"@sap-ai-sdk/core": "workspace:^",
Expand Down
9 changes: 0 additions & 9 deletions scripts/check-public-api-cli.ts

This file was deleted.

Loading

0 comments on commit 8eb322e

Please sign in to comment.