From 6204acfd5c6e43f794be547ec268c0afefa36662 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Fri, 16 Oct 2020 13:43:35 +0200 Subject: [PATCH] chore: Use better-sqlite3 for dev --- packages/core/package.json | 1 + packages/dev-server/dev-config.ts | 2 +- yarn.lock | 33 ++++++++++++++++++++++++++++++- 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index ee47672ca3..17398a9751 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -91,6 +91,7 @@ "@types/node": "^10.12.18", "@types/progress": "^2.0.3", "@types/prompts": "^2.0.9", + "better-sqlite3": "^7.1.1", "gulp": "^4.0.2", "mysql": "^2.18.1", "pg": "^8.4.0", diff --git a/packages/dev-server/dev-config.ts b/packages/dev-server/dev-config.ts index d6c1941640..784855ad50 100644 --- a/packages/dev-server/dev-config.ts +++ b/packages/dev-server/dev-config.ts @@ -103,7 +103,7 @@ function getDbConfig(): ConnectionOptions { console.log('Using sqlite connection'); return { synchronize: false, - type: 'sqlite', + type: 'better-sqlite3', database: path.join(__dirname, 'vendure.sqlite'), }; case 'sqljs': diff --git a/yarn.lock b/yarn.lock index 6b0963ce6b..67b312c3f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5404,6 +5404,15 @@ better-assert@~1.0.0: dependencies: callsite "1.0.0" +better-sqlite3@^7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-7.1.1.tgz#107457a8b770cfb16be646e347c17b42bc204dd3" + integrity sha512-AkvGGyhAVZhRBOul2WT+5CB2EuveM3ZkebEKe1wxMqDZUy1XB/1RBgM66t0ybHC4DIni8+pr7NaLqEX87NUTwg== + dependencies: + bindings "^1.5.0" + prebuild-install "^5.3.3" + tar "4.4.10" + big.js@^5.2.2: version "5.2.2" resolved "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" @@ -13548,7 +13557,7 @@ npm-package-arg@8.0.1, npm-package-arg@^8.0.0: semver "^5.6.0" validate-npm-package-name "^3.0.0" -npm-packlist@1.1.12, npm-packlist@^1.1.12, npm-packlist@^1.1.6, npm-packlist@^1.4.4: +npm-packlist@^1.1.12, npm-packlist@^1.1.6: version "1.1.12" resolved "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.12.tgz#22bde2ebc12e72ca482abd67afc51eb49377243a" integrity sha512-WJKFOVMeAlsU/pjXuqVdzU0WfgtIBCupkEVwn+1Y0ERAbUfWw8R4GjgVbaKnUjRoD2FoQbHOCbOyT5Mbs9Lw4g== @@ -13556,6 +13565,15 @@ npm-packlist@1.1.12, npm-packlist@^1.1.12, npm-packlist@^1.1.6, npm-packlist@^1. ignore-walk "^3.0.1" npm-bundled "^1.0.1" +npm-packlist@^1.4.4: + version "1.4.8" + resolved "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" + integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + npm-normalize-package-bin "^1.0.1" + npm-pick-manifest@6.1.0: version "6.1.0" resolved "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-6.1.0.tgz#2befed87b0fce956790f62d32afb56d7539c022a" @@ -17369,6 +17387,19 @@ tar-stream@^2.0.0: inherits "^2.0.3" readable-stream "^3.1.1" +tar@4.4.10: + version "4.4.10" + resolved "https://registry.npmjs.org/tar/-/tar-4.4.10.tgz#946b2810b9a5e0b26140cf78bea6b0b0d689eba1" + integrity sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA== + dependencies: + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.3.5" + minizlib "^1.2.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.3" + tar@^2.0.0: version "2.2.2" resolved "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz#0ca8848562c7299b8b446ff6a4d60cdbb23edc40"