Skip to content

Commit

Permalink
chore: update dependencies (#54)
Browse files Browse the repository at this point in the history
* Update pipeline.yml

* Delete .babelrc

* Update dependencies

* Move signUpload

* Upgrade upload

* Upgrade download

* Rewire provider

* Update docs

* Upgrade build and linting rules, version bump

* Migrate client

* Migrate s3up-react

* Lint client

* Remove trash, expand pipeline for parallelism

* Update pipeline.yml

* Update pipeline.yml

* Update deps

* Update package.json

* Update package.json

* Publish react
  • Loading branch information
Lepozepo authored Oct 14, 2023
1 parent f4b43d9 commit ae49e0d
Show file tree
Hide file tree
Showing 37 changed files with 11,922 additions and 14,516 deletions.
7 changes: 0 additions & 7 deletions .babelrc

This file was deleted.

19 changes: 12 additions & 7 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
name: Sonic
name: sonic

on: [push]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
service: [client, react, server]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3

- name: Use Node 10
uses: actions/setup-node@v1
- name: node 18
uses: actions/setup-node@v3
with:
node-version: '10.x'
node-version: 18

- name: Dependencies Cache
uses: actions/cache@v1
- name: dependencies cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: node-modules-${{hashFiles('**/package-lock.json')}}
restore-keys: |
node-modules-
- name: install
working-directory: './packages/${{matrix.service}}'
run: npm i

- name: test
working-directory: './packages/${{matrix.service}}'
run: npm run test
env:
CI: true
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ Setting this will allow your website to POST data to the bucket. If you want to

`S3Up.download(args)`: For downloading files in s3 to your server
- `args.to` (required): Location of file, does not check whether the directory exists, you'll need to take care of this yourself.
- `args.from.Key` (required): Key (ex: 'directory/thing.txt') of the S3 file
- `args.from.Range`: Portion of the file to get (generally not used) (ex: 'bytes=0-9').
- `args.from.key` (required): Key (ex: 'directory/thing.txt') of the S3 file

`S3Up.upload(args)`: For uploading files stored in your server to s3
- `args.Body` (required): The file you're uploading (buffer, blob, or stream)
- `args.Key` (required): The location of the file you're uploading
- `args.body` (required): The file you're uploading (buffer, blob, or stream)
- `args.key` (required): The location of the file you're uploading
- `args.onProgress`: A function called when upload progress is made

## API Client
`uploadFile(file, args)`: For uploading a single file
Expand Down
4 changes: 2 additions & 2 deletions examples/meteor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@babel/runtime": "^7.11.2",
"babel-runtime": "^6.18.0",
"meteor-node-stubs": "~0.2.0",
"s3up-client": "file:../../packages/client/pkg",
"s3up-server": "file:../../packages/server/pkg"
"s3up-client": "file:../../packages/client",
"s3up-server": "file:../../packages/server"
}
}
5 changes: 0 additions & 5 deletions package-lock.json

This file was deleted.

22 changes: 0 additions & 22 deletions package.json

This file was deleted.

7 changes: 0 additions & 7 deletions packages/client/.babelrc

This file was deleted.

64 changes: 61 additions & 3 deletions packages/client/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,69 @@
const prettierConfig = require('./.prettierrc');

module.exports = {
extends: ['airbnb'],
extends: ['airbnb-base', 'plugin:prettier/recommended'],
rules: {
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'unknown', 'parent', 'sibling', 'index', 'object', 'type'],
pathGroups: [
{
pattern: '~/**',
group: 'internal',
},
{
pattern: '../**',
group: 'parent',
position: 'before',
},
{
pattern: './**',
group: 'sibling',
position: 'after',
},
],
'newlines-between': 'never',
pathGroupsExcludedImportTypes: ['builtin'],
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
'import/no-anonymous-default-export': 0,
'import/no-import-module-exports': 0,
'import/prefer-default-export': 0,
'no-import-assign': 0,
'no-underscore-dangle': 0,
'prefer-regex-literals': 0,
'class-methods-use-this': 0,
'default-param-last': 0,
'max-len': [
'error',
prettierConfig.printWidth,
2,
{
ignoreUrls: true,
ignoreComments: true,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
},
],
},
settings: {
'import/resolver': {
alias: {
map: [['~', './src']],
extensions: ['.js', '.jsx', '.json'],
},
},
},
parserOptions: {
ecmaVersion: 2020,
},
parser: 'babel-eslint',
env: {
node: true,
browser: true,
},
};
1 change: 1 addition & 0 deletions packages/client/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pkg
node_modules
.DS_Store
dist
5 changes: 5 additions & 0 deletions packages/client/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
printWidth: 120,
singleQuote: true,
trailingComma: 'all',
};
35 changes: 35 additions & 0 deletions packages/client/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"module": {
"type": "commonjs"
},
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": true,
"dynamicImport": true,
"privateMethod": false,
"functionBind": false,
"exportDefaultFrom": true,
"exportNamespaceFrom": false,
"decorators": false,
"decoratorsBeforeExport": false,
"topLevelAwait": false,
"importMeta": false
},
"target": "es2015",
"loose": false,
"externalHelpers": true,
"keepClassNames": false,
"transform": {
"react": {
"runtime": "automatic"
}
},
"paths": {
"~/*": ["./*"]
},
"baseUrl": "src"
},
"minify": false
}
Loading

0 comments on commit ae49e0d

Please sign in to comment.