Skip to content

Commit

Permalink
replace remaining asserts in scripts (#1436)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simek authored Dec 18, 2024
1 parent ffd0e8a commit dea633a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scripts/build-and-score-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { fetchGithubData, fetchGithubRateLimit, loadGitHubLicenses } from './fet
import { fetchNpmData, fetchNpmDataBulk } from './fetch-npm-data.js';
import fetchReadmeImages from './fetch-readme-images.js';
import { fillNpmName, hasMismatchedPackageData, sleep } from './helpers.js';
import debugGithubRepos from '../debug-github-repos.json' assert { type: 'json' };
import githubRepos from '../react-native-libraries.json' assert { type: 'json' };
import debugGithubRepos from '../debug-github-repos.json' with { type: 'json' };
import githubRepos from '../react-native-libraries.json' with { type: 'json' };
import { isLaterThan, TimeRange } from '../util/datetime.js';
import { isEmptyOrNull } from '../util/strings.js';

Expand Down
2 changes: 1 addition & 1 deletion scripts/check-resources.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fetch from 'cross-fetch';

import libraries from '../react-native-libraries.json' assert { type: 'json' };
import libraries from '../react-native-libraries.json' with { type: 'json' };
import { sleep } from './helpers.js';

console.log('⬇️ Attempting to fetch examples and images');
Expand Down
2 changes: 1 addition & 1 deletion scripts/recalculate-popularity.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fs from 'node:fs';
import path from 'node:path';

import { calculatePopularityScore } from './calculate-score.js';
import data from '../assets/data.json' assert { type: 'json' };
import data from '../assets/data.json' with { type: 'json' };

const LIBRARIES_JSON_PATH = path.join('assets', 'data.json');

Expand Down
2 changes: 1 addition & 1 deletion scripts/validate-libraries.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import libraries from '../react-native-libraries.json' assert { type: 'json' };
import libraries from '../react-native-libraries.json' with { type: 'json' };

const GITHUB_URL_PATTERN = /^https:\/\/github\.com\/[\w.-]+\/[\w.-]+(\/tree\/[\w-\\/.%@]+)?$/g;

Expand Down

0 comments on commit dea633a

Please sign in to comment.