Skip to content

Commit 52eee39

Browse files
committed
Why does this fail on Windows?
1 parent 01a227a commit 52eee39

File tree

4 files changed

+19
-247
lines changed

4 files changed

+19
-247
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -7,62 +7,6 @@ concurrency:
77
cancel-in-progress: true
88

99
jobs:
10-
prepare-versions:
11-
runs-on: ubuntu-latest
12-
outputs:
13-
matrix: ${{ steps.set-matrix.outputs.matrix }}
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v4
17-
- id: set-matrix
18-
name: Prepare
19-
run: echo "matrix=$(node -p "JSON.stringify(require('./package.json').peerDependencies['cypress'].split(' || '))")" >> $GITHUB_OUTPUT
20-
- run: npm -v
21-
22-
test:
23-
needs: prepare-versions
24-
runs-on: ubuntu-latest
25-
container:
26-
image: cypress/browsers:latest
27-
strategy:
28-
fail-fast: false
29-
matrix:
30-
cypress-version: ${{fromJson(needs.prepare-versions.outputs.matrix)}}
31-
steps:
32-
- uses: actions/setup-node@v4
33-
with:
34-
node-version: 18
35-
- name: Checkout
36-
uses: actions/checkout@v4
37-
- name: Cache NPM modules
38-
uses: actions/cache@v4
39-
with:
40-
path: ~/.npm
41-
key: npm-linux@${{ matrix.cypress-version }}
42-
- name: Cache Cypress binaries
43-
uses: actions/cache@v4
44-
with:
45-
path: ~/.cache/Cypress
46-
key: cypress-linux@${{ matrix.cypress-version }}
47-
- name: Change owner
48-
run: "chown root: ."
49-
- name: Dependencies
50-
env:
51-
CYPRESS_INSTALL_BINARY: "0"
52-
run: |
53-
npm install --engine-strict && \
54-
npm install --no-save cypress@${{ matrix.cypress-version }} && \
55-
env -u CYPRESS_INSTALL_BINARY npx cypress install
56-
- name: Build
57-
run: npm run build
58-
- name: Test
59-
run: npm run test
60-
- name: Versions
61-
run: |
62-
npx cypress --version
63-
node --version
64-
npm --version
65-
6610
windows:
6711
runs-on: windows-latest
6812
env:
@@ -93,7 +37,9 @@ jobs:
9337
- name: Remove Webpack test
9438
run: rm features/loaders/webpack.feature
9539
- name: Test
96-
run: npm run test:integration
40+
with:
41+
DEBUG: cypress:electron,cypress-configuration,cypress-cucumber-preprocessor
42+
run: npm run test:integration -- features\reporters\usage.feature:91
9743
- name: Versions
9844
run: |
9945
npx cypress --version

.github/workflows/examples-branch.yml

Lines changed: 0 additions & 118 deletions
This file was deleted.

.github/workflows/examples-master.yml

Lines changed: 0 additions & 72 deletions
This file was deleted.

lib/subpath-entrypoints/esbuild.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import { compile } from "../template";
88

99
import { assertAndReturn } from "../helpers/assertions";
1010

11+
import debug from "../helpers/debug";
12+
1113
export function createEsbuildPlugin(
1214
configuration: Cypress.PluginConfigOptions,
1315
options: { prettySourceMap: boolean } = { prettySourceMap: false },
@@ -31,6 +33,18 @@ export function createEsbuildPlugin(
3133
(await fs.readFile(sourceMapLocation)).toString(),
3234
);
3335

36+
debug("before prettify", sourceMap.sources.slice(-2));
37+
38+
debug("configuration.projectRoot", configuration.projectRoot);
39+
debug("outfile", outfile);
40+
41+
for (const source of sourceMap.sources.slice(-2)) {
42+
debug(
43+
"normalized",
44+
path.normalize(path.join(path.dirname(outfile), source)),
45+
);
46+
}
47+
3448
/**
3549
* In leu of https://github.com/evanw/esbuild/issues/2218.
3650
*/
@@ -41,6 +55,8 @@ export function createEsbuildPlugin(
4155
);
4256
});
4357

58+
debug("after prettify", sourceMap.sources.slice(-2));
59+
4460
await fs.rm(sourceMapLocation);
4561

4662
const encoded = Buffer.from(JSON.stringify(sourceMap)).toString(

0 commit comments

Comments
 (0)