Skip to content

Commit

Permalink
add .js suffix in node code, phetsims/perennial#407
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Nov 8, 2024
1 parent 464e9d8 commit b613bf9
Show file tree
Hide file tree
Showing 30 changed files with 64 additions and 64 deletions.
18 changes: 9 additions & 9 deletions js/grunt/buildRunnable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@

import fs from 'fs';
import _ from 'lodash';
import * as ChipperConstants from '../common/ChipperConstants';
import generateThumbnails from './generateThumbnails';
import generateTwitterCard from './generateTwitterCard';
import getDependencies from './getDependencies';
import getInitializationScript from './getInitializationScript';
import getLocalesFromRepository from './getLocalesFromRepository';
import packageXHTML from './packageXHTML';
import reportUnusedStrings from './reportUnusedStrings';
import webpackBuild from './webpackBuild';
import * as ChipperConstants from '../common/ChipperConstants.js';
import generateThumbnails from './generateThumbnails.js';
import generateTwitterCard from './generateTwitterCard.js';
import getDependencies from './getDependencies.js';
import getInitializationScript from './getInitializationScript.js';
import getLocalesFromRepository from './getLocalesFromRepository.js';
import packageXHTML from './packageXHTML.js';
import reportUnusedStrings from './reportUnusedStrings.js';
import webpackBuild from './webpackBuild.js';
import getPreloads from './getPreloads.js';
import getPhetLibs from './getPhetLibs.js';

Expand Down
4 changes: 2 additions & 2 deletions js/grunt/buildStandalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* @author Jonathan Olson <[email protected]>
*/

import webpackBuild from './webpackBuild';
import webpackBuild from './webpackBuild.js';
import IntentionalAny from '../../../phet-core/js/types/IntentionalAny.ts';
import getLocalesFromRepository from './getLocalesFromRepository';
import getLocalesFromRepository from './getLocalesFromRepository.js';
import getPhetLibs from './getPhetLibs.js';

const assert = require( 'assert' );
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/copySupplementalPhetioFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as _ from 'lodash';
import IntentionalAny from '../../../phet-core/js/types/IntentionalAny.js';
import webpackBuild from './webpackBuild.ts';
import buildStandalone from './buildStandalone.ts';
import formatPhetioAPI from '../phet-io/formatPhetioAPI';
import formatPhetioAPI from '../phet-io/formatPhetioAPI.js';
import check from '../../../perennial-alias/js/grunt/check.ts';
import generatePhetioMacroAPI from '../phet-io/generatePhetioMacroAPI.js';
import getPhetLibs from './getPhetLibs.js';
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/generateDevelopmentHTML.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import * as _ from 'lodash';
import IntentionalAny from '../../../phet-core/js/types/IntentionalAny.js';
import fixEOL from '../../../perennial-alias/js/common/fixEOL.js';
import getPreloads from './getPreloads';
import getPreloads from './getPreloads.js';

const ChipperStringUtils = require( '../common/ChipperStringUtils.js' );
const getStringRepos = require( './getStringRepos.js' );
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/getAllThirdPartyEntries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import * as grunt from 'grunt';
import IntentionalAny from '../../../phet-core/js/types/IntentionalAny.js';
import getThirdPartyLibEntries from './getThirdPartyLibEntries';
import getThirdPartyLibEntries from './getThirdPartyLibEntries.js';

/**
* Returns an object with information about third-party license entries.
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/getPreloads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import * as _ from 'lodash';
import assert from 'assert';
import * as grunt from 'grunt';
import ChipperStringUtils from '../common/ChipperStringUtils';
import ChipperStringUtils from '../common/ChipperStringUtils.js';
import getPhetLibs from './getPhetLibs.js';

/**
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/getStringRepos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

const fs = require( 'fs' );
import getDependencies from './getDependencies';
import getDependencies from './getDependencies.js';
import IntentionalAny from '../../../phet-core/js/types/IntentionalAny.js';

module.exports = async ( repo: string ): Promise<IntentionalAny> => {
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/getThirdPartyLibEntries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @author Sam Reid (PhET Interactive Simulations)
*/

import getLicenseKeys from './getLicenseKeys';
import getLicenseKeys from './getLicenseKeys.js';

// modules
const _ = require( 'lodash' );
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/gruntMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

const assert = require( 'assert' );
require( './checkNodeVersion' );
require( './checkNodeVersion.js' );
const registerTasks = require( '../../../perennial-alias/js/grunt/util/registerTasks.js' );
const gruntSpawn = require( '../../../perennial-alias/js/grunt/util/gruntSpawn.js' );
const _ = require( 'lodash' );
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/modulify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import IntentionalAny from '../../../phet-core/js/types/IntentionalAny.ts';
import getCopyrightLine from './getCopyrightLine';
import getCopyrightLine from './getCopyrightLine.js';
import createMipmap from './createMipmap.js';

