create-gasket-app 7.4.3 → 7.4.5
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/README.md +3 -3
- package/lib/scaffold/actions/load-preset.js +6 -2
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ To create a new app, you may choose one of the following methods:
|
|
|
9
9
|
### npx
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
npx create-gasket-app my-app
|
|
12
|
+
npx create-gasket-app@latest my-app
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
### npm
|
|
@@ -30,7 +30,7 @@ Use to create a new Gasket app.
|
|
|
30
30
|
|
|
31
31
|
```
|
|
32
32
|
Usage: choose one of the following methods
|
|
33
|
-
- npx create-gasket-app <appname> [options]
|
|
33
|
+
- npx create-gasket-app@latest <appname> [options]
|
|
34
34
|
- npm init gasket-app <appname> [options]
|
|
35
35
|
- yarn create gasket-app <appname> [options]
|
|
36
36
|
|
|
@@ -63,7 +63,7 @@ particular `create-gasket-app` run, you can set the
|
|
|
63
63
|
For example, to configure the registry for a `gasket create` run:
|
|
64
64
|
|
|
65
65
|
```
|
|
66
|
-
npm_config_registry=https://custom-registry.com npx create-gasket-app -p @gasket/nextjs
|
|
66
|
+
npm_config_registry=https://custom-registry.com npx create-gasket-app@latest -p @gasket/nextjs
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
#### Test Suites
|
|
@@ -4,6 +4,8 @@ import { withSpinner } from '../with-spinner.js';
|
|
|
4
4
|
import { PackageManager } from '@gasket/utils';
|
|
5
5
|
import { mkdtemp } from 'fs/promises';
|
|
6
6
|
import { createRequire } from 'module';
|
|
7
|
+
import { pathToFileURL } from 'url';
|
|
8
|
+
|
|
7
9
|
const require = createRequire(import.meta.url);
|
|
8
10
|
const hasVersionOrTag = /@([\^~]?\d+\.\d+\.\d+(?:-[\d\w.-]+)?|[\^~]?\d+\.\d+\.\d+|[a-zA-Z]+|file:.+)$/;
|
|
9
11
|
|
|
@@ -55,7 +57,8 @@ async function loadPresets({ context }) {
|
|
|
55
57
|
// We can't specify the cwd for the import, so we need to use the full path
|
|
56
58
|
// expects type:module & "main": "lib/fullpath.js"
|
|
57
59
|
const entryPath = pkgFile.main ?? pkgFile.exports['.'].import ?? pkgFile.exports['.'].default;
|
|
58
|
-
const
|
|
60
|
+
const fullPath = path.resolve(modPath, name, entryPath);
|
|
61
|
+
const mod = await import(pathToFileURL(fullPath).href);
|
|
59
62
|
return mod.default?.default || mod.default || mod;
|
|
60
63
|
} catch (err) {
|
|
61
64
|
const errorMessage = err.stderr || err.message;
|
|
@@ -72,7 +75,8 @@ async function loadPresets({ context }) {
|
|
|
72
75
|
await pkgManager.exec(pkgVerb, [localPresetPath]);
|
|
73
76
|
const pkgFile = require(path.join(localPresetPath, 'package.json'));
|
|
74
77
|
const entryPath = pkgFile.main ?? pkgFile.exports['.'].import ?? pkgFile.exports['.'].default;
|
|
75
|
-
const
|
|
78
|
+
const fullPath = path.resolve(modPath, pkgFile.name, entryPath);
|
|
79
|
+
const mod = await import(pathToFileURL(fullPath).href);
|
|
76
80
|
return mod.default?.default || mod.default || mod;
|
|
77
81
|
} catch (err) {
|
|
78
82
|
throw new Error(`Failed to install local preset ${localPresetPath}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-gasket-app",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.5",
|
|
4
4
|
"description": "starter pack for creating a gasket app",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -31,16 +31,16 @@
|
|
|
31
31
|
"mkdirp": "^1.0.4",
|
|
32
32
|
"ora": "^3.4.0",
|
|
33
33
|
"semver": "^7.7.1",
|
|
34
|
-
"@gasket/core": "7.5.
|
|
35
|
-
"@gasket/plugin-command": "7.4.
|
|
34
|
+
"@gasket/core": "7.5.1",
|
|
35
|
+
"@gasket/plugin-command": "7.4.1",
|
|
36
|
+
"@gasket/plugin-docs": "7.4.2",
|
|
36
37
|
"@gasket/plugin-docusaurus": "7.4.2",
|
|
37
38
|
"@gasket/plugin-dynamic-plugins": "7.3.7",
|
|
38
|
-
"@gasket/plugin-git": "7.4.
|
|
39
|
+
"@gasket/plugin-git": "7.4.1",
|
|
39
40
|
"@gasket/plugin-logger": "7.3.4",
|
|
40
|
-
"@gasket/plugin-metadata": "7.4.
|
|
41
|
-
"@gasket/request": "7.4.
|
|
42
|
-
"@gasket/utils": "7.4.
|
|
43
|
-
"@gasket/plugin-docs": "7.4.1"
|
|
41
|
+
"@gasket/plugin-metadata": "7.4.3",
|
|
42
|
+
"@gasket/request": "7.4.2",
|
|
43
|
+
"@gasket/utils": "7.4.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@jest/globals": "^29.7.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
57
57
|
"jest": "^29.7.0",
|
|
58
58
|
"typescript": "^5.8.2",
|
|
59
|
-
"@gasket/request": "7.4.
|
|
59
|
+
"@gasket/request": "7.4.2"
|
|
60
60
|
},
|
|
61
61
|
"eslintConfig": {
|
|
62
62
|
"extends": [
|