Skip to content

Commit

Permalink
fix(misc): remove remaining usages of @nrwl/workspace:run-commands ex…
Browse files Browse the repository at this point in the history
…ecutor (#12299)
  • Loading branch information
FrozenPandaz committed Sep 28, 2022
1 parent 5372b4b commit 9d06b3c
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 26 deletions.
6 changes: 3 additions & 3 deletions e2e/nx-misc/src/extras.test.ts
Expand Up @@ -139,7 +139,7 @@ describe('Extra Nx Misc Tests', () => {
it('should pass options', async () => {
updateProjectConfig(mylib, (config) => {
config.targets.echo = {
executor: '@nrwl/workspace:run-commands',
executor: 'nx:run-commands',
options: {
command: 'echo --var1={args.var1}',
var1: 'a',
Expand All @@ -156,7 +156,7 @@ describe('Extra Nx Misc Tests', () => {
const echoTarget = uniq('echo');
updateProjectConfig(mylib, (config) => {
config.targets[echoTarget] = {
executor: '@nrwl/workspace:run-commands',
executor: 'nx:run-commands',
options: {
commands: [
'echo "Arguments:"',
Expand Down Expand Up @@ -191,7 +191,7 @@ describe('Extra Nx Misc Tests', () => {
it('ttt should fail when a process exits non-zero', async () => {
updateProjectConfig(mylib, (config) => {
config.targets.error = {
executor: '@nrwl/workspace:run-commands',
executor: 'nx:run-commands',
options: {
command: `exit 1`,
},
Expand Down
2 changes: 1 addition & 1 deletion e2e/nx-plugin/src/nx-plugin.test.ts
Expand Up @@ -295,7 +295,7 @@ describe('Nx Plugin', () => {
if (basename(f) === 'my-project-file') {
return {
build: {
executor: "@nrwl/workspace:run-commands",
executor: "nx:run-commands",
options: {
command: "echo 'custom registered target'"
}
Expand Down
2 changes: 1 addition & 1 deletion e2e/nx-run/src/cache.test.ts
Expand Up @@ -107,7 +107,7 @@ describe('cache', () => {
// updateFile('workspace.json', (c) => {
// const workspaceJson = JSON.parse(c);
// workspaceJson.projects[myapp1].targets.lint = {
// executor: '@nrwl/workspace:run-commands',
// executor: 'nx:run-commands',
// options: {
// command: 'echo hi && exit 1',
// },
Expand Down
2 changes: 1 addition & 1 deletion e2e/nx-run/src/run.test.ts
Expand Up @@ -164,7 +164,7 @@ describe('Nx Running Tests', () => {
projectFilePatterns: ['inferred-project.nxproject'],
registerProjectTargets: () => ({
"echo": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "echo inferred-target"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/cra-to-nx/src/lib/setup-e2e-project.ts
Expand Up @@ -5,7 +5,7 @@ export function setupE2eProject(appName: string) {
const data = fs.readFileSync(`apps/${appName}-e2e/project.json`);
const json = JSON.parse(data.toString());
json.targets.e2e = {
executor: '@nrwl/workspace:run-commands',
executor: 'nx:run-commands',
options: {
commands: [`nx e2e-serve ${appName}-e2e`, `nx e2e-run ${appName}-e2e`],
},
Expand All @@ -19,7 +19,7 @@ export function setupE2eProject(appName: string) {
},
};
json.targets['e2e-serve'] = {
executor: '@nrwl/workspace:run-commands',
executor: 'nx:run-commands',
options: {
commands: [`nx serve ${appName}`],
readyWhen: 'can now view',
Expand Down
10 changes: 0 additions & 10 deletions packages/expo/project.json
Expand Up @@ -77,16 +77,6 @@
"options": {
"command": "node ./scripts/copy-readme.js expo"
}
},
"publish": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"parallel": false,
"commands": [
"nx build expo",
"node tools/scripts/publish.mjs expo {args.ver} {args.tag}"
]
}
}
},
"tags": []
Expand Down
Expand Up @@ -52,7 +52,7 @@ function getTargets(options: NormalizedSchema) {
};

architect.serve = {
executor: '@nrwl/workspace:run-commands',
executor: 'nx:run-commands',
options: {
command: `nx start ${options.name}`,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/js/src/generators/library/library.spec.ts
Expand Up @@ -842,7 +842,7 @@ describe('lib', () => {

const config = readProjectConfiguration(tree, 'my-lib');
expect(config.targets.publish).toEqual({
executor: '@nrwl/workspace:run-commands',
executor: 'nx:run-commands',
options: {
command:
'node tools/scripts/publish.mjs my-lib {args.ver} {args.tag}',
Expand Down
2 changes: 1 addition & 1 deletion packages/js/src/generators/library/library.ts
Expand Up @@ -132,7 +132,7 @@ function addProject(
const publishScriptPath = addMinimalPublishScript(tree);

projectConfiguration.targets.publish = {
executor: '@nrwl/workspace:run-commands',
executor: 'nx:run-commands',
options: {
command: `node ${publishScriptPath} ${options.name} {args.ver} {args.tag}`,
},
Expand Down
8 changes: 4 additions & 4 deletions packages/nx/src/utils/project-graph-utils.spec.ts
Expand Up @@ -165,7 +165,7 @@ describe('project graph utils', () => {
it('should prefer project.json targets', () => {
const projectJsonTargets = {
build: {
executor: '@nrwl/workspace:run-commands',
executor: 'nx:run-commands',
options: {
command: 'echo 2',
},
Expand All @@ -182,7 +182,7 @@ describe('project graph utils', () => {
it('should provide targets from project.json and package.json', () => {
const projectJsonTargets = {
clean: {
executor: '@nrwl/workspace:run-commands',
executor: 'nx:run-commands',
options: {
command: 'echo 2',
},
Expand Down Expand Up @@ -243,14 +243,14 @@ describe('project graph utils', () => {

const result = mergeNpmScriptsWithTargets('', {
build: {
executor: '@nrwl/workspace:run-commands',
executor: 'nx:run-commands',
options: { command: 'echo hi' },
},
});

expect(result).toEqual({
build: {
executor: '@nrwl/workspace:run-commands',
executor: 'nx:run-commands',
options: { command: 'echo hi' },
},
test: {
Expand Down
Expand Up @@ -41,7 +41,7 @@ function getTargets(options: NormalizedSchema) {
};

architect.serve = {
executor: '@nrwl/workspace:run-commands',
executor: 'nx:run-commands',
options: {
command: `nx start ${options.name}`,
},
Expand Down

1 comment on commit 9d06b3c

@vercel
Copy link

@vercel vercel bot commented on 9d06b3c Sep 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx-five.vercel.app
nx.dev

Please sign in to comment.