const _ = require( 'lodash' );
Expand Down
6 changes: 3 additions & 3 deletions js/grunt/tasks/build-images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* @author Sam Reid (PhET Interactive Simulations)
*/
import * as grunt from 'grunt';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';
import Jimp from 'jimp';
import generateThumbnails from '../generateThumbnails';
import generateTwitterCard from '../generateTwitterCard';
import generateThumbnails from '../generateThumbnails.js';
import generateTwitterCard from '../generateTwitterCard.js';

const brand = 'phet';

Expand Down
10 changes: 5 additions & 5 deletions js/grunt/tasks/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@

import assert from 'assert';
import * as grunt from 'grunt';
import getBrands from '../../../../perennial-alias/js/grunt/tasks/util/getBrands';
import getOption from '../../../../perennial-alias/js/grunt/tasks/util/getOption';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import getBrands from '../../../../perennial-alias/js/grunt/tasks/util/getBrands.js';
import getOption from '../../../../perennial-alias/js/grunt/tasks/util/getOption.js';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';
import IntentionalAny from '../../../../phet-core/js/types/IntentionalAny.js';
import buildRunnable from '../buildRunnable';
import buildStandalone from '../buildStandalone';
import buildRunnable from '../buildRunnable.js';
import buildStandalone from '../buildStandalone.js';
import check from '../../../../perennial-alias/js/grunt/check.js';
import getPhetLibs from '../getPhetLibs.js';
import transpile from '../../common/transpile.js';
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/tasks/clean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import * as grunt from 'grunt';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';
import fs from 'fs';

