File tree Expand file tree Collapse file tree 6 files changed +35
-22
lines changed
dotnet/src/lib/models/dotnet-add-package Expand file tree Collapse file tree 6 files changed +35
-22
lines changed Original file line number Diff line number Diff line change 55
66version : 2
77updates :
8- - package-ecosystem : " npm" # See documentation for possible values
9- directory : " / " # Location of package manifests
8+ - package-ecosystem : ' npm' # See documentation for possible values
9+ directory : ' / ' # Location of package manifests
1010 schedule :
11- interval : " daily"
11+ interval : ' daily'
Original file line number Diff line number Diff line change 8989 }
9090 core.setOutput('base-branch', base_branch);
9191 core.setOutput('prs-string', prs.join('\n'));
92-
92+
9393 combined = branches.join(' ')
9494 console.log('Combined: ' + combined);
9595 return combined
@@ -107,14 +107,14 @@ jobs:
107107 echo "$BRANCHES_TO_COMBINE"
108108 sourcebranches="${BRANCHES_TO_COMBINE%\"}"
109109 sourcebranches="${sourcebranches#\"}"
110-
110+
111111 basebranch="${BASE_BRANCH%\"}"
112112 basebranch="${basebranch#\"}"
113-
113+
114114 git config pull.rebase false
115115 git config user.name github-actions
116116 git config user.email github-actions@github.com
117-
117+
118118 git branch $COMBINE_BRANCH_NAME $basebranch
119119 git checkout $COMBINE_BRANCH_NAME
120120 git pull origin $sourcebranches --no-edit
Original file line number Diff line number Diff line change 55# NxDotnet
66
77<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
8+
89[ ![ All Contributors] ( https://img.shields.io/badge/all_contributors-13-orange.svg?style=flat-square )] ( #contributors- )
10+
911<!-- ALL-CONTRIBUTORS-BADGE:END -->
1012
1113[ ![ Join the chat at https://gitter.im/nx-dotnet-plugin/community ] ( https://badges.gitter.im/nx-dotnet-plugin/community.svg )] ( https://gitter.im/nx-dotnet-plugin/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge ) [ ![ Run CI checks] ( https://github.com/nx-dotnet/nx-dotnet/actions/workflows/main.yml/badge.svg?branch=master )] ( https://github.com/nx-dotnet/nx-dotnet/actions/workflows/main.yml )
Original file line number Diff line number Diff line change 1111 "peerDependencies" : {
1212 "@nrwl/devkit" : " >14.0.0-beta.1" ,
1313 "@nrwl/workspace" : " >14.0.0-beta.1" ,
14- "nx" : " >14.0.0-beta.1"
14+ "nx" : " >14.0.0-beta.1" ,
15+ "eslint" : " >8.0.0"
16+ },
17+ "peerDependenciesMeta" : {
18+ "eslint" : {
19+ "optional" : true
20+ }
1521 },
1622 "devDependencies" : {
1723 "@nrwl/cli" : " *"
Original file line number Diff line number Diff line change 66 Workspaces ,
77} from '@nrwl/devkit' ;
88
9- import { ESLint } from 'eslint' ;
109import { relative } from 'path' ;
1110
1211import {
@@ -74,16 +73,22 @@ export async function loadModuleBoundaries(
7473) : Promise < ModuleBoundaries > {
7574 const configured = readConfig ( host ) . moduleBoundaries ;
7675 if ( ! configured ) {
77- const result = await new ESLint ( )
78- . calculateConfigForFile ( `${ root } /non-existant.ts` )
79- . catch ( ( ) =>
80- Promise . resolve ( {
81- rules : { '@nrwl/nx/enforce-module-boundaries' : [ ] } ,
82- } ) ,
83- ) ;
84- const [ , moduleBoundaryConfig ] =
85- result . rules [ '@nrwl/nx/enforce-module-boundaries' ] || [ ] ;
86- return moduleBoundaryConfig ?. depConstraints ?? [ ] ;
76+ try {
77+ // eslint-disable-next-line @typescript-eslint/no-var-requires
78+ const { ESLint } : typeof import ( 'eslint' ) = require ( 'eslint' ) ;
79+ const result = await new ESLint ( )
80+ . calculateConfigForFile ( `${ root } /non-existant.ts` )
81+ . catch ( ( ) =>
82+ Promise . resolve ( {
83+ rules : { '@nrwl/nx/enforce-module-boundaries' : [ ] } ,
84+ } ) ,
85+ ) ;
86+ const [ , moduleBoundaryConfig ] =
87+ result . rules [ '@nrwl/nx/enforce-module-boundaries' ] || [ ] ;
88+ return moduleBoundaryConfig ?. depConstraints ?? [ ] ;
89+ } catch {
90+ return [ ] ;
91+ }
8792 } else {
8893 return configured ;
8994 }
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ export type dotnetAddPackageFlags =
66 | 'noRestore'
77 | 'source' ;
88
9- export const addPackageKeyMap : Partial <
10- { [ key in dotnetAddPackageFlags ] : string }
11- > = {
9+ export const addPackageKeyMap : Partial < {
10+ [ key in dotnetAddPackageFlags ] : string ;
11+ } > = {
1212 packageDirectory : 'package-directory' ,
1313 noRestore : 'no-restore' ,
1414} ;
You can’t perform that action at this time.
0 commit comments