File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/nx-npm/src/executors/publish/lib Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
- import { ExecutorContext , readNxJson } from '@nrwl/devkit' ;
1
+ import { ExecutorContext } from '@nrwl/devkit' ;
2
2
import { getProjectConfiguration } from '@ns3/nx-core' ;
3
3
import { PublishExecutorNormalizedSchema , PublishExecutorSchema } from '../schema' ;
4
4
5
5
export function normalizeOptions (
6
6
options : PublishExecutorSchema ,
7
7
context : ExecutorContext ,
8
8
) : PublishExecutorNormalizedSchema {
9
- const nx = readNxJson ( ) ;
9
+ const npmScope = context . workspace ?. npmScope ;
10
+
11
+ if ( ! npmScope ) {
12
+ throw new Error ( 'Missing npmScope in workspace' ) ;
13
+ }
10
14
11
15
return {
12
16
...options ,
13
17
npmToken : getNpmToken ( options ) ,
14
18
pkgLocation : getPkgLocation ( options , context ) ,
15
- npmScope : nx . npmScope ,
19
+ npmScope : npmScope ,
16
20
pkgVersion : options . pkgVersion || process . env [ 'NPM_PACKAGE_VERSION' ] ,
17
21
tag : options . tag || process . env [ 'NPM_PACKAGE_TAG' ] || 'latest' ,
18
22
} ;
You can’t perform that action at this time.
0 commit comments