Skip to content

Commit

Permalink
fix: use "TypeScript" and "JavaScript" everywhere (#644)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkaster authored Apr 29, 2021
1 parent 3b03dad commit c15031c
Show file tree
Hide file tree
Showing 43 changed files with 860 additions and 860 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tssdk-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Typescript SDK CI
name: TypeScript SDK CI
on:
pull_request:
types:
Expand Down
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
* **api-explorer:** document request bodies for methods with body parameters ([#593](https://www.github.com/looker-open-source/sdk-codegen/issues/593)) ([740ae5d](https://www.github.com/looker-open-source/sdk-codegen/commit/740ae5d89aa701b29bf225cf61f9a87de0907ef7))
* **api-explorer:** remember user's SDK language preference ([#567](https://www.github.com/looker-open-source/sdk-codegen/issues/567)) ([faa2511](https://www.github.com/looker-open-source/sdk-codegen/commit/faa25113d87072875ec5fb718da7eb10e0a518e4))
* **extension-api-explorer:** prettier loading scene while fetching API specs ([#595](https://www.github.com/looker-open-source/sdk-codegen/issues/595)) ([678297c](https://www.github.com/looker-open-source/sdk-codegen/commit/678297c91f1a922bc8e6858541064f3eea5e1a7c))
* **sdk:** Typescript SDK tree-shaking support ([#580](https://www.github.com/looker-open-source/sdk-codegen/issues/580)) ([8b7f2f0](https://www.github.com/looker-open-source/sdk-codegen/commit/8b7f2f00ab1a765a04bd460a1ca88e9b7bd66a98))
* **sdk:** TypeScript SDK tree-shaking support ([#580](https://www.github.com/looker-open-source/sdk-codegen/issues/580)) ([8b7f2f0](https://www.github.com/looker-open-source/sdk-codegen/commit/8b7f2f00ab1a765a04bd460a1ca88e9b7bd66a98))


### Bug Fixes
Expand All @@ -69,7 +69,7 @@
* **sdk-codegen:** recursive search of direct type references ([#591](https://www.github.com/looker-open-source/sdk-codegen/issues/591)) ([9af2e37](https://www.github.com/looker-open-source/sdk-codegen/commit/9af2e3755fb4f7f987cc6980ed57e15f504295ba))
* **api-explorer:** remove search criteria selector and auto expand results ([#571](https://www.github.com/looker-open-source/sdk-codegen/issues/571)) ([e5a5ee7](https://www.github.com/looker-open-source/sdk-codegen/commit/e5a5ee7ddb2a9c6822dccc9493c994a9a826b419))
* **run-it:** RunIt request overflow ([#565](https://www.github.com/looker-open-source/sdk-codegen/issues/565)) ([38665ac](https://www.github.com/looker-open-source/sdk-codegen/commit/38665ac40b6abc20557db66d0dc536c347c6a862))
* **sdk:** Typescript OAuth test ([#597](https://www.github.com/looker-open-source/sdk-codegen/issues/597)) ([d84d1fc](https://www.github.com/looker-open-source/sdk-codegen/commit/d84d1fc976b52f01981592eacb3abc8e1aab9f1f))
* **sdk:** TypeScript OAuth test ([#597](https://www.github.com/looker-open-source/sdk-codegen/issues/597)) ([d84d1fc](https://www.github.com/looker-open-source/sdk-codegen/commit/d84d1fc976b52f01981592eacb3abc8e1aab9f1f))

## [1.1.0](https://www.github.com/looker-open-source/sdk-codegen/compare/sdk-codegen-all-v1.0.0...sdk-codegen-all-v1.1.0) (2021-04-02)

Expand All @@ -90,6 +90,6 @@
### Bug Fixes

* **sdk-codegen:** legacy generator was broken ([#540](https://www.github.com/looker-open-source/sdk-codegen/issues/540)) ([212cfce](https://www.github.com/looker-open-source/sdk-codegen/commit/212cfce4745ea663322b2338d91315cefec451a9))
* **sdk-codegen:** Typescript SDK generator import logic ([#547](https://www.github.com/looker-open-source/sdk-codegen/issues/547)) ([c5aa033](https://www.github.com/looker-open-source/sdk-codegen/commit/c5aa033c749a2db8a0f98d5b8f49dc287fad06a2))
* **sdk-codegen:** TypeScript SDK generator import logic ([#547](https://www.github.com/looker-open-source/sdk-codegen/issues/547)) ([c5aa033](https://www.github.com/looker-open-source/sdk-codegen/commit/c5aa033c749a2db8a0f98d5b8f49dc287fad06a2))
* **python:** auth_session uses transport_options ([#550](https://www.github.com/looker-open-source/sdk-codegen/issues/550)) ([94d6047](https://www.github.com/looker-open-source/sdk-codegen/commit/94d6047a0d52912ac082eb91616c1e7c379ab262))
* **python:** sdk login, login_user, logout methods ([#545](https://www.github.com/looker-open-source/sdk-codegen/issues/545)) ([e55086c](https://www.github.com/looker-open-source/sdk-codegen/commit/e55086c81401092e8dbd93e273ba101e2e3efe95))
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Please review the following table for a breakdown of the options to initialize t
| SDK | API 3.1 | API 4.0 | Notes |
| -------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Python](python) | `looker_sdk.init31()` | `looker_sdk.init40()` | Both API 3.1 and 4.0 are supported, and can be initialized with the functions shown |
| [Typescript](packages/sdk) | `Looker31SDK()`, `LookerNodeSDK.init31()`, or `LookerBrowserSDK.init31()` | `Looker40SDK()`, `LookerNodeSDK.init40()` or `LookerBrowserSDK.init40()` | Both API 3.1 and 4.0 are supported and can be initialized with the functions shown. **Important** - See information on the [typescript SDK dependencies](#very-important-note-regarding-the-looker-typescript-sdk) at the bottom of this file. |
| [TypeScript](packages/sdk) | `Looker31SDK()`, `LookerNodeSDK.init31()`, or `LookerBrowserSDK.init31()` | `Looker40SDK()`, `LookerNodeSDK.init40()` or `LookerBrowserSDK.init40()` | Both API 3.1 and 4.0 are supported and can be initialized with the functions shown. **Important** - See information on the [typescript SDK dependencies](#very-important-note-regarding-the-looker-typescript-sdk) at the bottom of this file. |
| [Kotlin](kotlin) | Do not use | `LookerSDK()` | API 4.0 was specifically created to correct the endpoint payloads for strongly-typed languages like Kotlin and Swift. Because Kotlin really requires API 4.0, API 4.0 is the default namespace for it |
| [Swift](swift/looker) | Not applicable | `Looker40SDK()` | Swift only has SDK definitions for API 4.0 | |
| [Look#](csharp) | `Looker31SDK()` | `Looker40SDK()` | Community-supported C# SDK for Looker | |
Expand Down Expand Up @@ -87,7 +87,7 @@ All SDKs URL encode (also known as [percent encoding](https://en.wikipedia.org/w

## Using existing, pre-generated SDKs

When a specific language SDK has been developed, Looker makes that SDK available using the standard package manager for by that platform. Currently, the [Python SDK](python) and the [Typescript SDK](packages/sdk) can be installed from their respective package managers by following the instructions in their readmes.
When a specific language SDK has been developed, Looker makes that SDK available using the standard package manager for by that platform. Currently, the [Python SDK](python) and the [TypeScript SDK](packages/sdk) can be installed from their respective package managers by following the instructions in their readmes.

For the other SDKs in this repository, you can copy and paste the source code into a module for your own project. Every SDK will eventually have a deployed package version.

Expand Down Expand Up @@ -210,7 +210,7 @@ Each Looker SDK has existing `readConfig()` examples that read from `.ini` files

Typically, `client_id` and `client_secret` are the only key values that will need to be dynamically retrieved from the `readConfig()` override method because the other configuration values are saved in memory by the initialized SDK client. In the near future, there will be additional authentication flows (such as OAuth) supported by Looker SDKs. The dynamic result that is returned by `readConfig()` can also be useful in those additional scenarios.

A short [Typescript SDK example](https://github.com/looker-open-source/sdk-examples/blob/6f7b42891923a7430e0bb8341c7b5c567a2e1269/typescript/customConfigReader.ts#L15:L28) that customizes `readConfig()` is available in the SDK Examples repository.
A short [TypeScript SDK example](https://github.com/looker-open-source/sdk-examples/blob/6f7b42891923a7430e0bb8341c7b5c567a2e1269/typescript/customConfigReader.ts#L15:L28) that customizes `readConfig()` is available in the SDK Examples repository.

There is also a Kotlin SDK unit test in this repository with a short example:

Expand Down Expand Up @@ -245,7 +245,7 @@ If the host environment for a Looker SDK supports environment variables, the SDK

Environment variables can be used for any SDK runtime that supports reading environment variables. Environment variables can be used in the:

- **Node** version of the Typescript/Javascript Looker SDK
- **Node** version of the TypeScript/JavaScript Looker SDK
- Python SDK
- Swift SDK
- Kotlin SDK
Expand All @@ -270,9 +270,9 @@ Configuration variables should be processed as follows:
- if a configuration value is explicitly in code, apply that value
- if a command-line switch is supported, apply that value

## Very important note regarding the Looker Typescript SDK
## Very important note regarding the Looker TypeScript SDK

The Looker Typescript SDK has been refactored so that node dependencies do not pollute browser usage of the SDK (the node dependencies are not available in the browser and can cause compile errors). There are now three packages available on npm:
The Looker TypeScript SDK has been refactored so that node dependencies do not pollute browser usage of the SDK (the node dependencies are not available in the browser and can cause compile errors). There are now three packages available on npm:

1. `@looker/sdk` - contains the Looker API methods.
2. `@looker/sdk-rtl` - contains a run time library needed to invoke the Looker API methods. Referencing the `@looker/sdk` as a dependency should automatically pull this package in.
Expand Down
2 changes: 1 addition & 1 deletion bin/smoke
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo "Smoking SDKs: ${tests} ..."

if [[ $tests == *typescript* ]]
then
echo "Smoking Typescript SDK ..."
echo "Smoking TypeScript SDK ..."
JEST_JUNIT_OUTPUT_DIR=results JEST_JUNIT_OUTPUT_NAME=ts_sdk_smoke.xml yarn jest packages/sdk-node/test --reporters=default --reporters=jest-junit
fi

Expand Down
2 changes: 1 addition & 1 deletion bin/unit_test
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ echo "Unit testing SDKs: ${tests} ..."

if [[ $tests == *typescript* ]]
then
echo "Unit testing Typescript SDK ..."
echo "Unit testing TypeScript SDK ..."
JEST_JUNIT_OUTPUT_DIR=results JEST_JUNIT_OUTPUT_NAME=ts_sdk_unit.xml yarn jest packages/sdk-rtl --reporters=default --reporters=jest-junit
fi

Expand Down
4 changes: 2 additions & 2 deletions csharp/rtl/ApiMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public ApiMethods(IAuthSession authSession, string apiVersion = Constants.Defaul
: $"{AuthSession.Settings.BaseUrl}/api/{ApiVersion}";
}

// TODO do we need a factory for the various looker versions similar to Typescript's:
// TODO do we need a factory for the various looker versions similar to TypeScript's:
// static create<T extends APIMethods>(
// type: new (authSession: IAuthSession) => T,
// authSession: IAuthSession
Expand Down Expand Up @@ -130,4 +130,4 @@ public async Task<SdkResponse<TSuccess, TError>> AuthRequest<TSuccess, TError>(
// );
// }
}
}
}
Loading

0 comments on commit c15031c

Please sign in to comment.