Skip to content

Commit b7debd1

Browse files
committed
feat: update cosmiconfig to 7.0.0
1 parent b0b5c3c commit b7debd1

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ Following these guidelines helps to communicate that you respect the time of the
1616

1717
3. Run `npm link` in the root `create-elm-app` folder to install local module globally.
1818

19+
## Running tests
20+
21+
You can run tests by running `$npm run test`.
22+
23+
If you run into failures while ugrading dependencies, running `$npm run app:build` will allow you to check the build faster.
24+
25+
_NOTE: Functional tests may take a while to run because they interact with your system_.
26+
27+
1928
## Submitting a Pull Request
2029

2130
When you have a local copy of the project up and running, create a new branch with a name, such as `patch-1`

config/paths.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
const path = require('path');
44
const fs = require('fs');
55
const url = require('url');
6-
const cosmiconfig = require('cosmiconfig');
6+
const { cosmiconfigSync } = require('cosmiconfig');
77

88
// Make sure any symlinks in the project folder are resolved:
99
// https://github.com/facebookincubator/create-react-app/issues/637
1010
const appDirectory = fs.realpathSync(process.cwd());
11-
const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
11+
const resolveApp = (relativePath) => path.resolve(appDirectory, relativePath);
1212

1313
// We look for configration in files supported by cosmiconfig by default:
1414
// https://github.com/davidtheclark/cosmiconfig
15-
const explorer = cosmiconfig('elmapp');
16-
const result = explorer.searchSync(appDirectory);
15+
const explorerSync = cosmiconfigSync('elmapp');
16+
const result = explorerSync.search(appDirectory);
1717
const config = result ? result.config : loadElmJson();
18-
const id = x => x;
18+
const id = (x) => x;
1919
const configureWebpack =
2020
typeof config.configureWebpack === 'function' ? config.configureWebpack : id;
2121

@@ -46,7 +46,7 @@ function ensureSlash(path, needsSlash) {
4646
return path;
4747
}
4848

49-
const getPublicUrl = appConfig => {
49+
const getPublicUrl = (appConfig) => {
5050
if (envPublicUrl) {
5151
return envPublicUrl;
5252
}
@@ -81,5 +81,5 @@ module.exports = {
8181
servedPath: getServedPath(config),
8282
proxy: config.proxy,
8383
setupProxy: config.setupProxy,
84-
configureWebpack
84+
configureWebpack,
8585
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"cli-table": "0.3.1",
3232
"connect-history-api-fallback": "1.6.0",
3333
"copy-webpack-plugin": "5.1.2",
34-
"cosmiconfig": "5.2.1",
34+
"cosmiconfig": "7.0.0",
3535
"cross-spawn": "7.0.3",
3636
"css-loader": "4.3.0",
3737
"dotenv": "8.2.0",

tests/elm-app.eject.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ describe('Ejecting Elm application. (Please wait...)', function () {
8080
.map((out) => (out !== null ? out.toString() : ''))
8181
.join('');
8282

83-
console.log(outputString);
8483
expect(status, 'to be', 0);
8584
expect(outputString, 'to contain', 'Compiled successfully');
8685
}).timeout(5 * 60 * 1000);

0 commit comments

Comments
 (0)