Skip to content

Commit ff84f7a

Browse files
committed
Upgrade all dependencies
1 parent 1cec297 commit ff84f7a

File tree

7 files changed

+899
-1145
lines changed

7 files changed

+899
-1145
lines changed

api/get-insights.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const chalk = require('chalk');
1+
import chalk from 'chalk';
22

3-
const { info, separator, asyncForEach } = require('./helpers.js');
3+
import { info, separator, asyncForEach } from './helpers.js';
44

55
const getInsights = (client, repos) =>
66
new Promise(async resolve => {
@@ -94,7 +94,4 @@ const getInsightsFromClient = (client, repos) =>
9494
resolve(insights);
9595
});
9696

97-
module.exports = {
98-
getInsights,
99-
getInsightsFromClient
100-
};
97+
export { getInsights, getInsightsFromClient };

api/helpers.js

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const ora = require('ora');
2-
const chalk = require('chalk');
3-
const fetch = require('node-fetch');
4-
const { GitHubClient } = require('universal-github-client');
1+
import ora from 'ora';
2+
import chalk from 'chalk';
3+
import fetch from 'node-fetch';
4+
import { GitHubClient } from 'universal-github-client';
55

66
const getClient = token =>
77
new GitHubClient({
@@ -52,13 +52,4 @@ const getReposNames = repos =>
5252
.map(repo => repo.full_name)
5353
.filter(Boolean);
5454

55-
module.exports = {
56-
info,
57-
error,
58-
empty,
59-
getRepos,
60-
getClient,
61-
separator,
62-
asyncForEach,
63-
getReposNames
64-
};
55+
export { info, error, empty, getRepos, getClient, separator, asyncForEach, getReposNames };

api/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
const { writeFileSync } = require('fs');
1+
import { writeFileSync } from 'fs';
22

3-
const chalk = require('chalk');
4-
const yargs = require('yargs');
5-
const dotenv = require('dotenv');
3+
import chalk from 'chalk';
4+
import yargs from 'yargs';
5+
import dotenv from 'dotenv';
66

7-
const { getInsights } = require('./get-insights.js');
8-
const { info, error, empty, getClient, getRepos, getReposNames } = require('./helpers.js');
7+
import { getInsights } from './get-insights.js';
8+
import { info, error, empty, getClient, getRepos, getReposNames } from './helpers.js';
99

1010
dotenv.config();
1111

api/insights.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const express = require('express');
1+
import express from 'express';
22

3-
const { getClient } = require('./helpers');
4-
const { getInsightsFromClient } = require('./get-insights');
3+
import { getClient } from './helpers.js';
4+
import { getInsightsFromClient } from './get-insights.js';
55

66
const app = express();
77

app/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'scriptex-socials';
22
import React from 'react';
3-
import ReactDOM from 'react-dom';
3+
import { createRoot } from 'react-dom/client';
44
import styled, { createGlobalStyle } from 'styled-components';
55

66
import { Form } from './form';
@@ -111,4 +111,6 @@ const App = () => {
111111
);
112112
};
113113

114-
ReactDOM.render(<App />, document.getElementById('app'));
114+
const root = createRoot(document.getElementById('app'));
115+
116+
root.render(<App />);

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@
2626
"build": "rm -rf dist && parcel build app/index.html --public-url '/'"
2727
},
2828
"dependencies": {
29-
"chalk": "4.1.2",
29+
"chalk": "5.4.1",
3030
"date-fns": "4.1.0",
3131
"dotenv": "16.4.7",
3232
"express": "4.21.2",
33-
"node-fetch": "2.7.0",
33+
"node-fetch": "3.3.2",
3434
"nodemon": "3.1.9",
35-
"ora": "5.4.1",
35+
"ora": "8.1.1",
3636
"prop-types": "15.8.1",
3737
"react": "19.0.0",
3838
"react-dom": "19.0.0",
3939
"react-is": "19.0.0",
4040
"recharts": "2.15.0",
4141
"scriptex-socials": "1.8.0",
42-
"styled-components": "6.1.13",
42+
"styled-components": "6.1.14",
4343
"universal-github-client": "1.0.3",
4444
"yargs": "17.7.2"
4545
},
@@ -56,5 +56,6 @@
5656
"ignore": [
5757
"insights.json"
5858
]
59-
}
59+
},
60+
"type": "module"
6061
}

0 commit comments

Comments
 (0)