File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
npm/webpack-dev-server/src/helpers Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ commands:
121121 name : Set environment variable to determine whether or not to persist artifacts
122122 command : |
123123 echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
124- echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "feat/support_next_16 " ]]; then
124+ echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "fix/angular_dep_resolution_windows " ]]; then
125125 export SHOULD_PERSIST_ARTIFACTS=true
126126 fi' >> "$BASH_ENV"
127127 # You must run `setup_should_persist_artifacts` command and be using bash before running this command
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ linux-x64:
44 - equal : [ develop, << pipeline.git.branch >> ]
55 # use the following branch as well to ensure that v8 snapshot cache updates are fully tested
66 - equal : [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
7- - equal : [ 'feat/support_next_16 ', << pipeline.git.branch >> ]
7+ - equal : [ 'fix/angular_dep_resolution_windows ', << pipeline.git.branch >> ]
88 - matches :
99 pattern : /^release\/\d+\.\d+\.\d+$/
1010 value : << pipeline.git.branch >>
Original file line number Diff line number Diff line change 11import * as fs from 'fs-extra'
2- import { tmpdir } from 'os'
2+ import { tmpdir , platform } from 'os'
33import * as path from 'path'
44import type { Configuration , RuleSetRule } from 'webpack'
55import type { PresetHandlerResult , WebpackDevServerConfig } from '../devServer'
@@ -183,12 +183,15 @@ export async function getAngularCliModules (projectRoot: string) {
183183 { logging } ,
184184 ] = await Promise . all ( angularCLiModules . map ( async ( dep ) => {
185185 try {
186- const depPath = require . resolve ( dep , { paths : [ projectRoot ] } )
186+ let depPath = require . resolve ( dep , { paths : [ projectRoot ] } )
187187 // NOTE: @cypress /webpack-dev-server is a CJS package, but we need to import some ESM files and absolute imports.
188188 // since import statements in TypeScript will get transpiled down to CommonJS require statements, we want to use tsx to leverage
189189 // an ESM style import here, which supports CommonJS and ESM.
190190 const { tsImport } = require ( 'tsx/esm/api' )
191191
192+ // NOTE: on Windows, fully qualified paths (ex: C:\Users\username\project\blah) need to be prefixed with `file://` to be properly resolved.
193+ depPath = platform ( ) === 'win32' ? `file://${ toPosix ( depPath ) } ` : depPath
194+
192195 const module = await tsImport ( depPath , __filename )
193196
194197 return module
You can’t perform that action at this time.
0 commit comments