mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-09-03 00:17:58 +00:00
Feature/grs 1955 change commonjs imports (#1995)
* GRS-1955: Using ES6 import/export in src files * GRS-1955: Using ES6 import/export in test files * GRS-1955: Using ES6 import/export in themes index.js * GRS-1955: Readding blank line at end of top-languages-card.js * feat: fix test es6 import errors This commit makes sure jest is set-up to support es6. It also fixes several test errors and sorts the imports. * test: update test node version This commit makes sure node 16 is used in the github actions. * refactor: run prettier Co-authored-by: rickstaa <rick.staa@outlook.com>
This commit is contained in:
+10
-8
@@ -1,17 +1,19 @@
|
||||
require("dotenv").config();
|
||||
const {
|
||||
import {
|
||||
renderError,
|
||||
parseBoolean,
|
||||
parseArray,
|
||||
clampValue,
|
||||
CONSTANTS,
|
||||
} = require("../src/common/utils");
|
||||
const fetchStats = require("../src/fetchers/stats-fetcher");
|
||||
const renderStatsCard = require("../src/cards/stats-card");
|
||||
const blacklist = require("../src/common/blacklist");
|
||||
const { isLocaleAvailable } = require("../src/translations");
|
||||
} from "../src/common/utils";
|
||||
import fetchStats from "../src/fetchers/stats-fetcher";
|
||||
import renderStatsCard from "../src/cards/stats-card";
|
||||
import blacklist from "../src/common/blacklist";
|
||||
import { isLocaleAvailable } from "../src/translations";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
module.exports = async (req, res) => {
|
||||
dotenv.config();
|
||||
|
||||
export default async (req, res) => {
|
||||
const {
|
||||
username,
|
||||
hide,
|
||||
|
||||
+7
-8
@@ -1,16 +1,15 @@
|
||||
require("dotenv").config();
|
||||
const {
|
||||
import {
|
||||
renderError,
|
||||
parseBoolean,
|
||||
clampValue,
|
||||
CONSTANTS,
|
||||
} = require("../src/common/utils");
|
||||
const fetchRepo = require("../src/fetchers/repo-fetcher");
|
||||
const renderRepoCard = require("../src/cards/repo-card");
|
||||
const blacklist = require("../src/common/blacklist");
|
||||
const { isLocaleAvailable } = require("../src/translations");
|
||||
} from "../src/common/utils";
|
||||
import fetchRepo from "../src/fetchers/repo-fetcher";
|
||||
import renderRepoCard from "../src/cards/repo-card";
|
||||
import blacklist from "../src/common/blacklist";
|
||||
import { isLocaleAvailable } from "../src/translations";
|
||||
|
||||
module.exports = async (req, res) => {
|
||||
export default async (req, res) => {
|
||||
const {
|
||||
username,
|
||||
repo,
|
||||
|
||||
+10
-8
@@ -1,17 +1,19 @@
|
||||
require("dotenv").config();
|
||||
const {
|
||||
import {
|
||||
renderError,
|
||||
clampValue,
|
||||
parseBoolean,
|
||||
parseArray,
|
||||
CONSTANTS,
|
||||
} = require("../src/common/utils");
|
||||
const fetchTopLanguages = require("../src/fetchers/top-languages-fetcher");
|
||||
const renderTopLanguages = require("../src/cards/top-languages-card");
|
||||
const blacklist = require("../src/common/blacklist");
|
||||
const { isLocaleAvailable } = require("../src/translations");
|
||||
} from "../src/common/utils";
|
||||
import fetchTopLanguages from "../src/fetchers/top-languages-fetcher";
|
||||
import { renderTopLanguages } from "../src/cards/top-languages-card";
|
||||
import blacklist from "../src/common/blacklist";
|
||||
import { isLocaleAvailable } from "../src/translations";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
module.exports = async (req, res) => {
|
||||
dotenv.config();
|
||||
|
||||
export default async (req, res) => {
|
||||
const {
|
||||
username,
|
||||
hide,
|
||||
|
||||
+9
-7
@@ -1,16 +1,18 @@
|
||||
require("dotenv").config();
|
||||
const {
|
||||
import {
|
||||
renderError,
|
||||
parseBoolean,
|
||||
clampValue,
|
||||
parseArray,
|
||||
CONSTANTS,
|
||||
} = require("../src/common/utils");
|
||||
const { isLocaleAvailable } = require("../src/translations");
|
||||
const { fetchWakatimeStats } = require("../src/fetchers/wakatime-fetcher");
|
||||
const wakatimeCard = require("../src/cards/wakatime-card");
|
||||
} from "../src/common/utils";
|
||||
import { isLocaleAvailable } from "../src/translations";
|
||||
import fetchWakatimeStats from "../src/fetchers/wakatime-fetcher";
|
||||
import wakatimeCard from "../src/cards/wakatime-card";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
module.exports = async (req, res) => {
|
||||
dotenv.config();
|
||||
|
||||
export default async (req, res) => {
|
||||
const {
|
||||
username,
|
||||
title_color,
|
||||
|
||||
Reference in New Issue
Block a user