fix(js): fix minimal publish script devkit import (#16559)

This commit is contained in:
Philip Fulcher 2023-04-25 15:48:25 -06:00 committed by GitHub
parent a1819bcadd
commit 555cacd87d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,11 +10,13 @@ const publishScriptContent = `
* You might need to authenticate with NPM before running this script.
*/
import { readCachedProjectGraph } from '@nx/devkit';
import { execSync } from 'child_process';
import { readFileSync, writeFileSync } from 'fs';
import chalk from 'chalk';
import devkit from '@nx/devkit';
const { readCachedProjectGraph } = devkit;
function invariant(condition, message) {
if (!condition) {
console.error(chalk.bold.red(message));