Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions e2e/watch-plugins/mjs/my-watch-plugin.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@
*/
class MyWatchPlugin {
// Add hooks to Jest lifecycle events
apply(jestHooks) {
}
apply(jestHooks) {}

// Get the prompt information for interactive plugins
getUsageInfo(globalConfig) {
console.log('getUsageInfo');
}

// Executed when the key from `getUsageInfo` is input
run(globalConfig, updateConfigAndRun) {
}
run(globalConfig, updateConfigAndRun) {}
}

export default MyWatchPlugin;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"jest-jasmine": "JEST_JASMINE=1 yarn jest",
"jest-jasmine-ci": "yarn jest-jasmine --color --config jest.config.ci.js",
"jest-coverage": "yarn jest --coverage",
"lint": "eslint . --cache --ext js,jsx,ts,tsx,md",
"lint": "eslint . --cache --ext js,jsx,mjs,ts,tsx,md",
"lint:prettier": "prettier '**/*.{json,md,yml,yaml}' 'website/**/*.{css,js}' --write",
"lint:prettier:ci": "prettier '**/*.{json,md,yml,yaml}' 'website/**/*.{css,js}' --check",
"remove-examples": "node ./scripts/remove-examples.mjs",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
*/

import assert from 'assert';
import fs from 'fs';
import path from 'path';
import {fileURLToPath} from 'url';
import babel from '@babel/core';
import chalk from 'chalk';
import glob from 'glob';
import fs from 'graceful-fs';
import micromatch from 'micromatch';
import prettier from 'prettier';
import transformOptions from '../babel.config.js';
Expand Down
2 changes: 1 addition & 1 deletion scripts/buildTs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
*/

import assert from 'assert';
import fs from 'fs';
import os from 'os';
import path from 'path';
import chalk from 'chalk';
import execa from 'execa';
import globby from 'globby';
import fs from 'graceful-fs';
import stripJsonComments from 'strip-json-comments';
import throat from 'throat';
import {getPackages} from './buildUtils.mjs';
Expand Down
2 changes: 1 addition & 1 deletion scripts/buildUtils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
*/

import assert from 'assert';
import fs from 'fs';
import {createRequire} from 'module';
import path from 'path';
import {fileURLToPath} from 'url';
import chalk from 'chalk';
import fs from 'graceful-fs';
import {sync as readPkg} from 'read-pkg';
import stringLength from 'string-length';

Expand Down
2 changes: 1 addition & 1 deletion scripts/bundleTs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

import fs from 'fs';
import {createRequire} from 'module';
import path from 'path';
import {fileURLToPath} from 'url';
Expand All @@ -15,6 +14,7 @@ import {
ExtractorConfig,
} from '@microsoft/api-extractor';
import chalk from 'chalk';
import fs from 'graceful-fs';
import {sync as pkgDir} from 'pkg-dir';
import prettier from 'prettier';
import rimraf from 'rimraf';
Expand Down
2 changes: 1 addition & 1 deletion scripts/checkCopyrightHeaders.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import {execSync} from 'child_process';
import fs from 'fs';
import fs from 'graceful-fs';
import {isBinaryFileSync} from 'isbinaryfile';

const getFileContents = path => fs.readFileSync(path, {encoding: 'utf-8'});
Expand Down
4 changes: 2 additions & 2 deletions scripts/remove-examples.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

'use strict';

import {writeFileSync} from 'fs';
import {createRequire} from 'module';
import {dirname, resolve} from 'path';
import {fileURLToPath} from 'url';
import fs from 'graceful-fs';
import rimraf from 'rimraf';
const require = createRequire(import.meta.url);

Expand All @@ -20,6 +20,6 @@ const config = require(configFile);

delete config.projects;

writeFileSync(configFile, `module.exports = ${JSON.stringify(config)};\n`);
fs.writeFileSync(configFile, `module.exports = ${JSON.stringify(config)};\n`);

rimraf.sync(resolve(dirname(fileURLToPath(import.meta.url)), '../examples/'));
2 changes: 1 addition & 1 deletion scripts/verifyOldTs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

'use strict';

import fs from 'fs';
import {createRequire} from 'module';
import path from 'path';
import {fileURLToPath} from 'url';
import chalk from 'chalk';
import execa from 'execa';
import fs from 'graceful-fs';
import rimraf from 'rimraf';
import stripJsonComments from 'strip-json-comments';
import tempy from 'tempy';
Expand Down
2 changes: 1 addition & 1 deletion scripts/verifyPnP.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

'use strict';

import fs from 'fs';
import path from 'path';
import {fileURLToPath} from 'url';
import chalk from 'chalk';
import dedent from 'dedent';
import execa from 'execa';
import fs from 'graceful-fs';
import yaml from 'js-yaml';
import rimraf from 'rimraf';
import tempy from 'tempy';
Expand Down
2 changes: 1 addition & 1 deletion scripts/watch.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
*/

import {execSync} from 'child_process';
import fs from 'fs';
import path from 'path';
import {fileURLToPath} from 'url';
import chalk from 'chalk';
import chokidar from 'chokidar';
import fs from 'graceful-fs';
import {PACKAGES_DIR, getPackages} from './buildUtils.mjs';

const BUILD_CMD = `node ${path.resolve(
Expand Down