@atlaspack/create-react-app 2.14.2-unified-f165f7d09.0 → 2.14.3-dev-inline-requires-reuse-bdc9ca9c3.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/lib/cli.js +18 -1
- package/package.json +7 -6
- package/templates/package.json +2 -1
- package/templates/tsconfig.json +4 -0
package/lib/cli.js
CHANGED
|
@@ -83,8 +83,16 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
83
83
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
84
84
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
85
85
|
// flowlint-next-line untyped-import:off
|
|
86
|
+
|
|
86
87
|
// flowlint-next-line untyped-import:off
|
|
88
|
+
|
|
89
|
+
// @ts-expect-error TS7016
|
|
90
|
+
|
|
91
|
+
// @ts-expect-error TS7016
|
|
92
|
+
|
|
87
93
|
// flowlint-next-line untyped-import:off
|
|
94
|
+
// @ts-expect-error TS7016
|
|
95
|
+
// @ts-expect-error TS7016
|
|
88
96
|
const TEMPLATES_DIR = _path().default.resolve(__dirname, '../templates');
|
|
89
97
|
const ncp = (0, _util().promisify)(_ncp2().default);
|
|
90
98
|
// eslint-disable-next-line no-console
|
|
@@ -105,12 +113,15 @@ async function run(packagePath) {
|
|
|
105
113
|
try {
|
|
106
114
|
await createApp(_path().default.basename(packagePath), tempPath);
|
|
107
115
|
} catch (e) {
|
|
116
|
+
// @ts-expect-error TS2349
|
|
108
117
|
await (0, _rimraf().default)(tempPath);
|
|
109
118
|
throw e;
|
|
110
119
|
}
|
|
111
120
|
await _fs().default.promises.rename(tempPath, packagePath);
|
|
112
121
|
log((0, _chalk().default)`{green ${emoji.success} Successfully created a new Parcel app at {bold.underline ${packagePath}}.}`);
|
|
113
|
-
log((0, _chalk().default)`${emoji.info} {dim Run} {bold cd ${packagePath}} {dim and then} {bold ${
|
|
122
|
+
log((0, _chalk().default)`${emoji.info} {dim Run} {bold cd ${packagePath}} {dim and then} {bold ${
|
|
123
|
+
// @ts-expect-error TS7005
|
|
124
|
+
usesYarn ? 'yarn' : 'npm run'} start} {dim to start developing with Parcel.}`);
|
|
114
125
|
}
|
|
115
126
|
async function createApp(packageName, tempPath) {
|
|
116
127
|
log(emoji.progress, 'Creating package directory...');
|
|
@@ -147,15 +158,21 @@ async function fsExists(filePath) {
|
|
|
147
158
|
return false;
|
|
148
159
|
}
|
|
149
160
|
}
|
|
161
|
+
|
|
162
|
+
// @ts-expect-error TS7034
|
|
150
163
|
let usesYarn;
|
|
151
164
|
async function installPackages(packageExpressions, opts) {
|
|
152
165
|
log(emoji.progress, (0, _chalk().default)`{dim Installing}`, _chalk().default.bold(...packageExpressions));
|
|
166
|
+
|
|
167
|
+
// @ts-expect-error TS7005
|
|
153
168
|
if (usesYarn == null) {
|
|
154
169
|
usesYarn = await (0, _commandExists().default)('yarn');
|
|
155
170
|
if (!usesYarn && !(await (0, _commandExists().default)('npm'))) {
|
|
156
171
|
throw new Error('Neither npm nor yarn found on system');
|
|
157
172
|
}
|
|
158
173
|
}
|
|
174
|
+
|
|
175
|
+
// @ts-expect-error TS7005
|
|
159
176
|
if (usesYarn) {
|
|
160
177
|
return spawn('yarn', ['add', opts.isDevDependency ? '--dev' : null, ...packageExpressions].filter(Boolean), opts.cwd);
|
|
161
178
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/create-react-app",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.3-dev-inline-requires-reuse-bdc9ca9c3.0",
|
|
4
4
|
"bin": {
|
|
5
5
|
"atlaspack-create-react-app": "lib/bin.js"
|
|
6
6
|
},
|
|
@@ -10,15 +10,16 @@
|
|
|
10
10
|
"url": "https://github.com/atlassian-labs/atlaspack.git",
|
|
11
11
|
"directory": "packages/utils/create-react-app"
|
|
12
12
|
},
|
|
13
|
-
"source": "src/bin.
|
|
13
|
+
"source": "./src/bin.ts",
|
|
14
|
+
"types": "./lib/types/bin.d.ts",
|
|
14
15
|
"files": [
|
|
15
16
|
"templates",
|
|
16
17
|
"lib",
|
|
17
18
|
"bin"
|
|
18
19
|
],
|
|
19
20
|
"scripts": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
21
|
+
"dev:prepare": "rimraf ./lib/ && mkdir -p lib && cp ./bin/dev-bin.js ./lib/bin.js",
|
|
22
|
+
"build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
|
|
22
23
|
},
|
|
23
24
|
"license": "(MIT OR Apache-2.0)",
|
|
24
25
|
"publishConfig": {
|
|
@@ -36,10 +37,10 @@
|
|
|
36
37
|
"v8-compile-cache": "^2.0.0"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
|
-
"@atlaspack/babel-register": "2.14.
|
|
40
|
+
"@atlaspack/babel-register": "2.14.3-dev-inline-requires-reuse-bdc9ca9c3.0",
|
|
40
41
|
"@babel/core": "^7.22.11",
|
|
41
42
|
"rimraf": "^5.0.5"
|
|
42
43
|
},
|
|
43
44
|
"type": "commonjs",
|
|
44
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "bdc9ca9c38f45155a6d6f280e343a29e3f030a83"
|
|
45
46
|
}
|
package/templates/package.json
CHANGED