kempo-media 0.3.3 → 0.3.4
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 +1 -1
- package/tests/helpers/preload.js +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kempo-media",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Media library extension for kempo — upload and manage images, video, audio, 3D models, and archives, stored in kempo-files with thumbnails from kempo-thumbs",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Dustin Poissant",
|
package/tests/helpers/preload.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/*
|
|
2
2
|
Loaded with `--import` by scripts/run-tests.js in the unit tier, before any test file.
|
|
3
3
|
|
|
4
|
-
The in-memory database is created on first import of
|
|
4
|
+
The in-memory database is created on first import of the database module. Creating it here, in a
|
|
5
5
|
clean process, keeps the run from depending on which suite imports it first or on globals a test
|
|
6
6
|
file has installed by then.
|
|
7
|
+
|
|
8
|
+
Only the main process gets it: the flag is removed from NODE_OPTIONS once loaded, so a test that
|
|
9
|
+
spawns child processes (`node --check` per module, for example) does not boot a database in each.
|
|
7
10
|
*/
|
|
8
11
|
if(process.env.KEMPO_DB === 'pglite'){
|
|
12
|
+
process.env.NODE_OPTIONS = (process.env.NODE_OPTIONS || '').replace(/--import=\S*preload\.js/, '').trim();
|
|
9
13
|
await import('kempo/server/db/index.js');
|
|
10
14
|
}
|