s3db.js 3.3.2 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,9 +1,25 @@
1
1
  {
2
2
  "name": "s3db.js",
3
- "version": "3.3.2",
3
+ "version": "4.0.1",
4
4
  "description": "Use AWS S3, the world's most reliable document storage, as a database with this ORM.",
5
- "main": "dist/s3db.es.js",
5
+ "main": "dist/s3db.cjs.js",
6
+ "module": "dist/s3db.es.js",
7
+ "browser": "dist/s3db.iife.js",
8
+ "types": "dist/s3db.d.ts",
9
+ "unpkg": "dist/s3db.iife.min.js",
10
+ "jsdelivr": "dist/s3db.iife.min.js",
6
11
  "type": "module",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/s3db.es.js",
15
+ "require": "./dist/s3db.cjs.js",
16
+ "browser": "./dist/s3db.iife.js",
17
+ "default": "./dist/s3db.es.js"
18
+ }
19
+ },
20
+ "files": [
21
+ "dist"
22
+ ],
7
23
  "author": "forattini-dev",
8
24
  "license": "UNLICENSED",
9
25
  "repository": {
@@ -20,39 +36,43 @@
20
36
  "database"
21
37
  ],
22
38
  "dependencies": {
23
- "@aws-sdk/client-s3": "^3.658.0",
39
+ "@aws-sdk/client-s3": "^3.837.0",
24
40
  "@supercharge/promise-pool": "^3.2.0",
25
41
  "avsc": "^5.7.7",
26
- "fastest-validator": "^1.19.0",
42
+ "fastest-validator": "^1.19.1",
27
43
  "flat": "^6.0.1",
44
+ "json-stable-stringify": "^1.3.0",
28
45
  "lodash-es": "^4.17.21",
29
- "nanoid": "5.0.7",
46
+ "nanoid": "5.1.5",
30
47
  "zlib": "^1.0.5"
31
48
  },
32
49
  "devDependencies": {
33
- "@babel/preset-env": "^7.25.4",
34
- "@jest/globals": "^29.7.0",
50
+ "@babel/preset-env": "^7.27.2",
51
+ "@jest/globals": "^30.0.3",
35
52
  "@rollup/plugin-babel": "^6.0.4",
36
- "@rollup/plugin-commonjs": "^28.0.0",
53
+ "@rollup/plugin-commonjs": "^28.0.6",
37
54
  "@rollup/plugin-json": "^6.1.0",
38
- "@rollup/plugin-node-resolve": "^15.3.0",
55
+ "@rollup/plugin-node-resolve": "^16.0.1",
39
56
  "@rollup/plugin-terser": "^0.4.4",
40
- "babel-jest": "^29.7.0",
41
- "cliui": "5",
57
+ "babel-jest": "^30.0.2",
58
+ "cliui": "^9.0.1",
42
59
  "coveralls": "^3.1.1",
43
- "dotenv": "^16.4.5",
44
- "esbuild": "^0.24.0",
60
+ "dotenv": "^16.6.1",
61
+ "esbuild": "^0.25.5",
45
62
  "fakerator": "^0.3.6",
46
- "jest": "^29.7.0",
63
+ "jest": "^30.0.3",
47
64
  "multi-progress": "^4.0.0",
48
65
  "progress": "^2.0.3",
49
- "rollup": "^4.22.4",
50
- "rollup-plugin-esbuild": "^6.1.1",
66
+ "rollup": "^4.44.1",
67
+ "rollup-plugin-esbuild": "^6.2.1",
51
68
  "rollup-plugin-polyfill-node": "^0.13.0"
52
69
  },
