From 76003bf74ff76f5728a27e66210a1aaeadfce034 Mon Sep 17 00:00:00 2001 From: Allan Zheng Date: Wed, 3 Jun 2020 17:43:03 -0700 Subject: [PATCH 1/3] feat: deprecate util-base64-universal --- packages/md5-js/package.json | 9 +- packages/md5-js/src/index.spec.ts | 2 +- packages/util-base64-universal/.gitignore | 8 - packages/util-base64-universal/.npmignore | 16 - packages/util-base64-universal/CHANGELOG.md | 347 ------------------ packages/util-base64-universal/LICENSE | 201 ---------- packages/util-base64-universal/README.md | 4 - packages/util-base64-universal/jest.config.js | 5 - packages/util-base64-universal/package.json | 29 -- .../util-base64-universal/src/index.spec.ts | 62 ---- packages/util-base64-universal/src/index.ts | 35 -- packages/util-base64-universal/tsconfig.json | 15 - .../util-base64-universal/tsconfig.test.json | 11 - 13 files changed, 9 insertions(+), 735 deletions(-) delete mode 100644 packages/util-base64-universal/.gitignore delete mode 100644 packages/util-base64-universal/.npmignore delete mode 100644 packages/util-base64-universal/CHANGELOG.md delete mode 100644 packages/util-base64-universal/LICENSE delete mode 100644 packages/util-base64-universal/README.md delete mode 100644 packages/util-base64-universal/jest.config.js delete mode 100644 packages/util-base64-universal/package.json delete mode 100644 packages/util-base64-universal/src/index.spec.ts delete mode 100644 packages/util-base64-universal/src/index.ts delete mode 100644 packages/util-base64-universal/tsconfig.json delete mode 100644 packages/util-base64-universal/tsconfig.test.json diff --git a/packages/md5-js/package.json b/packages/md5-js/package.json index 73c6482081ae..294f34dff733 100644 --- a/packages/md5-js/package.json +++ b/packages/md5-js/package.json @@ -14,7 +14,8 @@ }, "license": "Apache-2.0", "devDependencies": { - "@aws-sdk/util-base64-universal": "1.0.0-gamma.1", + "@aws-sdk/util-base64-node": "1.0.0-gamma.1", + "@aws-sdk/util-base64-browser": "1.0.0-gamma.1", "@aws-sdk/util-hex-encoding": "1.0.0-gamma.1", "@types/jest": "^25.1.4", "@types/node": "^10.0.0", @@ -26,5 +27,11 @@ "@aws-sdk/types": "1.0.0-gamma.1", "@aws-sdk/util-utf8-browser": "1.0.0-gamma.1", "tslib": "^1.8.0" + }, + "browser": { + "@aws-sdk/util-base64-node": "@aws-sdk/util-base64-browser" + }, + "react-native": { + "@aws-sdk/util-base64-node": "@aws-sdk/util-base64-browser" } } diff --git a/packages/md5-js/src/index.spec.ts b/packages/md5-js/src/index.spec.ts index 9ba38edd83a4..1d1250318d91 100644 --- a/packages/md5-js/src/index.spec.ts +++ b/packages/md5-js/src/index.spec.ts @@ -1,5 +1,5 @@ import { Md5 } from "./"; -import { fromBase64 } from "@aws-sdk/util-base64-universal"; +import { fromBase64 } from "@aws-sdk/util-base64-node"; import { toHex } from "@aws-sdk/util-hex-encoding"; const hashVectors = require("hash-test-vectors"); diff --git a/packages/util-base64-universal/.gitignore b/packages/util-base64-universal/.gitignore deleted file mode 100644 index 3d1714c9806e..000000000000 --- a/packages/util-base64-universal/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/node_modules/ -/build/ -/coverage/ -/docs/ -*.tsbuildinfo -*.tgz -*.log -package-lock.json diff --git a/packages/util-base64-universal/.npmignore b/packages/util-base64-universal/.npmignore deleted file mode 100644 index 9fc09eec2b85..000000000000 --- a/packages/util-base64-universal/.npmignore +++ /dev/null @@ -1,16 +0,0 @@ -/src/ -/coverage/ -tsconfig.test.json -*.tsbuildinfo - -*.spec.js -*.spec.d.ts -*.spec.js.map - -*.mock.js -*.mock.d.ts -*.mock.js.map - -*.fixture.js -*.fixture.d.ts -*.fixture.js.map diff --git a/packages/util-base64-universal/CHANGELOG.md b/packages/util-base64-universal/CHANGELOG.md deleted file mode 100644 index 80fa1aafe30c..000000000000 --- a/packages/util-base64-universal/CHANGELOG.md +++ /dev/null @@ -1,347 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [1.0.0-gamma.1](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-base64-universal@0.1.0-preview.1...@aws-sdk/util-base64-universal@1.0.0-gamma.1) (2020-05-21) - - -### Features - -* bump up to gamma version ([#1192](https://github.com/aws/aws-sdk-js-v3/issues/1192)) ([a609075](https://github.com/aws/aws-sdk-js-v3/commit/a6090754f2a6c21e5b70bf0c8782cc0fbe59ee12)) - - - -# 1.0.0-beta.2 (2020-03-28) - - - -# 1.0.0-beta.1 (2020-03-25) - - -### Features - -* bump packages to beta ([#1050](https://github.com/aws/aws-sdk-js-v3/issues/1050)) ([40501d4](https://github.com/aws/aws-sdk-js-v3/commit/40501d4394d04bc1bc91c10136fa48b1d3a67d8f)) - - - -# 1.0.0-alpha.28 (2020-03-20) - - - -# 0.9.0 (2020-01-09) - - - -# 0.4.0 (2019-09-19) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed45fd5580ef9633da78f13aaa6aa472805)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10cb6b0ebc32004b797556bfc171c96bbf16)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab4ac5343058eaf7d448a428d8c4b72c844)) - - - - - -# [1.0.0-beta.3](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-base64-universal@0.1.0-preview.1...@aws-sdk/util-base64-universal@1.0.0-beta.3) (2020-04-27) - - -### Features - -* use exact @aws-sdk/* dependencies ([#1110](https://github.com/aws/aws-sdk-js-v3/issues/1110)) ([bcfd7a2](https://github.com/aws/aws-sdk-js-v3/commit/bcfd7a2faeca3a2605057fd4736d710aa4902b62)) - - - -# 1.0.0-beta.2 (2020-03-28) - - - -# 1.0.0-beta.1 (2020-03-25) - - -### Features - -* bump packages to beta ([#1050](https://github.com/aws/aws-sdk-js-v3/issues/1050)) ([40501d4](https://github.com/aws/aws-sdk-js-v3/commit/40501d4394d04bc1bc91c10136fa48b1d3a67d8f)) - - - -# 1.0.0-alpha.28 (2020-03-20) - - - -# 0.9.0 (2020-01-09) - - - -# 0.4.0 (2019-09-19) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed45fd5580ef9633da78f13aaa6aa472805)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10cb6b0ebc32004b797556bfc171c96bbf16)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab4ac5343058eaf7d448a428d8c4b72c844)) - - - - - -# [1.0.0-beta.2](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-base64-universal@0.1.0-preview.1...@aws-sdk/util-base64-universal@1.0.0-beta.2) (2020-03-28) - - - -# 1.0.0-beta.1 (2020-03-25) - - -### Features - -* bump packages to beta ([#1050](https://github.com/aws/aws-sdk-js-v3/issues/1050)) ([40501d4](https://github.com/aws/aws-sdk-js-v3/commit/40501d4394d04bc1bc91c10136fa48b1d3a67d8f)) - - - -# 1.0.0-alpha.28 (2020-03-20) - - - -# 0.9.0 (2020-01-09) - - - -# 0.4.0 (2019-09-19) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed45fd5580ef9633da78f13aaa6aa472805)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10cb6b0ebc32004b797556bfc171c96bbf16)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab4ac5343058eaf7d448a428d8c4b72c844)) - - - - - -# [1.0.0-beta.1](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-base64-universal@0.1.0-preview.1...@aws-sdk/util-base64-universal@1.0.0-beta.1) (2020-03-25) - - -### Features - -* bump packages to beta ([#1050](https://github.com/aws/aws-sdk-js-v3/issues/1050)) ([40501d4](https://github.com/aws/aws-sdk-js-v3/commit/40501d4394d04bc1bc91c10136fa48b1d3a67d8f)) - - - -# 1.0.0-alpha.28 (2020-03-20) - - - -# 0.9.0 (2020-01-09) - - - -# 0.4.0 (2019-09-19) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed45fd5580ef9633da78f13aaa6aa472805)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10cb6b0ebc32004b797556bfc171c96bbf16)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab4ac5343058eaf7d448a428d8c4b72c844)) - - - - - -# [1.0.0-alpha.3](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-base64-universal@0.1.0-preview.1...@aws-sdk/util-base64-universal@1.0.0-alpha.3) (2020-03-20) - - - -# 0.9.0 (2020-01-09) - - - -# 0.4.0 (2019-09-19) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed45fd5580ef9633da78f13aaa6aa472805)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10cb6b0ebc32004b797556bfc171c96bbf16)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab4ac5343058eaf7d448a428d8c4b72c844)) - - - - - -# [1.0.0-alpha.2](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-base64-universal@0.1.0-preview.1...@aws-sdk/util-base64-universal@1.0.0-alpha.2) (2020-01-09) - - - -# 0.4.0 (2019-09-19) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10c)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab)) - - - - - -# [1.0.0-alpha.1](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-base64-universal@0.1.0-preview.1...@aws-sdk/util-base64-universal@1.0.0-alpha.1) (2020-01-08) - - - -# 0.4.0 (2019-09-19) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10c)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab)) - - - - - -# [0.1.0-preview.4](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-base64-universal@0.1.0-preview.1...@aws-sdk/util-base64-universal@0.1.0-preview.4) (2019-09-19) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10c)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab)) - - - - - -# [0.1.0-preview.3](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-base64-universal@0.1.0-preview.1...@aws-sdk/util-base64-universal@0.1.0-preview.3) (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10c)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab)) - - - - - -# [0.1.0-preview.2](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-base64-universal@0.1.0-preview.1...@aws-sdk/util-base64-universal@0.1.0-preview.2) (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10c)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab)) diff --git a/packages/util-base64-universal/LICENSE b/packages/util-base64-universal/LICENSE deleted file mode 100644 index a23adae1f987..000000000000 --- a/packages/util-base64-universal/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/util-base64-universal/README.md b/packages/util-base64-universal/README.md deleted file mode 100644 index 774142caa569..000000000000 --- a/packages/util-base64-universal/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# @aws-sdk/util-base64-universal - -[![NPM version](https://img.shields.io/npm/v/@aws-sdk/util-base64-universal/beta.svg)](https://www.npmjs.com/package/@aws-sdk/util-base64-universal) -[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/util-base64-universal.svg)](https://www.npmjs.com/package/@aws-sdk/util-base64-universal) diff --git a/packages/util-base64-universal/jest.config.js b/packages/util-base64-universal/jest.config.js deleted file mode 100644 index 498ea8304467..000000000000 --- a/packages/util-base64-universal/jest.config.js +++ /dev/null @@ -1,5 +0,0 @@ -const base = require("../../jest.config.base.js"); - -module.exports = { - ...base -}; diff --git a/packages/util-base64-universal/package.json b/packages/util-base64-universal/package.json deleted file mode 100644 index 569a8e0661ea..000000000000 --- a/packages/util-base64-universal/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "@aws-sdk/util-base64-universal", - "version": "1.0.0-gamma.1", - "description": "A cross-platform Base64 <-> UInt8Array converter", - "main": "./build/index.js", - "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", - "test": "jest" - }, - "author": { - "name": "AWS SDK for JavaScript Team", - "url": "https://aws.amazon.com/javascript/" - }, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/is-node": "1.0.0-gamma.1", - "@aws-sdk/util-base64-browser": "1.0.0-gamma.1", - "@aws-sdk/util-base64-node": "1.0.0-gamma.1", - "tslib": "^1.8.0" - }, - "devDependencies": { - "@types/jest": "^25.1.4", - "@types/node": "^10.0.0", - "jest": "^25.1.0", - "typescript": "~3.8.3" - }, - "types": "./build/index.d.ts" -} diff --git a/packages/util-base64-universal/src/index.spec.ts b/packages/util-base64-universal/src/index.spec.ts deleted file mode 100644 index 5a61403c6d05..000000000000 --- a/packages/util-base64-universal/src/index.spec.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { fromBase64, toBase64 } from "./"; - -jest.mock("@aws-sdk/util-base64-browser", () => { - return { - fromBase64: jest.fn(), - toBase64: jest.fn() - }; -}); -import { - fromBase64 as browserFromBase64, - toBase64 as browserToBase64 -} from "@aws-sdk/util-base64-browser"; - -jest.mock("@aws-sdk/util-base64-node", () => { - return { - fromBase64: jest.fn(), - toBase64: jest.fn() - }; -}); -import { - fromBase64 as nodeFromBase64, - toBase64 as nodeToBase64 -} from "@aws-sdk/util-base64-node"; - -jest.mock("@aws-sdk/is-node", () => { - return { isNode: jest.fn() }; -}); -import { isNode } from "@aws-sdk/is-node"; - -beforeEach(() => { - (browserFromBase64 as any).mockReset(); - (browserToBase64 as any).mockReset(); - (nodeFromBase64 as any).mockReset(); - (nodeToBase64 as any).mockReset(); - (isNode as any).mockReset(); -}); - -describe("implementation selection", () => { - it("should use the node implementation in node", () => { - (isNode as any).mockReturnValue(true); - - fromBase64("foo"); - expect((nodeFromBase64 as any).mock.calls.length).toBe(1); - expect((browserFromBase64 as any).mock.calls.length).toBe(0); - - toBase64(new Uint8Array(0)); - expect((nodeToBase64 as any).mock.calls.length).toBe(1); - expect((browserToBase64 as any).mock.calls.length).toBe(0); - }); - - it("should use the browser implementation elsewhere", () => { - (isNode as any).mockReturnValue(false); - - fromBase64("foo"); - expect((nodeFromBase64 as any).mock.calls.length).toBe(0); - expect((browserFromBase64 as any).mock.calls.length).toBe(1); - - toBase64(new Uint8Array(0)); - expect((nodeToBase64 as any).mock.calls.length).toBe(0); - expect((browserToBase64 as any).mock.calls.length).toBe(1); - }); -}); diff --git a/packages/util-base64-universal/src/index.ts b/packages/util-base64-universal/src/index.ts deleted file mode 100644 index 3fc7975f0e41..000000000000 --- a/packages/util-base64-universal/src/index.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { isNode } from "@aws-sdk/is-node"; -import { - fromBase64 as browserFromBase64, - toBase64 as browserToBase64 -} from "@aws-sdk/util-base64-browser"; -import { - fromBase64 as nodeFromBase64, - toBase64 as nodeToBase64 -} from "@aws-sdk/util-base64-node"; - -/** - * Converts a base-64 encoded string to a Uint8Array of bytes. - * - * @param input The base-64 encoded string - */ -export function fromBase64(input: string): Uint8Array { - if (isNode()) { - return nodeFromBase64(input); - } - - return browserFromBase64(input); -} - -/** - * Converts a Uint8Array of binary data to a base-64 encoded string. - * - * @param input The binary data to encode - */ -export function toBase64(input: Uint8Array): string { - if (isNode()) { - return nodeToBase64(input); - } - - return browserToBase64(input); -} diff --git a/packages/util-base64-universal/tsconfig.json b/packages/util-base64-universal/tsconfig.json deleted file mode 100644 index afc8c8ab5dc2..000000000000 --- a/packages/util-base64-universal/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "sourceMap": true, - "strict": true, - "lib": ["es5", "es2015.collection"], - "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/util-base64-universal/tsconfig.test.json b/packages/util-base64-universal/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321f..000000000000 --- a/packages/util-base64-universal/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} From 8f4bb4a76855075bd4f6028f2e882fd87fddb647 Mon Sep 17 00:00:00 2001 From: Allan Zheng Date: Wed, 3 Jun 2020 17:51:14 -0700 Subject: [PATCH 2/3] feat: deprecate util-utf8-universal --- packages/eventstream-marshaller/package.json | 9 +- .../src/EventStreamMarshaller.spec.ts | 2 +- .../src/HeaderMarshaller.spec.ts | 2 +- packages/util-utf8-universal/.gitignore | 8 - packages/util-utf8-universal/.npmignore | 16 - packages/util-utf8-universal/CHANGELOG.md | 347 ------------------ packages/util-utf8-universal/LICENSE | 201 ---------- packages/util-utf8-universal/README.md | 4 - packages/util-utf8-universal/jest.config.js | 5 - packages/util-utf8-universal/package.json | 32 -- .../util-utf8-universal/src/index.spec.ts | 85 ----- packages/util-utf8-universal/src/index.ts | 25 -- packages/util-utf8-universal/tsconfig.json | 15 - .../util-utf8-universal/tsconfig.test.json | 11 - 14 files changed, 10 insertions(+), 752 deletions(-) delete mode 100644 packages/util-utf8-universal/.gitignore delete mode 100644 packages/util-utf8-universal/.npmignore delete mode 100644 packages/util-utf8-universal/CHANGELOG.md delete mode 100644 packages/util-utf8-universal/LICENSE delete mode 100644 packages/util-utf8-universal/README.md delete mode 100644 packages/util-utf8-universal/jest.config.js delete mode 100644 packages/util-utf8-universal/package.json delete mode 100644 packages/util-utf8-universal/src/index.spec.ts delete mode 100644 packages/util-utf8-universal/src/index.ts delete mode 100644 packages/util-utf8-universal/tsconfig.json delete mode 100644 packages/util-utf8-universal/tsconfig.test.json diff --git a/packages/eventstream-marshaller/package.json b/packages/eventstream-marshaller/package.json index e7a7b3b4934b..5cf2c64e7d5f 100644 --- a/packages/eventstream-marshaller/package.json +++ b/packages/eventstream-marshaller/package.json @@ -20,10 +20,17 @@ "tslib": "^1.8.0" }, "devDependencies": { - "@aws-sdk/util-utf8-universal": "1.0.0-gamma.1", + "@aws-sdk/util-utf8-browser": "1.0.0-gamma.1", + "@aws-sdk/util-utf8-node": "1.0.0-gamma.1", "@types/jest": "^25.1.4", "@types/node": "^10.0.0", "jest": "^25.1.0", "typescript": "~3.8.3" + }, + "browser": { + "@aws-sdk/util-utf8-node": "@aws-sdk/util-utf8-browser" + }, + "react-native": { + "@aws-sdk/util-utf8-node": "@aws-sdk/util-utf8-browser" } } diff --git a/packages/eventstream-marshaller/src/EventStreamMarshaller.spec.ts b/packages/eventstream-marshaller/src/EventStreamMarshaller.spec.ts index b93a11990c07..3d2cf5a3f0ce 100644 --- a/packages/eventstream-marshaller/src/EventStreamMarshaller.spec.ts +++ b/packages/eventstream-marshaller/src/EventStreamMarshaller.spec.ts @@ -1,6 +1,6 @@ import { EventStreamMarshaller } from "./EventStreamMarshaller"; import { vectors } from "./TestVectors.fixture"; -import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-universal"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node"; describe("eventstream parsing", () => { const marshaller = new EventStreamMarshaller(toUtf8, fromUtf8); diff --git a/packages/eventstream-marshaller/src/HeaderMarshaller.spec.ts b/packages/eventstream-marshaller/src/HeaderMarshaller.spec.ts index a76dfb37f884..d90464c33a6f 100644 --- a/packages/eventstream-marshaller/src/HeaderMarshaller.spec.ts +++ b/packages/eventstream-marshaller/src/HeaderMarshaller.spec.ts @@ -1,5 +1,5 @@ import { MessageHeaders } from "@aws-sdk/types"; -import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-universal"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node"; import { HeaderMarshaller } from "./HeaderMarshaller"; import { Int64 } from "./Int64"; diff --git a/packages/util-utf8-universal/.gitignore b/packages/util-utf8-universal/.gitignore deleted file mode 100644 index 3d1714c9806e..000000000000 --- a/packages/util-utf8-universal/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/node_modules/ -/build/ -/coverage/ -/docs/ -*.tsbuildinfo -*.tgz -*.log -package-lock.json diff --git a/packages/util-utf8-universal/.npmignore b/packages/util-utf8-universal/.npmignore deleted file mode 100644 index 9fc09eec2b85..000000000000 --- a/packages/util-utf8-universal/.npmignore +++ /dev/null @@ -1,16 +0,0 @@ -/src/ -/coverage/ -tsconfig.test.json -*.tsbuildinfo - -*.spec.js -*.spec.d.ts -*.spec.js.map - -*.mock.js -*.mock.d.ts -*.mock.js.map - -*.fixture.js -*.fixture.d.ts -*.fixture.js.map diff --git a/packages/util-utf8-universal/CHANGELOG.md b/packages/util-utf8-universal/CHANGELOG.md deleted file mode 100644 index 3bedfc3346c4..000000000000 --- a/packages/util-utf8-universal/CHANGELOG.md +++ /dev/null @@ -1,347 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [1.0.0-gamma.1](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-utf8-universal@0.1.0-preview.1...@aws-sdk/util-utf8-universal@1.0.0-gamma.1) (2020-05-21) - - -### Features - -* bump up to gamma version ([#1192](https://github.com/aws/aws-sdk-js-v3/issues/1192)) ([a609075](https://github.com/aws/aws-sdk-js-v3/commit/a6090754f2a6c21e5b70bf0c8782cc0fbe59ee12)) - - - -# 1.0.0-beta.2 (2020-03-28) - - - -# 1.0.0-beta.1 (2020-03-25) - - -### Features - -* bump packages to beta ([#1050](https://github.com/aws/aws-sdk-js-v3/issues/1050)) ([40501d4](https://github.com/aws/aws-sdk-js-v3/commit/40501d4394d04bc1bc91c10136fa48b1d3a67d8f)) - - - -# 1.0.0-alpha.28 (2020-03-20) - - - -# 0.9.0 (2020-01-09) - - - -# 0.4.0 (2019-09-19) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed45fd5580ef9633da78f13aaa6aa472805)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10cb6b0ebc32004b797556bfc171c96bbf16)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab4ac5343058eaf7d448a428d8c4b72c844)) - - - - - -# [1.0.0-beta.3](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-utf8-universal@0.1.0-preview.1...@aws-sdk/util-utf8-universal@1.0.0-beta.3) (2020-04-27) - - -### Features - -* use exact @aws-sdk/* dependencies ([#1110](https://github.com/aws/aws-sdk-js-v3/issues/1110)) ([bcfd7a2](https://github.com/aws/aws-sdk-js-v3/commit/bcfd7a2faeca3a2605057fd4736d710aa4902b62)) - - - -# 1.0.0-beta.2 (2020-03-28) - - - -# 1.0.0-beta.1 (2020-03-25) - - -### Features - -* bump packages to beta ([#1050](https://github.com/aws/aws-sdk-js-v3/issues/1050)) ([40501d4](https://github.com/aws/aws-sdk-js-v3/commit/40501d4394d04bc1bc91c10136fa48b1d3a67d8f)) - - - -# 1.0.0-alpha.28 (2020-03-20) - - - -# 0.9.0 (2020-01-09) - - - -# 0.4.0 (2019-09-19) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed45fd5580ef9633da78f13aaa6aa472805)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10cb6b0ebc32004b797556bfc171c96bbf16)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab4ac5343058eaf7d448a428d8c4b72c844)) - - - - - -# [1.0.0-beta.2](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-utf8-universal@0.1.0-preview.1...@aws-sdk/util-utf8-universal@1.0.0-beta.2) (2020-03-28) - - - -# 1.0.0-beta.1 (2020-03-25) - - -### Features - -* bump packages to beta ([#1050](https://github.com/aws/aws-sdk-js-v3/issues/1050)) ([40501d4](https://github.com/aws/aws-sdk-js-v3/commit/40501d4394d04bc1bc91c10136fa48b1d3a67d8f)) - - - -# 1.0.0-alpha.28 (2020-03-20) - - - -# 0.9.0 (2020-01-09) - - - -# 0.4.0 (2019-09-19) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed45fd5580ef9633da78f13aaa6aa472805)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10cb6b0ebc32004b797556bfc171c96bbf16)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab4ac5343058eaf7d448a428d8c4b72c844)) - - - - - -# [1.0.0-beta.1](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-utf8-universal@0.1.0-preview.1...@aws-sdk/util-utf8-universal@1.0.0-beta.1) (2020-03-25) - - -### Features - -* bump packages to beta ([#1050](https://github.com/aws/aws-sdk-js-v3/issues/1050)) ([40501d4](https://github.com/aws/aws-sdk-js-v3/commit/40501d4394d04bc1bc91c10136fa48b1d3a67d8f)) - - - -# 1.0.0-alpha.28 (2020-03-20) - - - -# 0.9.0 (2020-01-09) - - - -# 0.4.0 (2019-09-19) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed45fd5580ef9633da78f13aaa6aa472805)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10cb6b0ebc32004b797556bfc171c96bbf16)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab4ac5343058eaf7d448a428d8c4b72c844)) - - - - - -# [1.0.0-alpha.3](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-utf8-universal@0.1.0-preview.1...@aws-sdk/util-utf8-universal@1.0.0-alpha.3) (2020-03-20) - - - -# 0.9.0 (2020-01-09) - - - -# 0.4.0 (2019-09-19) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed45fd5580ef9633da78f13aaa6aa472805)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10cb6b0ebc32004b797556bfc171c96bbf16)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab4ac5343058eaf7d448a428d8c4b72c844)) - - - - - -# [1.0.0-alpha.2](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-utf8-universal@0.1.0-preview.1...@aws-sdk/util-utf8-universal@1.0.0-alpha.2) (2020-01-09) - - - -# 0.4.0 (2019-09-19) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10c)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab)) - - - - - -# [1.0.0-alpha.1](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-utf8-universal@0.1.0-preview.1...@aws-sdk/util-utf8-universal@1.0.0-alpha.1) (2020-01-08) - - - -# 0.4.0 (2019-09-19) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10c)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab)) - - - - - -# [0.1.0-preview.4](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-utf8-universal@0.1.0-preview.1...@aws-sdk/util-utf8-universal@0.1.0-preview.4) (2019-09-19) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10c)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab)) - - - - - -# [0.1.0-preview.3](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-utf8-universal@0.1.0-preview.1...@aws-sdk/util-utf8-universal@0.1.0-preview.3) (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10c)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab)) - - - - - -# [0.1.0-preview.2](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/util-utf8-universal@0.1.0-preview.1...@aws-sdk/util-utf8-universal@0.1.0-preview.2) (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10c)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab)) diff --git a/packages/util-utf8-universal/LICENSE b/packages/util-utf8-universal/LICENSE deleted file mode 100644 index a23adae1f987..000000000000 --- a/packages/util-utf8-universal/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/util-utf8-universal/README.md b/packages/util-utf8-universal/README.md deleted file mode 100644 index bff00a6371ff..000000000000 --- a/packages/util-utf8-universal/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# @aws-sdk/util-utf8-universal - -[![NPM version](https://img.shields.io/npm/v/@aws-sdk/util-utf8-universal/beta.svg)](https://www.npmjs.com/package/@aws-sdk/util-utf8-universal) -[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/util-utf8-universal.svg)](https://www.npmjs.com/package/@aws-sdk/util-utf8-universal) diff --git a/packages/util-utf8-universal/jest.config.js b/packages/util-utf8-universal/jest.config.js deleted file mode 100644 index 498ea8304467..000000000000 --- a/packages/util-utf8-universal/jest.config.js +++ /dev/null @@ -1,5 +0,0 @@ -const base = require("../../jest.config.base.js"); - -module.exports = { - ...base -}; diff --git a/packages/util-utf8-universal/package.json b/packages/util-utf8-universal/package.json deleted file mode 100644 index fb0c31fb2a1b..000000000000 --- a/packages/util-utf8-universal/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@aws-sdk/util-utf8-universal", - "version": "1.0.0-gamma.1", - "description": "A cross-platform UTF-8 string <-> UInt8Array converter", - "main": "./build/index.js", - "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", - "test": "jest" - }, - "author": { - "name": "AWS SDK for JavaScript Team", - "url": "https://aws.amazon.com/javascript/" - }, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/is-node": "1.0.0-gamma.1", - "@aws-sdk/util-utf8-browser": "1.0.0-gamma.1", - "@aws-sdk/util-utf8-node": "1.0.0-gamma.1", - "tslib": "^1.8.0" - }, - "browser": { - "@aws-sdk/util-utf8-node": false - }, - "devDependencies": { - "@types/jest": "^25.1.4", - "@types/node": "^10.0.0", - "jest": "^25.1.0", - "typescript": "~3.8.3" - }, - "types": "./build/index.d.ts" -} diff --git a/packages/util-utf8-universal/src/index.spec.ts b/packages/util-utf8-universal/src/index.spec.ts deleted file mode 100644 index 47e3d20fe7dd..000000000000 --- a/packages/util-utf8-universal/src/index.spec.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { fromUtf8, toUtf8 } from "./"; - -jest.mock("@aws-sdk/util-utf8-browser", () => { - return { - fromUtf8: jest.fn(), - toUtf8: jest.fn() - }; -}); -import { - fromUtf8 as browserFromUtf8, - toUtf8 as browserToUtf8 -} from "@aws-sdk/util-utf8-browser"; - -jest.mock("@aws-sdk/util-utf8-node", () => { - return { - fromUtf8: jest.fn(), - toUtf8: jest.fn() - }; -}); -import { - fromUtf8 as nodeFromUtf8, - toUtf8 as nodeToUtf8 -} from "@aws-sdk/util-utf8-node"; - -jest.mock("@aws-sdk/is-node", () => { - return { isNode: jest.fn() }; -}); -import { isNode } from "@aws-sdk/is-node"; - -beforeEach(() => { - (browserFromUtf8 as any).mockReset(); - (browserToUtf8 as any).mockReset(); - (nodeFromUtf8 as any).mockReset(); - (nodeToUtf8 as any).mockReset(); - (isNode as any).mockReset(); - - const textDecoderInstance = { - decode: jest.fn().mockReturnValue("") - }; - const textEncoderInstance = { - encode: jest.fn().mockReturnValue(new Uint8Array(0)) - }; - - (global as any).TextDecoder = jest - .fn() - .mockReturnValue(textDecoderInstance) as any; - (global as any).TextEncoder = jest - .fn() - .mockReturnValue(textEncoderInstance) as any; -}); - -interface TextDecoderCtor { - new (): any; -} -interface TextEncoderCtor { - new (): any; -} -declare const TextDecoder: TextDecoderCtor; -declare const TextEncoder: TextEncoderCtor; - -describe("implementation selection", () => { - it("should use the node implementation in node", () => { - (isNode as any).mockReturnValue(true); - - fromUtf8("foo"); - expect((nodeFromUtf8 as any).mock.calls.length).toBe(1); - expect((browserFromUtf8 as any).mock.calls.length).toBe(0); - - toUtf8(new Uint8Array(0)); - expect((nodeToUtf8 as any).mock.calls.length).toBe(1); - expect((browserToUtf8 as any).mock.calls.length).toBe(0); - }); - - it("should use the browser implementation elsewhere", () => { - (isNode as any).mockReturnValue(false); - - fromUtf8("foo"); - expect((nodeFromUtf8 as any).mock.calls.length).toBe(0); - expect((browserFromUtf8 as any).mock.calls.length).toBe(1); - - toUtf8(new Uint8Array(0)); - expect((nodeToUtf8 as any).mock.calls.length).toBe(0); - expect((browserToUtf8 as any).mock.calls.length).toBe(1); - }); -}); diff --git a/packages/util-utf8-universal/src/index.ts b/packages/util-utf8-universal/src/index.ts deleted file mode 100644 index b8daa61196ec..000000000000 --- a/packages/util-utf8-universal/src/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { isNode } from "@aws-sdk/is-node"; -import { - fromUtf8 as browserFromUtf8, - toUtf8 as browserToUtf8 -} from "@aws-sdk/util-utf8-browser"; -import { - fromUtf8 as nodeFromUtf8, - toUtf8 as nodeToUtf8 -} from "@aws-sdk/util-utf8-node"; - -export function fromUtf8(input: string): Uint8Array { - if (isNode()) { - return nodeFromUtf8(input); - } - - return browserFromUtf8(input); -} - -export function toUtf8(input: Uint8Array): string { - if (isNode()) { - return nodeToUtf8(input); - } - - return browserToUtf8(input); -} diff --git a/packages/util-utf8-universal/tsconfig.json b/packages/util-utf8-universal/tsconfig.json deleted file mode 100644 index 884089d76388..000000000000 --- a/packages/util-utf8-universal/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "sourceMap": true, - "strict": true, - "lib": ["dom", "es5", "es2015.collection"], - "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/util-utf8-universal/tsconfig.test.json b/packages/util-utf8-universal/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321f..000000000000 --- a/packages/util-utf8-universal/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -} From 9267e5ce86f0f41f7ddda54f5bb8aedcb75d907a Mon Sep 17 00:00:00 2001 From: Allan Zheng Date: Wed, 3 Jun 2020 17:52:29 -0700 Subject: [PATCH 3/3] feat: deprecate is-node --- packages/is-node/.gitignore | 8 - packages/is-node/.npmignore | 16 -- packages/is-node/CHANGELOG.md | 243 ---------------------------- packages/is-node/LICENSE | 201 ----------------------- packages/is-node/README.md | 4 - packages/is-node/jest.config.js | 5 - packages/is-node/package.json | 26 --- packages/is-node/src/index.spec.ts | 24 --- packages/is-node/src/index.ts | 7 - packages/is-node/tsconfig.json | 15 -- packages/is-node/tsconfig.test.json | 11 -- 11 files changed, 560 deletions(-) delete mode 100644 packages/is-node/.gitignore delete mode 100644 packages/is-node/.npmignore delete mode 100644 packages/is-node/CHANGELOG.md delete mode 100644 packages/is-node/LICENSE delete mode 100644 packages/is-node/README.md delete mode 100644 packages/is-node/jest.config.js delete mode 100644 packages/is-node/package.json delete mode 100644 packages/is-node/src/index.spec.ts delete mode 100644 packages/is-node/src/index.ts delete mode 100644 packages/is-node/tsconfig.json delete mode 100644 packages/is-node/tsconfig.test.json diff --git a/packages/is-node/.gitignore b/packages/is-node/.gitignore deleted file mode 100644 index 3d1714c9806e..000000000000 --- a/packages/is-node/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/node_modules/ -/build/ -/coverage/ -/docs/ -*.tsbuildinfo -*.tgz -*.log -package-lock.json diff --git a/packages/is-node/.npmignore b/packages/is-node/.npmignore deleted file mode 100644 index 9fc09eec2b85..000000000000 --- a/packages/is-node/.npmignore +++ /dev/null @@ -1,16 +0,0 @@ -/src/ -/coverage/ -tsconfig.test.json -*.tsbuildinfo - -*.spec.js -*.spec.d.ts -*.spec.js.map - -*.mock.js -*.mock.d.ts -*.mock.js.map - -*.fixture.js -*.fixture.d.ts -*.fixture.js.map diff --git a/packages/is-node/CHANGELOG.md b/packages/is-node/CHANGELOG.md deleted file mode 100644 index 0b29e1a10ea7..000000000000 --- a/packages/is-node/CHANGELOG.md +++ /dev/null @@ -1,243 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [1.0.0-gamma.1](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/is-node@0.1.0-preview.1...@aws-sdk/is-node@1.0.0-gamma.1) (2020-05-21) - - -### Features - -* bump up to gamma version ([#1192](https://github.com/aws/aws-sdk-js-v3/issues/1192)) ([a609075](https://github.com/aws/aws-sdk-js-v3/commit/a6090754f2a6c21e5b70bf0c8782cc0fbe59ee12)) - - - -# 1.0.0-beta.2 (2020-03-28) - - - -# 1.0.0-beta.1 (2020-03-25) - - -### Features - -* bump packages to beta ([#1050](https://github.com/aws/aws-sdk-js-v3/issues/1050)) ([40501d4](https://github.com/aws/aws-sdk-js-v3/commit/40501d4394d04bc1bc91c10136fa48b1d3a67d8f)) - - - -# 1.0.0-alpha.28 (2020-03-20) - - - -# 0.9.0 (2020-01-09) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed45fd5580ef9633da78f13aaa6aa472805)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10cb6b0ebc32004b797556bfc171c96bbf16)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab4ac5343058eaf7d448a428d8c4b72c844)) - - - - - -# [1.0.0-beta.2](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/is-node@0.1.0-preview.1...@aws-sdk/is-node@1.0.0-beta.2) (2020-03-28) - - - -# 1.0.0-beta.1 (2020-03-25) - - -### Features - -* bump packages to beta ([#1050](https://github.com/aws/aws-sdk-js-v3/issues/1050)) ([40501d4](https://github.com/aws/aws-sdk-js-v3/commit/40501d4394d04bc1bc91c10136fa48b1d3a67d8f)) - - - -# 1.0.0-alpha.28 (2020-03-20) - - - -# 0.9.0 (2020-01-09) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed45fd5580ef9633da78f13aaa6aa472805)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10cb6b0ebc32004b797556bfc171c96bbf16)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab4ac5343058eaf7d448a428d8c4b72c844)) - - - - - -# [1.0.0-beta.1](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/is-node@0.1.0-preview.1...@aws-sdk/is-node@1.0.0-beta.1) (2020-03-25) - - -### Features - -* bump packages to beta ([#1050](https://github.com/aws/aws-sdk-js-v3/issues/1050)) ([40501d4](https://github.com/aws/aws-sdk-js-v3/commit/40501d4394d04bc1bc91c10136fa48b1d3a67d8f)) - - - -# 1.0.0-alpha.28 (2020-03-20) - - - -# 0.9.0 (2020-01-09) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed45fd5580ef9633da78f13aaa6aa472805)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10cb6b0ebc32004b797556bfc171c96bbf16)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab4ac5343058eaf7d448a428d8c4b72c844)) - - - - - -# [1.0.0-alpha.3](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/is-node@0.1.0-preview.1...@aws-sdk/is-node@1.0.0-alpha.3) (2020-03-20) - - - -# 0.9.0 (2020-01-09) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed45fd5580ef9633da78f13aaa6aa472805)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10cb6b0ebc32004b797556bfc171c96bbf16)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab4ac5343058eaf7d448a428d8c4b72c844)) - - - - - -# [1.0.0-alpha.2](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/is-node@0.1.0-preview.1...@aws-sdk/is-node@1.0.0-alpha.2) (2020-01-09) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10c)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab)) - - - - - -# [1.0.0-alpha.1](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/is-node@0.1.0-preview.1...@aws-sdk/is-node@1.0.0-alpha.1) (2020-01-08) - - - -# 0.3.0 (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10c)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab)) - - - - - -# [0.1.0-preview.3](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/is-node@0.1.0-preview.1...@aws-sdk/is-node@0.1.0-preview.3) (2019-09-09) - - -### Features - -* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed)) - - - -# 0.2.0 (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10c)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab)) - - - - - -# [0.1.0-preview.2](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/is-node@0.1.0-preview.1...@aws-sdk/is-node@0.1.0-preview.2) (2019-07-12) - - -### Features - -* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10c)) -* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab)) diff --git a/packages/is-node/LICENSE b/packages/is-node/LICENSE deleted file mode 100644 index a23adae1f987..000000000000 --- a/packages/is-node/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/packages/is-node/README.md b/packages/is-node/README.md deleted file mode 100644 index d7a24d15628d..000000000000 --- a/packages/is-node/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# @aws-sdk/is-node - -[![NPM version](https://img.shields.io/npm/v/@aws-sdk/is-node/beta.svg)](https://www.npmjs.com/package/@aws-sdk/is-node) -[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/is-node.svg)](https://www.npmjs.com/package/@aws-sdk/is-node) diff --git a/packages/is-node/jest.config.js b/packages/is-node/jest.config.js deleted file mode 100644 index 498ea8304467..000000000000 --- a/packages/is-node/jest.config.js +++ /dev/null @@ -1,5 +0,0 @@ -const base = require("../../jest.config.base.js"); - -module.exports = { - ...base -}; diff --git a/packages/is-node/package.json b/packages/is-node/package.json deleted file mode 100644 index 24e3b62894dd..000000000000 --- a/packages/is-node/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@aws-sdk/is-node", - "version": "1.0.0-gamma.1", - "description": "Provides a function for detecting if the host environment is Node.JS", - "scripts": { - "prepublishOnly": "tsc", - "pretest": "tsc -p tsconfig.test.json", - "test": "jest" - }, - "author": { - "name": "AWS SDK for JavaScript Team", - "url": "https://aws.amazon.com/javascript/" - }, - "license": "Apache-2.0", - "main": "./build/index.js", - "devDependencies": { - "@types/jest": "^25.1.4", - "@types/node": "^10.0.0", - "jest": "^25.1.0", - "typescript": "~3.8.3" - }, - "types": "./build/index.d.ts", - "dependencies": { - "tslib": "^1.8.0" - } -} diff --git a/packages/is-node/src/index.spec.ts b/packages/is-node/src/index.spec.ts deleted file mode 100644 index 7d5b394148c2..000000000000 --- a/packages/is-node/src/index.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { isNode } from "./"; - -describe("isNode", () => { - const objToString = Object.prototype.toString; - - afterEach(() => { - Object.prototype.toString = objToString; - }); - - it("should return true when running in a Node.JS environment", () => { - Object.prototype.toString = () => "[object process]"; - expect(isNode()).toBe(true); - }); - - it("should return false when the global process object does not exist", () => { - const process = global.process; - try { - global.process = undefined as any; - expect(isNode()).toBe(false); - } finally { - global.process = process; - } - }); -}); diff --git a/packages/is-node/src/index.ts b/packages/is-node/src/index.ts deleted file mode 100644 index 1bb40c71461f..000000000000 --- a/packages/is-node/src/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function isNode(): boolean { - return ( - Object.prototype.toString.call( - typeof process !== "undefined" ? process : 0 - ) === "[object process]" - ); -} diff --git a/packages/is-node/tsconfig.json b/packages/is-node/tsconfig.json deleted file mode 100644 index 020683229eb0..000000000000 --- a/packages/is-node/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "declaration": true, - "strict": true, - "sourceMap": true, - "lib": ["es5", "es2015.collection"], - "rootDir": "./src", - "outDir": "./build", - "importHelpers": true, - "noEmitHelpers": true, - "incremental": true - } -} diff --git a/packages/is-node/tsconfig.test.json b/packages/is-node/tsconfig.test.json deleted file mode 100644 index 17d0f1b7321f..000000000000 --- a/packages/is-node/tsconfig.test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "inlineSourceMap": true, - "inlineSources": true, - "rootDir": "./src", - "outDir": "./build", - "incremental": true - } -}