Skip to content

Commit

Permalink
build: use rollup --failAfterWarnings
Browse files Browse the repository at this point in the history
We've got to a point where we've eliminated almost all build errors.
We previously did not notice these because they only show up as
warnings in CI, without making CI fail.

Use rollup --failAfterWarnings so that CI fails when a build error
is emitted.

Leave ui-spacetimechart and ui-trackoccupancydiagram alone, because
these still have a failure due to a circular dependency:

    (!) [plugin typescript] ../ui-spacetimechart/src/lib/types.ts (6:8): @rollup/plugin-typescript TS2307: Cannot find module '@osrd-project/ui-trackoccupancydiagram/dist/components/types' or its corresponding type declarations.
    /home/runner/work/osrd-ui/osrd-ui/ui-spacetimechart/src/lib/types.ts:6:8

    6 } from '@osrd-project/ui-trackoccupancydiagram/dist/components/types';
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Simon Ser <[email protected]>
  • Loading branch information
emersion committed Feb 19, 2025
1 parent 2163a9b commit 04acca9
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 13 deletions.
3 changes: 1 addition & 2 deletions ui-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
}
},
"scripts": {
"rollup": "rollup -c",
"clean": "rimraf dist",
"build": "npm run rollup",
"build": "rollup -c --failAfterWarnings",
"watch": "rollup -c -w",
"test": "vitest run",
"prepublishOnly": "npm run clean && npm run build",
Expand Down
4 changes: 1 addition & 3 deletions ui-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@
},
"scripts": {
"svgo": "svgo icons --config svgo.config.cjs",
"build-components": "node ./scripts/build.js",
"rollup": "rollup -c",
"clean": "rimraf dist",
"build": "npm run build-components && npm run rollup",
"build": "node ./scripts/build.js && rollup -c --failAfterWarnings",
"prepublishOnly": "npm run clean && npm run build"
},
"peerDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions ui-manchette-with-spacetimechart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
}
},
"scripts": {
"rollup": "rollup -c",
"clean": "rimraf dist",
"build": "npm run rollup",
"build": "rollup -c --failAfterWarnings",
"watch": "rollup -c -w",
"prepublishOnly": "npm run clean && npm run build",
"lint": "eslint src --max-warnings 0",
Expand Down
3 changes: 1 addition & 2 deletions ui-manchette/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
}
},
"scripts": {
"rollup": "rollup -c",
"clean": "rimraf dist",
"build": "npm run rollup",
"build": "rollup -c --failAfterWarnings",
"watch": "rollup -c -w",
"prepublishOnly": "npm run clean && npm run build",
"lint": "eslint src --max-warnings 0",
Expand Down
3 changes: 1 addition & 2 deletions ui-speedspacechart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
}
},
"scripts": {
"rollup": "rollup -c",
"clean": "rimraf dist",
"build": "npm run rollup",
"build": "rollup -c --failAfterWarnings",
"watch": "rollup -c -w",
"test": "vitest run --dir src/__tests__",
"prepublishOnly": "npm run clean && npm run build",
Expand Down
3 changes: 1 addition & 2 deletions ui-warped-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
}
},
"scripts": {
"rollup": "rollup -c",
"clean": "rimraf dist",
"build": "npm run rollup",
"build": "rollup -c --failAfterWarnings",
"watch": "rollup -c -w",
"prepublishOnly": "npm run clean && npm run build",
"lint": "eslint src --max-warnings 0",
Expand Down

0 comments on commit 04acca9

Please sign in to comment.