53
70
  "scripts": {
54
71
  "build": "rollup -c",
72
+ "clean-build": "node scripts/clean-build.js",
55
73
  "postbuild": "node scripts/prefix-files-istanbul-ignore.js",
74
+ "verify": "node scripts/verify-build.js",
75
+ "test-builds": "node examples/test-builds.js",
56
76
  "coverage": "coveralls < coverage/lcov.info",
57
77
  "coverage:serve": "npx http-server ./coverage/lcov-report",
58
78
  "test": "node --no-warnings --experimental-vm-modules node_modules/jest/bin/jest.js --coverage --detectOpenHandles",
package/UNLICENSE DELETED
@@ -1,24 +0,0 @@
1
- This is free and unencumbered software released into the public domain.
2
-
3
- Anyone is free to copy, modify, publish, use, compile, sell, or
4
- distribute this software, either in source code form or as a compiled
5
- binary, for any purpose, commercial or non-commercial, and by any
6
- means.
7
-
8
- In jurisdictions that recognize copyright laws, the author or authors
9
- of this software dedicate any and all copyright interest in the
10
- software to the public domain. We make this dedication for the benefit
11
- of the public at large and to the detriment of our heirs and
12
- successors. We intend this dedication to be an overt act of
13
- relinquishment in perpetuity of all present and future rights to this
14
- software under copyright law.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
- OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
- OTHER DEALINGS IN THE SOFTWARE.
23
-
24
- For more information, please refer to <https://unlicense.org>
@@ -1,18 +0,0 @@
1
- services:
2
-
3
- minio:
4
- image: bitnami/minio:latest
5
- volumes:
6
- - minio_data:/bitnami/minio/data
7
- ports:
8
- - "9000:9000"
9
- - "9001:9001"
10
- environment:
11
- MINIO_FORCE_NEW_KEYS: yes
12
- MINIO_SCHEME: http
13
- MINIO_DEFAULT_BUCKETS: s3db
14
- MINIO_ROOT_USER: s3db
15
- MINIO_ROOT_PASSWORD: thisissecret
16
-
17
- volumes:
18
- minio_data: {}
package/jest.config.js DELETED
@@ -1,22 +0,0 @@
1
- export default {
2
- verbose: true,
3
- testEnvironment: 'node',
4
-
5
- setupFiles: [
6
- '<rootDir>/tests/jest.setup.js'
7
- ],
8
-
9
- transform: {
10
- '^.+\\.js?$': 'babel-jest',
11
- },
12
-
13
- moduleNameMapper: {
14
- '^(\\.{1,2}/.*)\\.js$': '$1',
15
- },
16
-
17
- globals: {
18
- 'ts-jest': {
19
- useESM: true,
20
- },
21
- },
22
- };
package/rollup.config.js DELETED
@@ -1,77 +0,0 @@
1
- import json from '@rollup/plugin-json';
2
- import commonjs from '@rollup/plugin-commonjs';
3
- import resolve from '@rollup/plugin-node-resolve';
4
- import esbuild, { minify } from 'rollup-plugin-esbuild';
5
- import nodePolyfills from 'rollup-plugin-polyfill-node';
6
-
7
- export default {
8
- input: 'src/index.js',
9
-
10
- output: [
11
- {
12
- format: 'cjs',
13
- file: 'dist/s3db.cjs.js',
14
- inlineDynamicImports: true,
15
- plugins: [],
16
- },
17
- {
18
- format: 'cjs',
19
- file: 'dist/s3db.cjs.min.js',
20
- inlineDynamicImports: true,
21
- plugins: [
22
- minify(),
23
- ],
24
- },
25
- {
26
- format: 'iife',
27
- file: 'dist/s3db.iife.js',
28
- inlineDynamicImports: true,
29
- plugins: [],
30
- },
31
- {
32
- format: 'iife',
33
- file: 'dist/s3db.iife.min.js',
34
- inlineDynamicImports: true,
35
- plugins: [
36
- minify(),
37
- ],
38
- },
39
- {
40
- format: 'es',
41
- file: 'dist/s3db.es.js',
42
- inlineDynamicImports: true,
43
- plugins: [],
44
- },
45
- {
46
- format: 'es',
47
- file: 'dist/s3db.es.min.js',
48
- inlineDynamicImports: true,
49
- plugins: [
50
- minify(),
51
- ],
52
- },
53
- ],
54
-
55
- plugins: [
56
- commonjs(),
57
- resolve(),
58
- json(),
59
- nodePolyfills(),
60
-
61
- esbuild({
62
- sourceMap: true,
63
- target: 'esnext',
64
- })
65
- ],
66
-
67
- external: [
68
- 'crypto',
69
- '@aws-sdk/client-s3',
70
- '@supercharge/promise-pool',
71
- 'avsc',
72
- 'fastest-validator',
73
- 'flat',
74
- 'lodash-es',
75
- 'nanoid'
76
- ],
77
- };
@@ -1,18 +0,0 @@
1
- import fs from 'fs'
2
- import path from 'path'
3
-
4
- (function(){
5
- const dir = path.resolve(path.dirname(new URL(import.meta.url).pathname), '..', 'dist')
6
-
7
- const files = fs.readdirSync(dir);
8
- const jsFiles = files.filter(file => file.endsWith('.js'));
9
- console.info('dist files: ', jsFiles);
10
-
11
- jsFiles.forEach(file => {
12
- const filePath = path.resolve(dir, file);
13
- let content = fs.readFileSync(filePath, 'utf8');
14
- const ignoreFile = '/* istanbul ignore file */';
15
- content = ignoreFile + '\n' + content;
16
- fs.writeFileSync(filePath, content, 'utf8');
17
- });
18
- })()