Skip to content

Commit 04bf89d

Browse files
authored
Merge branch 'master' into feature/presigned-url
2 parents 0a4b80c + 8311af9 commit 04bf89d

File tree

15 files changed

+14923
-1551
lines changed

15 files changed

+14923
-1551
lines changed

.eslintrc.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
{
22
"root": true,
3-
"extends": "airbnb-base",
3+
"extends": "eslint:recommended",
44
"env": {
55
"node": true,
66
"es6": true
77
},
88
"parserOptions": {
9-
"ecmaVersion": 2018,
9+
"ecmaVersion": 8,
1010
"sourceType": "module"
1111
},
1212
"rules": {
13-
"indent": ["error", 2],
13+
"indent": ["error", 2, { "SwitchCase": 1 }],
1414
"linebreak-style": ["error", "unix"],
1515
"no-trailing-spaces": 2,
1616
"eol-last": 2,
1717
"space-in-parens": ["error", "never"],
1818
"no-multiple-empty-lines": 1,
19-
"no-underscore-dangle": 0,
20-
"no-new": 0,
21-
"prefer-destructuring": 0,
22-
"prefer-object-spread": 0
19+
"prefer-const": "error",
20+
"space-infix-ops": "error",
21+
"no-useless-escape": "off",
22+
"require-atomic-updates": "off"
2323
}
2424
}

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- '**'
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node: [ '14', '16', '18' ]
15+
timeout-minutes: 30
16+
env:
17+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Use Node.js
21+
uses: actions/setup-node@v2
22+
with:
23+
node-version: ${{ matrix.node }}
24+
- name: Cache Node.js modules
25+
uses: actions/cache@v2
26+
with:
27+
path: ~/.npm
28+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
29+
restore-keys: |
30+
${{ runner.os }}-node-
31+
- run: npm ci
32+
- run: npm run test
33+
- run: ./node_modules/.bin/codecov
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: release-automated
2+
on:
3+
push:
4+
branches: [ master, release, alpha, beta ]
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v2
11+
with:
12+
persist-credentials: false
13+
- name: Setup Node
14+
uses: actions/setup-node@v2
15+
with:
16+
node-version: 14
17+
- name: Cache Node.js modules
18+
uses: actions/cache@v2
19+
with:
20+
path: ~/.npm
21+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
22+
restore-keys: |
23+
${{ runner.os }}-node-
24+
- name: Install dependencies
25+
run: npm ci
26+
- name: Run semantic-release
27+
run: npx semantic-release
28+
env:
29+
GH_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.releaserc/commit.hbs

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
*{{#if scope}} **{{scope}}:**
2+
{{~/if}} {{#if subject}}
3+
{{~subject}}
4+
{{~else}}
5+
{{~header}}
6+
{{~/if}}
7+
8+
{{~!-- commit link --}} {{#if @root.linkReferences~}}
9+
([{{shortHash}}](
10+
{{~#if @root.repository}}
11+
{{~#if @root.host}}
12+
{{~@root.host}}/
13+
{{~/if}}
14+
{{~#if @root.owner}}
15+
{{~@root.owner}}/
16+
{{~/if}}
17+
{{~@root.repository}}
18+
{{~else}}
19+
{{~@root.repoUrl}}
20+
{{~/if}}/
21+
{{~@root.commit}}/{{hash}}))
22+
{{~else}}
23+
{{~shortHash}}
24+
{{~/if}}
25+
26+
{{~!-- commit references --}}
27+
{{~#if references~}}
28+
, closes
29+
{{~#each references}} {{#if @root.linkReferences~}}
30+
[
31+
{{~#if this.owner}}
32+
{{~this.owner}}/
33+
{{~/if}}
34+
{{~this.repository}}#{{this.issue}}](
35+
{{~#if @root.repository}}
36+
{{~#if @root.host}}
37+
{{~@root.host}}/
38+
{{~/if}}
39+
{{~#if this.repository}}
40+
{{~#if this.owner}}
41+
{{~this.owner}}/
42+
{{~/if}}
43+
{{~this.repository}}
44+
{{~else}}
45+
{{~#if @root.owner}}
46+
{{~@root.owner}}/
47+
{{~/if}}
48+
{{~@root.repository}}
49+
{{~/if}}
50+
{{~else}}
51+
{{~@root.repoUrl}}
52+
{{~/if}}/
53+
{{~@root.issue}}/{{this.issue}})
54+
{{~else}}
55+
{{~#if this.owner}}
56+
{{~this.owner}}/
57+
{{~/if}}
58+
{{~this.repository}}#{{this.issue}}
59+
{{~/if}}{{/each}}
60+
{{~/if}}
61+

.releaserc/footer.hbs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{#if noteGroups}}
2+
{{#each noteGroups}}
3+
4+
### {{title}}
5+
6+
{{#each notes}}
7+
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}} ([{{commit.shortHash}}]({{commit.shortHash}}))
8+
{{/each}}
9+
{{/each}}
10+
11+
{{/if}}

.releaserc/header.hbs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{{#if isPatch~}}
2+
##
3+
{{~else~}}
4+
#
5+
{{~/if}} {{#if @root.linkCompare~}}
6+
[{{version}}](
7+
{{~#if @root.repository~}}
8+
{{~#if @root.host}}
9+
{{~@root.host}}/
10+
{{~/if}}
11+
{{~#if @root.owner}}
12+
{{~@root.owner}}/
13+
{{~/if}}
14+
{{~@root.repository}}
15+
{{~else}}
16+
{{~@root.repoUrl}}
17+
{{~/if~}}
18+
/compare/{{previousTag}}...{{currentTag}})
19+
{{~else}}
20+
{{~version}}
21+
{{~/if}}
22+
{{~#if title}} "{{title}}"
23+
{{~/if}}
24+
{{~#if date}} ({{date}})
25+
{{/if}}

.releaserc/template.hbs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{> header}}
2+
3+
{{#each commitGroups}}
4+
5+
{{#if title}}
6+
### {{title}}
7+
8+
{{/if}}
9+
{{#each commits}}
10+
{{> commit root=@root}}
11+
{{/each}}
12+
{{/each}}
13+
14+
{{> footer}}

.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 60 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,75 @@
1-
# Change Log
1+
## [2.0.2](https://github.com/parse-community/parse-server-s3-adapter/compare/2.0.1...2.0.2) (2023-04-21)
22

3+
4+
### Bug Fixes
5+
6+
* Remove development dependencies from production ([#190](https://github.com/parse-community/parse-server-s3-adapter/issues/190)) ([73b17e4](https://github.com/parse-community/parse-server-s3-adapter/commit/73b17e40f124212020cf72e700976f8d3cbb22d5))
7+
8+
## [2.0.1](https://github.com/parse-community/parse-server-s3-adapter/compare/2.0.0...2.0.1) (2023-04-21)
9+
10+
11+
### Bug Fixes
12+
13+
* Security upgrade xml2js and aws-sdk ([#181](https://github.com/parse-community/parse-server-s3-adapter/issues/181)) ([66fad32](https://github.com/parse-community/parse-server-s3-adapter/commit/66fad32dd94b5280f29a12fbdf24d9427eb8c2eb))
14+
15+
# [2.0.0](https://github.com/parse-community/parse-server-s3-adapter/compare/1.6.3...2.0.0) (2023-04-21)
16+
17+
18+
### Features
19+
20+
* Add support for Node 16, 18, remove support for Node 12, 15 ([#189](https://github.com/parse-community/parse-server-s3-adapter/issues/189)) ([993534c](https://github.com/parse-community/parse-server-s3-adapter/commit/993534c57cc7009363a740bbbb04a0e4e56c7f0c))
21+
22+
23+
### BREAKING CHANGES
24+
25+
* Removes support for Node 12 and 15 which have reached their End-of-Life date and are not officially maintained anymore. ([993534c](993534c))
26+
27+
## [1.6.3](https://github.com/parse-community/parse-server-s3-adapter/compare/1.6.2...1.6.3) (2023-04-21)
28+
29+
30+
### Bug Fixes
31+
32+
* upgrade aws-sdk from 2.906.0 to 2.907.0 ([#166](https://github.com/parse-community/parse-server-s3-adapter/issues/166)) ([e224f0a](https://github.com/parse-community/parse-server-s3-adapter/commit/e224f0aa3388b03307e06700aa0dbe9251fae1a9))
33+
34+
## 1.6.2
35+
[Full Changelog](https://github.com/parse-community/parse-server-s3-adapter/compare/1.6.1...1.6.2)
36+
37+
### Breaking Changes
38+
none
39+
### Notable Changes
40+
none
41+
### Other Changes
42+
- Upgrade to AWS SDK 2.905.0 (Antonio Davi Macedo Coelho de Castro) [#163](https://github.com/parse-community/parse-server-s3-adapter/pull/163)
43+
___
44+
45+
## 1.6.1
46+
[Full Changelog](https://github.com/parse-community/parse-server-s3-adapter/compare/1.6.0...1.6.1)
47+
### Breaking Changes
48+
none
49+
### Notable Changes
50+
none
51+
### Other Changes
52+
- Upgraded to AWS SDK 2.879.0 (Manuel Trezza) [#132](https://github.com/parse-community/parse-server-s3-adapter/pull/132)
53+
___
354
## 1.6.0
455
[Full Changelog](https://github.com/parse-community/parse-server-s3-adapter/compare/1.5.0...1.6.0)
5-
- NEW: Support passing baseUrl param as a function [#106](https://github.com/parse-community/parse-server/pull/106). Thanks to [uzaysan](https://github.com/uzaysan)
56+
- NEW: Support passing baseUrl param as a function [#106](https://github.com/parse-community/parse-server-s3-adapter/pull/106). Thanks to [uzaysan](https://github.com/uzaysan)
657

758
## 1.5.0
859
[Full Changelog](https://github.com/parse-community/parse-server-s3-adapter/compare/1.4.0...1.5.0)
9-
- NEW: Add file ACL override parameter [#90](https://github.com/parse-community/parse-server/pull/90). Thanks to [Manuel](https://github.com/mtrezza)
10-
- NEW: Added support for metadata and tagging files [#83](https://github.com/parse-community/parse-server/pull/83). Thanks to [stevestencil](https://github.com/stevestencil)
60+
- NEW: Add file ACL override parameter [#90](https://github.com/parse-community/parse-server-s3-adapter/pull/90). Thanks to [Manuel](https://github.com/mtrezza)
61+
- NEW: Added support for metadata and tagging files [#83](https://github.com/parse-community/parse-server-s3-adapter/pull/83). Thanks to [stevestencil](https://github.com/stevestencil)
1162

1263
## 1.4.0
1364
[Full Changelog](https://github.com/parse-community/parse-server-s3-adapter/compare/1.3.0...1.4.0)
14-
- NEW: Support endpoint in S3Overrides [#79](https://github.com/parse-community/parse-server/pull/79). Thanks to [Kyle Barron](https://github.com/kylebarron)
15-
- NEW: Support filename validation and AWS directories [#76](https://github.com/parse-community/parse-server/pull/76). Thanks to [Mike Patnode](https://github.com/mpatnode)
65+
- NEW: Support endpoint in S3Overrides [#79](https://github.com/parse-community/parse-server-s3-adapter/pull/79). Thanks to [Kyle Barron](https://github.com/kylebarron)
66+
- NEW: Support filename validation and AWS directories [#76](https://github.com/parse-community/parse-server-s3-adapter/pull/76). Thanks to [Mike Patnode](https://github.com/mpatnode)
1667

1768
## 1.3.0
1869
[Full Changelog](https://github.com/parse-community/parse-server-s3-adapter/compare/1.2.3...1.3.0)
19-
- CHANGE: Conform to FilesAdapter Interface [#73](https://github.com/parse-community/parse-server/pull/73). Thanks to [Diamond Lewis](https://github.com/dplewis)
20-
- CHANGE: Add airbnb style guide to linter [#72](https://github.com/parse-community/parse-server/pull/72). Thanks to [Diamond Lewis](https://github.com/dplewis)
21-
- NEW: Support byte range requests [#71](https://github.com/parse-community/parse-server/pull/71). Thanks to [Diamond Lewis](https://github.com/dplewis)
70+
- CHANGE: Conform to FilesAdapter Interface [#73](https://github.com/parse-community/parse-server-s3-adapter/pull/73). Thanks to [Diamond Lewis](https://github.com/dplewis)
71+
- CHANGE: Add airbnb style guide to linter [#72](https://github.com/parse-community/parse-server-s3-adapter/pull/72). Thanks to [Diamond Lewis](https://github.com/dplewis)
72+
- NEW: Support byte range requests [#71](https://github.com/parse-community/parse-server-s3-adapter/pull/71). Thanks to [Diamond Lewis](https://github.com/dplewis)
2273

2374
## 1.2.3
2475
[Full Changelog](https://github.com/parse-community/parse-server-s3-adapter/compare/1.2.2...1.2.3)

README.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,36 @@
1-
# parse-server-s3-adapter
1+
# Parse Server S3 File Adapter <!-- omit in toc -->
22

3-
[![Known Vulnerabilities](https://snyk.io/test/github/parse-community/parse-server-s3-adapter/badge.svg?targetFile=package.json)](https://snyk.io/test/github/parse-community/parse-server-s3-adapter?targetFile=package.json)
4-
[![codecov.io](https://codecov.io/github/parse-community/parse-server-s3-adapter/coverage.svg?branch=master)](https://codecov.io/github/parse-community/parse-server-s3-adapter?branch=master)
5-
[![Build Status](https://travis-ci.org/parse-community/parse-server-s3-adapter.svg?branch=master)](https://travis-ci.org/parse-community/parse-server-s3-adapter)
3+
[![Build Status](https://github.com/parse-community/parse-server-s3-adapter/workflows/ci/badge.svg?branch=master)](https://github.com/parse-community/parse-server-s3-adapter/actions?query=workflow%3Aci+branch%3Amaster)
4+
[![Snyk Badge](https://snyk.io/test/github/parse-community/parse-server-s3-adapter/badge.svg)](https://snyk.io/test/github/parse-community/parse-server-s3-adapter)
5+
[![Coverage](https://img.shields.io/codecov/c/github/parse-community/parse-server-s3-adapter/master.svg)](https://codecov.io/github/parse-community/parse-server-s3-adapter?branch=master)
6+
[![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-server-s3-adapter/releases)
67

7-
parse-server adapter for AWS S3
8+
[![npm latest version](https://img.shields.io/npm/v/@parse/s3-files-adapter.svg)](https://www.npmjs.com/package/@parse/s3-files-adapter)
89

9-
# installation
10+
---
11+
12+
The official AWS S3 file storage adapter for Parse Server. See [Parse Server S3 File Adapter Configuration](https://docs.parseplatform.org/parse-server/guide/#configuring-s3adapter) for more details.
13+
14+
---
15+
16+
- [Installation](#installation)
17+
- [AWS Credentials](#aws-credentials)
18+
- [Deprecated Configuration](#deprecated-configuration)
19+
- [Usage with Parse Server](#usage-with-parse-server)
20+
- [Parameters](#parameters)
21+
- [Using a config file](#using-a-config-file)
22+
- [using environment variables](#using-environment-variables)
23+
- [passing as an instance](#passing-as-an-instance)
24+
- [Usage with Digital Ocean Spaces](#usage-with-digital-ocean-spaces)
25+
- [Adding Metadata and Tags](#adding-metadata-and-tags)
26+
27+
# Installation
1028

1129
`npm install --save @parse/s3-files-adapter`
1230

1331
# AWS Credentials
1432

15-
## Deprecation Notice -- AWS Credentials
16-
*the ability to explicitly pass credentials to this adapter is deprecated and will be removed in a future release.*
33+
⚠️ The ability to explicitly pass credentials to this adapter is deprecated and will be removed in a future release.
1734

1835
You may already be compatible with this change. If you have not explicitly set an `accessKey` and `secretKey` and you have configured the environment variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`, then you're all set and this will continue to work as is.
1936

@@ -39,6 +56,7 @@ For an AWS host:
3956
If for some reason you really need to be able to set the key and secret explicitly, you can still do it using `s3overrides` as described below and setting `accessKeyId` and `secretAccessKey` in the `s3Overrides` object.
4057

4158
# Deprecated Configuration
59+
4260
Although it is not recommended, AWS credentials can be explicitly configured through an options
4361
object, constructor string arguments or environment variables ([see below](#using-a-config-file)).
4462
This option is provided for backward compatibility and will be removed in the forthcoming version 2.0 of this adapter.

lib/optionsFromArguments.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
const DEFAULT_S3_REGION = 'us-east-1';
32

43
function requiredOrFromEnvironment(options, key, env) {

0 commit comments

Comments
 (0)