export const clean = ( async () => {
Expand Down
4 changes: 2 additions & 2 deletions js/grunt/tasks/compare-phet-io-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* @author Sam Reid (PhET Interactive Simulations)
*/
import * as grunt from 'grunt';
import getOption from '../../../../perennial-alias/js/grunt/tasks/util/getOption';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import getOption from '../../../../perennial-alias/js/grunt/tasks/util/getOption.js';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';
import IntentionalAny from '../../../../phet-core/js/types/IntentionalAny.js';
import getPhetLibs from '../getPhetLibs.js';
import generatePhetioMacroAPI from '../../phet-io/generatePhetioMacroAPI.js';
Expand Down
4 changes: 2 additions & 2 deletions js/grunt/tasks/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* @author Sam Reid (PhET Interactive Simulations)
*/

import getOption from '../../../../perennial-alias/js/grunt/tasks/util/getOption';
import testGruntOptions from '../../../../perennial-alias/js/grunt/tasks/util/testGruntOptions';
import getOption from '../../../../perennial-alias/js/grunt/tasks/util/getOption.js';
import testGruntOptions from '../../../../perennial-alias/js/grunt/tasks/util/testGruntOptions.js';

( async () => {
if ( getOption( 'test-options' ) ) {
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/tasks/generate-a11y-view-html.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2013-2024, University of Colorado Boulder

import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';

const generateA11yViewHTML = require( '../generateA11yViewHTML.js' );

Expand Down
2 changes: 1 addition & 1 deletion js/grunt/tasks/generate-development-html.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2013-2024, University of Colorado Boulder

import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';

const generateDevelopmentHTML = require( '../generateDevelopmentHTML.js' );

Expand Down
4 changes: 2 additions & 2 deletions js/grunt/tasks/generate-development-strings.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2013-2024, University of Colorado Boulder

import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import generateDevelopmentStrings from '../generateDevelopmentStrings';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';
import generateDevelopmentStrings from '../generateDevelopmentStrings.js';
const fs = require( 'fs' );

/**
Expand Down
6 changes: 3 additions & 3 deletions js/grunt/tasks/generate-phet-io-api.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2024, University of Colorado Boulder

import getOption from '../../../../perennial-alias/js/grunt/tasks/util/getOption';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import formatPhetioAPI from '../../phet-io/formatPhetioAPI';
import getOption from '../../../../perennial-alias/js/grunt/tasks/util/getOption.js';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';
import formatPhetioAPI from '../../phet-io/formatPhetioAPI.js';
import getPhetLibs from '../getPhetLibs.js';

/**
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/tasks/generate-test-html.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2013-2024, University of Colorado Boulder

import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';

const generateTestHTML = require( '../generateTestHTML.js' );

Expand Down
6 changes: 3 additions & 3 deletions js/grunt/tasks/generate-used-strings-file.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2024, University of Colorado Boulder

import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import webpackBuild from '../webpackBuild';
import getLocalesFromRepository from '../getLocalesFromRepository';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';
import webpackBuild from '../webpackBuild.js';
import getLocalesFromRepository from '../getLocalesFromRepository.js';

import getPhetLibs from '../getPhetLibs.js';
import transpile from '../../common/transpile.js';
Expand Down
6 changes: 3 additions & 3 deletions js/grunt/tasks/modulify.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright 2013-2024, University of Colorado Boulder
import * as fs from 'fs';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import generateDevelopmentStrings from '../generateDevelopmentStrings';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';
import generateDevelopmentStrings from '../generateDevelopmentStrings.js';

// eslint-disable-next-line phet/default-import-match-filename
import _modulify from '../modulify';
import _modulify from '../modulify.js';

/**
* Creates *.js modules for all images/strings/audio/etc in a repo
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/tasks/published-readme.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2013-2024, University of Colorado Boulder

import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';
import generateREADME from '../generateREADME.js';

/**
Expand Down
4 changes: 2 additions & 2 deletions js/grunt/tasks/report-media.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2013-2024, University of Colorado Boulder

import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';

/**
* (project-wide) Report on license.json files throughout all working copies.
Expand All @@ -14,7 +14,7 @@ import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
const repo = getRepo();

// eslint-disable-next-line phet/default-import-match-filename
import _reportMedia from '../reportMedia';
import _reportMedia from '../reportMedia.js';

export const reportMedia = ( async () => {
await _reportMedia( repo );
Expand Down
4 changes: 2 additions & 2 deletions js/grunt/tasks/unpublished-readme.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2013-2024, University of Colorado Boulder

import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import generateREADME from '../generateREADME';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';
import generateREADME from '../generateREADME.js';

/**
* Generates README.md file for an unpublished simulation.
Expand Down
4 changes: 2 additions & 2 deletions js/grunt/tasks/update-copyright-dates.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2013-2024, University of Colorado Boulder

import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import updateCopyrightDates from '../updateCopyrightDates';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';
import updateCopyrightDates from '../updateCopyrightDates.js';

/**
* Update the copyright dates in JS source files based on Github dates
Expand Down
4 changes: 2 additions & 2 deletions js/grunt/tasks/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

import * as fs from 'fs';
import * as grunt from 'grunt';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo';
import generateREADME from '../generateREADME';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';
import generateREADME from '../generateREADME.js';

const generateDevelopmentHTML = require( '../generateDevelopmentHTML.js' );
const generateA11yViewHTML = require( '../generateA11yViewHTML.js' );
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/updateCopyrightDate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Jonathan Olson <[email protected]>
*/

import getCopyrightLine from './getCopyrightLine';
import getCopyrightLine from './getCopyrightLine.js';

const fs = require( 'fs' );

Expand Down
2 changes: 1 addition & 1 deletion js/grunt/updateCopyrightDates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import * as grunt from 'grunt';
import _ from 'lodash';
import updateCopyrightDate from './updateCopyrightDate';
import updateCopyrightDate from './updateCopyrightDate.js';

const unsupportedExtensions = [ '.json', 'md' ];

Expand Down
14 changes: 7 additions & 7 deletions js/scripts/hook-pre-commit-task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@

import fs from 'fs';
import puppeteer from '../../../perennial-alias/js/npm-dependencies/puppeteer.js';
import CacheLayer from '../../../chipper/js/common/CacheLayer';
import CacheLayer from '../../../chipper/js/common/CacheLayer.js';
import reportMedia from '../../../chipper/js/grunt/reportMedia.js';
import getRepoList from '../../../perennial-alias/js/common/getRepoList';
import withServer from '../../../perennial-alias/js/common/withServer';
import lint from '../../../perennial-alias/js/eslint/lint';
import check from '../../../perennial-alias/js/grunt/check';
import getRepoList from '../../../perennial-alias/js/common/getRepoList.js';
import withServer from '../../../perennial-alias/js/common/withServer.js';
import lint from '../../../perennial-alias/js/eslint/lint.js';
import check from '../../../perennial-alias/js/grunt/check.js';
import puppeteerQUnit from '../../../perennial-alias/js/test/puppeteerQUnit.js';
import getPhetLibs from '../grunt/getPhetLibs';
import getPhetLibs from '../grunt/getPhetLibs.js';
import generatePhetioMacroAPI from '../phet-io/generatePhetioMacroAPI.js';
import phetioCompareAPISets from '../phet-io/phetioCompareAPISets';
import phetioCompareAPISets from '../phet-io/phetioCompareAPISets.js';
import transpile from '../common/transpile.js';

type Repo = string;
Expand Down

0 comments on commit b613bf9

Please sign in to comment.