This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { basename } = require('path'); | |
| const runningPackager = basename(process.env.npm_execpath); | |
| if (!runningPackager.startsWith('yarn')) { | |
| console.warn('<------------------------------------>'); | |
| console.warn('<------ detected `npm install` ----->'); | |
| console.warn('<---- use `yarn` to install deps ---->'); | |
| console.warn('<------------------------------------>'); | |
| throw new Error('Use yarn to install packages.'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import fetch from "node-fetch"; | |
| import { JSDOM } from "jsdom"; | |
| export function downloadHTML(url: string): Promise<JSDOM> { | |
| return fetch(url) | |
| .then((x) => x.text()) | |
| .then((html) => { | |
| return new JSDOM(html); | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { execSync } from 'child_process'; | |
| import { writeFileSync } from 'fs'; | |
| import { ensureDirSync } from 'fs-extra'; | |
| import yargs from 'yargs-parser'; | |
| const ITERATIONS = 25; | |
| type Measure = Record<string, number>; | |
| const daemon_measures: Measure[] = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { execSync } from "child_process"; | |
| import { ESLint } from "eslint"; | |
| import { basename } from "path"; | |
| export async function lintChangedFiles( | |
| base: string = "main", | |
| filePaths: string[] = [] | |
| ) { | |
| console.log( | |
| "BASE branch to compare to find changed files for Lint check is: " + base |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ExecSyncOptions, execSync } from 'child_process'; | |
| import { existsSync, readFileSync, unlinkSync, writeFileSync } from 'fs'; | |
| import { join } from 'path'; | |
| const ITERATIONS = 5; | |
| const variables = [ | |
| ['NX_DAEMON', ['true', 'false']], | |
| ['NX_ISOLATE_PLUGINS', ['true', 'false']], | |
| ] as const; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //@ts-check | |
| /** | |
| * @type {Array<[string, number]>} | |
| */ | |
| const timings = []; | |
| const { dirname } = require('path'); | |
| const labelReplacers = [ | |
| (l) => l.replace(dirname(dirname(require.resolve('nx'))), 'nx'), | |
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| REM Reset Nx | |
| nx reset | |
| IF %ERRORLEVEL% NEQ 0 ( | |
| echo Nx reset failed. | |
| exit /b %ERRORLEVEL% | |
| ) | |
| REM Set environment variable | |
| set DOTNET_ROLL_FORWARD_TO_PRERELEASE=1 |