create-platformatic 0.39.0 → 0.40.0
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 +4 -4
- package/src/db/create-db.mjs +2 -1
- package/test/db/create-db.test.mjs +1 -0
- package/test/utils.test.mjs +10 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-platformatic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
4
4
|
"description": "Create platformatic-db interactive tool",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"semver": "^7.5.1",
|
|
35
35
|
"undici": "^5.22.1",
|
|
36
36
|
"which": "^3.0.1",
|
|
37
|
-
"@platformatic/config": "0.
|
|
37
|
+
"@platformatic/config": "0.40.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"ajv": "^8.12.0",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"tap": "^16.3.6",
|
|
48
48
|
"typescript": "~5.2.0",
|
|
49
49
|
"yaml": "^2.3.1",
|
|
50
|
-
"@platformatic/db": "0.
|
|
51
|
-
"@platformatic/service": "0.
|
|
50
|
+
"@platformatic/db": "0.40.0",
|
|
51
|
+
"@platformatic/service": "0.40.0"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"test": "standard | snazzy && cross-env NODE_OPTIONS=\"--loader=esmock --no-warnings\" c8 tap --no-coverage test/*test.mjs test/*/*test.mjs",
|
package/src/db/create-db.mjs
CHANGED
|
@@ -64,6 +64,7 @@ test('creates project with no typescript', async ({ equal }) => {
|
|
|
64
64
|
equal(server.hostname, '{PLT_SERVER_HOSTNAME}')
|
|
65
65
|
equal(server.port, '{PORT}')
|
|
66
66
|
equal(db.connectionString, '{DATABASE_URL}')
|
|
67
|
+
equal(db.schemalock, true)
|
|
67
68
|
|
|
68
69
|
const pathToDbEnvFile = join(tmpDir, '.env')
|
|
69
70
|
dotenv.config({ path: pathToDbEnvFile })
|
package/test/utils.test.mjs
CHANGED
|
@@ -6,7 +6,12 @@ import { join } from 'path'
|
|
|
6
6
|
import esmock from 'esmock'
|
|
7
7
|
import semver from 'semver'
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// esmock is broken on Node v20.6.0+
|
|
10
|
+
// Resolve once https://github.com/iambumblehead/esmock/issues/234 is fixed.
|
|
11
|
+
|
|
12
|
+
const skip = semver.gte(process.version, '20.6.0')
|
|
13
|
+
|
|
14
|
+
test('getUsername from git', { skip }, async ({ end, equal }) => {
|
|
10
15
|
const name = 'lukeskywalker'
|
|
11
16
|
const { getUsername } = await esmock.strict('../src/utils.mjs', {
|
|
12
17
|
execa: {
|
|
@@ -22,7 +27,7 @@ test('getUsername from git', async ({ end, equal }) => {
|
|
|
22
27
|
equal(username, name)
|
|
23
28
|
})
|
|
24
29
|
|
|
25
|
-
test('getUsername from whoami', async ({ end, equal }) => {
|
|
30
|
+
test('getUsername from whoami', { skip }, async ({ end, equal }) => {
|
|
26
31
|
const name = 'hansolo'
|
|
27
32
|
const { getUsername } = await esmock.strict('../src/utils.mjs', {
|
|
28
33
|
execa: {
|
|
@@ -38,7 +43,7 @@ test('getUsername from whoami', async ({ end, equal }) => {
|
|
|
38
43
|
equal(username, name)
|
|
39
44
|
})
|
|
40
45
|
|
|
41
|
-
test('if getUsername from git failed, it tries whoim', async ({ end, equal }) => {
|
|
46
|
+
test('if getUsername from git failed, it tries whoim', { skip }, async ({ end, equal }) => {
|
|
42
47
|
const name = 'lukeskywalker'
|
|
43
48
|
|
|
44
49
|
const { getUsername } = await esmock.strict('../src/utils.mjs', {
|
|
@@ -59,7 +64,7 @@ test('if getUsername from git failed, it tries whoim', async ({ end, equal }) =>
|
|
|
59
64
|
equal(username, name)
|
|
60
65
|
})
|
|
61
66
|
|
|
62
|
-
test('if both git usern.ame and whoami fail, no username is set', async ({ end, equal }) => {
|
|
67
|
+
test('if both git usern.ame and whoami fail, no username is set', { skip }, async ({ end, equal }) => {
|
|
63
68
|
const { getUsername } = await esmock.strict('../src/utils.mjs', {
|
|
64
69
|
execa: {
|
|
65
70
|
execa: (command) => {
|
|
@@ -77,7 +82,7 @@ test('if both git usern.ame and whoami fail, no username is set', async ({ end,
|
|
|
77
82
|
equal(username, null)
|
|
78
83
|
})
|
|
79
84
|
|
|
80
|
-
test('getUsername - no username found', async ({ end, equal }) => {
|
|
85
|
+
test('getUsername - no username found', { skip }, async ({ end, equal }) => {
|
|
81
86
|
const { getUsername } = await esmock.strict('../src/utils.mjs', {
|
|
82
87
|
execa: {
|
|
83
88
|
execa: (command) => {
|