Skip to content

Commit

Permalink
Update std to /std@0.140.0 (#37)
Browse files Browse the repository at this point in the history
* Update std to /std@0.140.0

* ci: Update Deno versions: v1.17 and up

* Update README

* Set up v0.4 codegen

* Updates SDK to v2.1060.0

* evert "Updates SDK to v2.1060.0"

This reverts commit 3413a18.

* Revert a little more
  • Loading branch information
danopia authored May 25, 2022
1 parent 0774930 commit 3ce25f2
Show file tree
Hide file tree
Showing 25 changed files with 34 additions and 38 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/deno-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,12 @@ jobs:
fail-fast: false
matrix:
deno-version:
- v1.11
- v1.12
- v1.13
- v1.14
- v1.15
- v1.16
- v1.17
- v1.18
- v1.19
- v1.20
- v1.21
- v1.22
- canary

steps:
Expand Down Expand Up @@ -66,11 +61,9 @@ jobs:
strategy:
matrix:
deno-version:
- v1.11
- v1.13
- v1.16
- v1.17
- v1.21
- v1.18
- v1.20
- v1.22
- canary
fail-fast: false # run each branch to completion

Expand Down
2 changes: 1 addition & 1 deletion generation/deploy/mod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env -S deno run --allow-env --allow-net=[::]:8000,api.github.com,raw.githubusercontent.com,deno-httpcache.s3.dualstack.us-east-2.amazonaws.com generation/deploy/mod.ts
import { serve } from "https://deno.land/std@0.119.0/http/server.ts";
import { serve } from "https://deno.land/std@0.140.0/http/server.ts";
import { createReporter } from "https://deno.land/x/g_a@0.1.2/mod.ts";

import { ResponseError, ResponseText } from "./helpers.ts";
Expand Down
4 changes: 2 additions & 2 deletions generation/deploy/s3-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

// Autogenerated API client for: Amazon Simple Storage Service

import * as Base64 from "https://deno.land/std@0.119.0/encoding/base64.ts";
import * as HashMd5 from "https://deno.land/std@0.119.0/hash/md5.ts";
import * as Base64 from "https://deno.land/std@0.140.0/encoding/base64.ts";
import * as HashMd5 from "https://deno.land/std@0.140.0/hash/md5.ts";
import * as client from "../../lib/client/common.ts";
import * as cmnP from "../../lib/encoding/common.ts";
function hashMD5(data: HashMd5.Message): string {
Expand Down
6 changes: 3 additions & 3 deletions generation/helper-library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export interface Helper {

export const HashMD5: Helper = {
deps: {
HashMd5: "https://deno.land/std@0.120.0/hash/md5.ts",
HashMd5: "https://deno.land/std@0.140.0/hash/md5.ts",
},
chunks: [
`function hashMD5(data: HashMd5.Message): string {`,
Expand All @@ -84,7 +84,7 @@ export const HashMD5: Helper = {

export const SerializeBlob: Helper = {
deps: {
Base64: "https://deno.land/std@0.120.0/encoding/base64.ts",
Base64: "https://deno.land/std@0.140.0/encoding/base64.ts",
},
chunks: [
`function serializeBlob(input: string | Uint8Array | null | undefined) {`,
Expand All @@ -95,7 +95,7 @@ export const SerializeBlob: Helper = {
};
export const ParseBlob: Helper = {
deps: {
Base64: "https://deno.land/std@0.120.0/encoding/base64.ts",
Base64: "https://deno.land/std@0.140.0/encoding/base64.ts",
},
chunks: [
`function parseBlob(input: string | null | undefined) {`,
Expand Down
2 changes: 1 addition & 1 deletion generation/jmespath_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { compileJMESPath } from './jmespath.ts';
import { assertEquals } from "https://deno.land/std@0.119.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.140.0/testing/asserts.ts";

const cases: Record<string,string> = {
"EndpointStatus": "resp?.EndpointStatus",
Expand Down
2 changes: 1 addition & 1 deletion generation/script/update-services.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { readCSVObjects, writeCSVObjects } from "https://deno.land/x/csv@v0.6.0/mod.ts";
import * as path from "https://deno.land/std@0.119.0/path/mod.ts";
import * as path from "https://deno.land/std@0.140.0/path/mod.ts";
import ServiceCodeGen from '../code-gen.ts';
import type * as Schema from '../sdk-schema.ts';

Expand Down
2 changes: 1 addition & 1 deletion generation/script/validate-fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async function generateRun(run: TestRun): Promise<void> {

const chunks = new Array<string>();
chunks.push('\n/////////\n');
chunks.push(`import { assertEquals, assertRejects, assertObjectMatch } from "https://deno.land/std@0.120.0/testing/asserts.ts";`);
chunks.push(`import { assertEquals, assertRejects, assertObjectMatch } from "https://deno.land/std@0.140.0/testing/asserts.ts";`);
chunks.push(`import { wrapServiceClient } from '../../client/client.ts';\n`);
chunks.push(`import { ServiceApiClass, AwsServiceError } from '../../client/common.ts';\n`);

Expand Down
2 changes: 1 addition & 1 deletion generation/script/validate-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import type * as Schema from '../sdk-schema.ts';
import ServiceCodeGen from '../code-gen.ts';
import * as path from "https://deno.land/std@0.119.0/path/mod.ts";
import * as path from "https://deno.land/std@0.140.0/path/mod.ts";

const testDir = path.join('lib','testgen','services');
await Deno.mkdir(testDir, { recursive: true });
Expand Down
3 changes: 3 additions & 0 deletions lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ const ec2_europe = new ApiFactory({

## Changelog

* `v0.8.0` on `TBD`: codegen `TBD`
* Use Deno's `/std@0.140.0`
* Minimum supported Deno is now `v1.17`
* `v0.7.0` on `2022-05-15`: Client-only changes
* Add by-default support for task-specific IAM credentials inside Amazon ECS.
See also [IAM roles for tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html).
Expand Down
2 changes: 1 addition & 1 deletion lib/client/client_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertRejects, assertObjectMatch } from "https://deno.land/std@0.119.0/testing/asserts.ts";
import { assertRejects, assertObjectMatch } from "https://deno.land/std@0.140.0/testing/asserts.ts";
import { BaseApiFactory, handleErrorResponse } from "./client.ts";
import { AwsServiceError } from "./mod.ts";

Expand Down
2 changes: 1 addition & 1 deletion lib/client/credentials_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SharedIniFileCredentials } from './credentials.ts';
import { assertEquals } from "https://deno.land/std@0.120.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.140.0/testing/asserts.ts";

Deno.test('basic ini file', async () => {
const credential = new SharedIniFileCredentials({
Expand Down
2 changes: 1 addition & 1 deletion lib/client/endpoints_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals, assertThrows } from "https://deno.land/std@0.120.0/testing/asserts.ts";
import { assertEquals, assertThrows } from "https://deno.land/std@0.140.0/testing/asserts.ts";
import type { ApiMetadata } from "./common.ts";
import { AwsEndpointResolver, FixedBaseEndpointResolver, S3CompatibleEndpointResolver } from "./endpoints.ts";

Expand Down
2 changes: 1 addition & 1 deletion lib/client/signing.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// port of https://github.com/lucacasonato/deno_aws_sign_v4
// because that repo (as of press time) unnecesarily brings in 25 source files

import { Message, Sha256, HmacSha256 } from "https://deno.land/std@0.120.0/hash/sha256.ts";
import { Message, Sha256, HmacSha256 } from "https://deno.land/std@0.140.0/hash/sha256.ts";
import type { Signer, Credentials } from "./common.ts";

function sha256(data: Message): Sha256 {
Expand Down
2 changes: 1 addition & 1 deletion lib/encoding/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export function readJsonValueBase64(input: JSONValue): JSONValue {
return JSON.parse(atob(input));
}

// from https://deno.land/std@0.120.0/encoding/base64.ts
// from https://deno.land/std@0.140.0/encoding/base64.ts
function decodeBase64(b64: string): Uint8Array {
const binString = atob(b64);
const size = binString.length;
Expand Down
2 changes: 1 addition & 1 deletion lib/examples/sqs-redriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { SQS } from '../services/sqs/mod.ts';
const sqs = new ApiFactory().makeNew(SQS);

// we'll be taking input
import { parse as parseFlags } from "https://deno.land/std@0.120.0/flags/mod.ts";
import { parse as parseFlags } from "https://deno.land/std@0.140.0/flags/mod.ts";
import Ask from 'https://deno.land/x/ask@1.0.6/mod.ts';

let { dlq, target, automatic } = parseFlags(Deno.args, {
Expand Down
2 changes: 1 addition & 1 deletion lib/services/cloudwatch/mod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Autogenerated API client for: Amazon CloudWatch

export * from "./structs.ts";
import * as Base64 from "https://deno.land/std@0.120.0/encoding/base64.ts";
import * as Base64 from "https://deno.land/std@0.140.0/encoding/base64.ts";
import * as client from "../../client/common.ts";
import * as qsP from "../../encoding/querystring.ts";
import * as xmlP from "../../encoding/xml.ts";
Expand Down
2 changes: 1 addition & 1 deletion lib/services/dynamodb/mod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Autogenerated API client for: Amazon DynamoDB

export * from "./structs.ts";
import * as Base64 from "https://deno.land/std@0.120.0/encoding/base64.ts";
import * as Base64 from "https://deno.land/std@0.140.0/encoding/base64.ts";
import * as client from "../../client/common.ts";
import * as cmnP from "../../encoding/common.ts";
import * as jsonP from "../../encoding/json.ts";
Expand Down
2 changes: 1 addition & 1 deletion lib/services/ecr/mod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Autogenerated API client for: Amazon EC2 Container Registry

export * from "./structs.ts";
import * as Base64 from "https://deno.land/std@0.120.0/encoding/base64.ts";
import * as Base64 from "https://deno.land/std@0.140.0/encoding/base64.ts";
import * as client from "../../client/common.ts";
import * as cmnP from "../../encoding/common.ts";
import * as jsonP from "../../encoding/json.ts";
Expand Down
2 changes: 1 addition & 1 deletion lib/services/kinesis/mod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Autogenerated API client for: Amazon Kinesis

export * from "./structs.ts";
import * as Base64 from "https://deno.land/std@0.120.0/encoding/base64.ts";
import * as Base64 from "https://deno.land/std@0.140.0/encoding/base64.ts";
import * as client from "../../client/common.ts";
import * as cmnP from "../../encoding/common.ts";
import * as jsonP from "../../encoding/json.ts";
Expand Down
2 changes: 1 addition & 1 deletion lib/services/kms/mod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Autogenerated API client for: AWS Key Management Service

export * from "./structs.ts";
import * as Base64 from "https://deno.land/std@0.120.0/encoding/base64.ts";
import * as Base64 from "https://deno.land/std@0.140.0/encoding/base64.ts";
import * as client from "../../client/common.ts";
import * as cmnP from "../../encoding/common.ts";
import * as jsonP from "../../encoding/json.ts";
Expand Down
2 changes: 1 addition & 1 deletion lib/services/lambda/mod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Autogenerated API client for: AWS Lambda

export * from "./structs.ts";
import * as Base64 from "https://deno.land/std@0.120.0/encoding/base64.ts";
import * as Base64 from "https://deno.land/std@0.140.0/encoding/base64.ts";
import * as client from "../../client/common.ts";
import * as cmnP from "../../encoding/common.ts";
import * as jsonP from "../../encoding/json.ts";
Expand Down
4 changes: 2 additions & 2 deletions lib/services/s3/mod.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Autogenerated API client for: Amazon Simple Storage Service

export * from "./structs.ts";
import * as Base64 from "https://deno.land/std@0.120.0/encoding/base64.ts";
import * as HashMd5 from "https://deno.land/std@0.120.0/hash/md5.ts";
import * as Base64 from "https://deno.land/std@0.140.0/encoding/base64.ts";
import * as HashMd5 from "https://deno.land/std@0.140.0/hash/md5.ts";
import * as client from "../../client/common.ts";
import * as cmnP from "../../encoding/common.ts";
import * as xmlP from "../../encoding/xml.ts";
Expand Down
2 changes: 1 addition & 1 deletion lib/services/sesv2/mod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Autogenerated API client for: Amazon Simple Email Service

export * from "./structs.ts";
import * as Base64 from "https://deno.land/std@0.120.0/encoding/base64.ts";
import * as Base64 from "https://deno.land/std@0.140.0/encoding/base64.ts";
import * as client from "../../client/common.ts";
import * as cmnP from "../../encoding/common.ts";
import * as jsonP from "../../encoding/json.ts";
Expand Down
2 changes: 1 addition & 1 deletion lib/services/sns/mod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Autogenerated API client for: Amazon Simple Notification Service

export * from "./structs.ts";
import * as Base64 from "https://deno.land/std@0.120.0/encoding/base64.ts";
import * as Base64 from "https://deno.land/std@0.140.0/encoding/base64.ts";
import * as client from "../../client/common.ts";
import * as qsP from "../../encoding/querystring.ts";
import * as xmlP from "../../encoding/xml.ts";
Expand Down
2 changes: 1 addition & 1 deletion lib/services/sqs/mod.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Autogenerated API client for: Amazon Simple Queue Service

export * from "./structs.ts";
import * as Base64 from "https://deno.land/std@0.120.0/encoding/base64.ts";
import * as Base64 from "https://deno.land/std@0.140.0/encoding/base64.ts";
import * as client from "../../client/common.ts";
import * as qsP from "../../encoding/querystring.ts";
import * as xmlP from "../../encoding/xml.ts";
Expand Down

0 comments on commit 3ce25f2

Please sign in to comment.