Skip to content

Commit 272f2d8

Browse files
committed
Revert to 4.0.1 to back out of breaking AWS SDK upgrade
1 parent c721054 commit 272f2d8

File tree

4 files changed

+183
-1224
lines changed

4 files changed

+183
-1224
lines changed

CHANGELOG.md

-23
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,7 @@
11
# Changelog
22

3-
## 4.0.3 (2024-03-26)
4-
5-
#### :bug: Bug Fix
6-
* [#187](https://github.com/ember-cli-deploy/ember-cli-deploy-s3/pull/187) Fix setting of credentials via plugin config ([@owen-c](https://github.com/owen-c))
7-
8-
#### Committers: 1
9-
- Owen Cummings ([@owen-c](https://github.com/owen-c))
10-
11-
## 4.0.2 (2024-03-23)
12-
13-
#### :house: Internal
14-
* [#186](https://github.com/ember-cli-deploy/ember-cli-deploy-s3/pull/186) Update aws-sdk to v3 ([@gorner](https://github.com/gorner))
15-
16-
#### Committers: 1
17-
- Joshua Gorner ([@gorner](https://github.com/gorner))
18-
193
## 4.0.1 (2023-08-01)
204

21-
* Merge pull request #182 from ember-cli-deploy/dependabot/npm_and_yarn/word-wrap-1.2.5 (874872b)
22-
* Merge pull request #178 from ember-cli-deploy/dependabot/npm_and_yarn/semver-5.7.2 (641b9a8)
23-
* Bump word-wrap from 1.2.3 to 1.2.5 (0bf1938)
24-
* Merge pull request #181 from gorner/update-proxy-agent (6d756b6)
25-
* Update proxy-agent to v6.3.0 to remove vm2 dep (fba8777)
26-
* Bump semver from 5.3.0 to 5.7.2 (dcfebf6)
27-
285
## 4.0.0 (2023-06-04)
296

307
#### :boom: Breaking Change

lib/s3.js

+6-16
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,7 @@ var _ = require('lodash');
99
module.exports = CoreObject.extend({
1010
init: function(options) {
1111
this._super(options);
12-
13-
const {
14-
fromIni
15-
} = require('@aws-sdk/credential-providers');
16-
17-
const {
18-
S3
19-
} = require('@aws-sdk/client-s3');
20-
12+
var AWS = require('aws-sdk');
2113
var s3Options = {
2214
region: this.plugin.readConfig('region')
2315
};
@@ -46,10 +38,8 @@ module.exports = CoreObject.extend({
4638

4739
if (accessKeyId && secretAccessKey) {
4840
this.plugin.log('Using AWS access key id and secret access key from config', { verbose: true });
49-
s3Options.credentials = {
50-
accessKeyId: accessKeyId,
51-
secretAccessKey: secretAccessKey,
52-
};
41+
s3Options.accessKeyId = accessKeyId;
42+
s3Options.secretAccessKey = secretAccessKey;
5343
}
5444

5545
if (signatureVersion) {
@@ -64,15 +54,15 @@ module.exports = CoreObject.extend({
6454

6555
if (profile && !this.plugin.readConfig('s3Client')) {
6656
this.plugin.log('Using AWS profile from config', { verbose: true });
67-
s3Options.credentials = fromIni({ profile: profile });
57+
AWS.config.credentials = new AWS.SharedIniFileCredentials({ profile: profile });
6858
}
6959

7060
if (endpoint) {
7161
this.plugin.log('Using endpoint from config', { verbose: true });
72-
s3Options.endpoint = endpoint;
62+
s3Options.endpoint = new AWS.Endpoint(endpoint);
7363
}
7464

75-
this._client = this.plugin.readConfig('s3Client') || new S3(s3Options);
65+
this._client = this.plugin.readConfig('s3Client') || new AWS.S3(s3Options);
7666
},
7767

7868
upload: function(options) {

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ember-cli-deploy-s3",
3-
"version": "4.0.3",
3+
"version": "4.0.1",
44
"description": "An ember-cli-deploy plugin to upload to s3",
55
"keywords": [
66
"ember-addon",
@@ -18,8 +18,7 @@
1818
"test": "node tests/runner.js && ./node_modules/.bin/eslint index.js lib/* tests/**/*-test.js"
1919
},
2020
"dependencies": {
21-
"@aws-sdk/client-s3": "^3.525.0",
22-
"@aws-sdk/credential-providers": "^3.525.0",
21+
"aws-sdk": "^2.1354.0",
2322
"chalk": "^4.1.0",
2423
"core-object": "^3.1.5",
2524
"ember-cli-deploy-plugin": "^0.2.9",

0 commit comments

Comments
 (0)