beanbagdb 0.5.4 → 0.5.42

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,6 +1,6 @@
1
1
  {
2
2
  "name": "beanbagdb",
3
- "version": "0.5.4",
3
+ "version": "0.5.42",
4
4
  "description": "A JS library to introduce a schema layer to a No-SQL local database",
5
5
  "main": "dist/beanbagdb.esm.js",
6
6
  "module": "dist/beanbagdb.esm.js",
package/rollup.config.js CHANGED
@@ -3,6 +3,14 @@ import commonjs from '@rollup/plugin-commonjs';
3
3
  import json from '@rollup/plugin-json'; // JSON plugin to import package.json
4
4
  import replace from '@rollup/plugin-replace';
5
5
  import pkg from './package.json' assert { type: "json" }; // Import package.json directly
6
+ import terser from '@rollup/plugin-terser';
7
+
8
+ import { fileURLToPath } from 'url';
9
+ import { dirname } from 'path';
10
+
11
+ // Generate __dirname value for ES modules
12
+ const __filename = fileURLToPath(import.meta.url);
13
+ const __dirname = dirname(__filename);
6
14
 
7
15
  export default [
8
16
  // For Node.js (CommonJS and ESM)
@@ -41,7 +49,9 @@ export default [
41
49
  replace({
42
50
  preventAssignment: true,
43
51
  'process.env.PACKAGE_VERSION': JSON.stringify(pkg.version), // Inject version from package.json
44
- })
52
+ '__dirname': JSON.stringify(__dirname), // Replace __dirname with the correct value
53
+ }),
54
+ terser(),
45
55
  ],
46
56
  },
47
57
  ];
package/src/utils.js CHANGED
@@ -36,6 +36,3 @@ export async function getPackageVersion() {
36
36
  //}
37
37
  return pkg.version
38
38
  }
39
-
40
- // getPackageVersion().then(version => console.log('Package version:', version));
41
-