Skip to content

Commit 92dba61

Browse files
authored
[46] parallel filesystem convention example (#59)
1 parent 710d15f commit 92dba61

File tree

93 files changed

+3155
-1563
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+3155
-1563
lines changed

.github/workflows/checks.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
sparse-checkout: |
6868
.git/**
6969
sparse-checkout-cone-mode: false
70-
70+
7171
- name: Workaround actions/checkout#1475
7272
run: git config core.sparseCheckout false
7373
shell: bash
@@ -89,7 +89,7 @@ jobs:
8989
working-directory: ./test/automation
9090

9191
- name: Upload results for shard
92-
uses: actions/upload-artifact@v4
92+
uses: actions/upload-artifact@v5
9393
if: ${{ !cancelled() }}
9494
with:
9595
name: blob-report-${{ matrix.type }}-${{ runner.os }}
@@ -117,7 +117,7 @@ jobs:
117117
uses: ./.github/actions/setup-node
118118

119119
- name: Download blob reports from GitHub Actions Artifacts
120-
uses: actions/download-artifact@v4
120+
uses: actions/download-artifact@v5
121121
with:
122122
path: all-blob-reports
123123
pattern: blob-report-*
@@ -127,7 +127,7 @@ jobs:
127127
run: npx playwright merge-reports --reporter=html ./all-blob-reports
128128

129129
- name: Upload HTML report
130-
uses: actions/upload-artifact@v4
130+
uses: actions/upload-artifact@v5
131131
with:
132132
name: html-report--attempt-${{ github.run_attempt }}
133133
path: playwright-report

.github/workflows/release.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777

7878
- name: Upload updated package.json to artifact
7979
if: steps.pre-release-version.outcome == 'success'
80-
uses: actions/upload-artifact@v4
80+
uses: actions/upload-artifact@v5
8181
with:
8282
name: ${{ format('{0}-{1}', env.PACKAGE_ARTIFACT, matrix.package.shortName) }}
8383
path: |
@@ -96,7 +96,7 @@ jobs:
9696

9797
- name: Upload to publish matrix
9898
if: steps.artifact-json.outcome == 'success'
99-
uses: actions/upload-artifact@v4
99+
uses: actions/upload-artifact@v5
100100
with:
101101
name: ${{ format('{0}-{1}', env.UPDATED_MATRIX_ARTIFACT, matrix.package.shortName) }}
102102
path: |
@@ -111,7 +111,7 @@ jobs:
111111
matrix: ${{ steps.updatedPackages.outputs.packageArray }}
112112
name: 👨‍🍳 Prepare Publishing Matrix
113113
steps:
114-
- uses: actions/download-artifact@v4
114+
- uses: actions/download-artifact@v5
115115
with:
116116
pattern: ${{ env.UPDATED_MATRIX_ARTIFACT }}-*
117117
merge-multiple: true
@@ -151,7 +151,7 @@ jobs:
151151
.github/**
152152
sparse-checkout-cone-mode: false
153153

154-
- uses: actions/download-artifact@v4
154+
- uses: actions/download-artifact@v5
155155
with:
156156
pattern: ${{ env.PACKAGE_ARTIFACT }}-*
157157
merge-multiple: true
@@ -175,7 +175,7 @@ jobs:
175175
shell: bash
176176

177177
- name: Upload (potentially reified) package.jsons to artifact
178-
uses: actions/upload-artifact@v4
178+
uses: actions/upload-artifact@v5
179179
with:
180180
name: ${{ env.PACKAGE_ARTIFACT }}
181181
path: ${{ steps.createPathArray.outputs.pathArray }}
@@ -204,7 +204,7 @@ jobs:
204204
- name: Checkout code
205205
uses: actions/checkout@v4
206206

207-
- uses: actions/download-artifact@v4
207+
- uses: actions/download-artifact@v5
208208
with:
209209
name: ${{ env.PACKAGE_ARTIFACT }}
210210

docs/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ N.B. See changelogs for individual packages, where most change will occur:
1414

1515
This log covers the [monorepo](https://en.wikipedia.org/wiki/Monorepo).
1616

17+
## [0.13.1] - 2025-11-14
18+
19+
### Changed
20+
21+
- Moved to v5 of [`upload-artifact`](https://github.com/actions/upload-artifact) and [`download-artifact`](https://github.com/actions/download-artifact) actions
22+
- updated `eslint` to 9.38.0
23+
1724
## [0.13.0] - 2025-10-21
1825

1926
### Changed

examples/express/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,13 @@ Some example applications based on an [express](https://expressjs.com/) router
99
2. [config](./src/routes/config/README.md)
1010

1111
This example shows the use of the [`react-pointcuts`](../../packages/react-pointcuts/docs/README.md), [`features`](../../packages/features/docs/README.md), [`ssr`](../../packages/ssr/docs/README.md) and [`webpack`](../../packages/webpack/docs/README.md) packages.
12+
13+
3. [parallel-folder-convention](./src/routes/parallel-folder-convention/README.md)
14+
15+
This example shows the use of the [`react-pointcuts`](../../packages/react-pointcuts/docs/README.md), [`features`](../../packages/features/docs/README.md), [`ssr`](../../packages/ssr/docs/README.md) and [`webpack`](../../packages/webpack/docs/README.md) packages.
16+
17+
It has a bespoke filesystem convention, with parallel directory hierarchies containing arbitrary replacements and patches of various types of module, including:
18+
- constants
19+
- css
20+
- react components
21+
- [redux slices](https://redux.js.org/tutorials/essentials/part-2-app-structure#redux-slices)

examples/express/docs/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.4.0] - 2025-10-21
9+
10+
### Changed
11+
12+
- added "parallel folder convention" example
13+
14+
### Fixed
15+
16+
- went ltd cmdr data on the contraction "I'm", converting to "I am" since the "large" example inexplicably no longer text-matched (space before apostrophe)
17+
818
## [0.3.1] - 2025-10-21
919

1020
### Fixed

examples/express/eslint.config.mjs

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,43 @@
11
import examplesConfig from "../eslint.config.mjs";
22
import asosConfigReact from "../../peripheral/eslint-config-asosconfig/react.js";
33
import asosConfigServer from "../../peripheral/eslint-config-asosconfig/server.js";
4+
import parser from "@typescript-eslint/parser";
5+
import globals from "globals";
46

57
export default [
68
...[...asosConfigReact, ...asosConfigServer].map((config) => ({
7-
files: ["**/*.js"],
9+
files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
810
...config,
911
settings: {
12+
"import/resolver": {
13+
typescript: {
14+
alwaysTryTypes: true,
15+
project: "./src/routes/parallel-folder-convention/tsconfig.json"
16+
}
17+
},
1018
react: {
1119
version: "detect"
1220
}
21+
},
22+
rules: {
23+
...config.rules,
24+
"react/prop-types": "off",
25+
"prettier/prettier": [
26+
"error",
27+
{
28+
trailingComma: "none",
29+
endOfLine: "auto"
30+
}
31+
]
32+
},
33+
languageOptions: {
34+
...config.languageOptions,
35+
parser,
36+
globals: {
37+
CLIENT: "readonly",
38+
...globals.browser,
39+
...globals.node
40+
}
1341
}
1442
})),
1543
...examplesConfig,

examples/express/package.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web-toggle-point-express-example",
3-
"version": "0.3.1",
3+
"version": "0.4.0",
44
"type": "module",
55
"engines": {
66
"node": ">=20.6.0"
@@ -16,32 +16,38 @@
1616
"prelint": "npm run build-dependencies",
1717
"lint": "npm run lint:code && npm run lint:docs",
1818
"lint:fix": "npm run lint:code -- --fix && npm run lint:docs -- --fix",
19-
"lint:code": "eslint src --flag unstable_config_lookup_from_file",
20-
"lint:docs": "eslint *.md --flag unstable_config_lookup_from_file"
19+
"lint:code": "eslint src --flag v10_config_lookup_from_file",
20+
"lint:docs": "eslint *.md --flag v10_config_lookup_from_file"
2121
},
2222
"dependencies": {
23-
"@asos/web-toggle-point-react-pointcuts": "file:../../packages/react-pointcuts",
2423
"@asos/web-toggle-point-features": "file:../../packages/features",
24+
"@asos/web-toggle-point-react-pointcuts": "file:../../packages/react-pointcuts",
2525
"@asos/web-toggle-point-ssr": "file:../../packages/ssr",
2626
"@asos/web-toggle-point-webpack": "file:../../packages/webpack",
27+
"@reduxjs/toolkit": "^2.8.2",
2728
"cross-env": "^7.0.3",
2829
"express": "^4.17.1",
2930
"http-status-codes": "^2.3.0",
3031
"react": ">=17",
31-
"react-dom": ">=17"
32+
"react-dom": ">=17",
33+
"react-redux": "^9.2.0",
34+
"valtio": "^2.1.5"
3235
},
3336
"devDependencies": {
3437
"babel-loader": "^9.2.1",
3538
"css-loader": "^7.1.2",
39+
"enhanced-tsconfig-paths-webpack-plugin": "^0.2.3",
3640
"mini-css-extract-plugin": "^2.9.2",
3741
"path-exists-cli": "^2.0.0",
3842
"prop-types": "^15.7.2",
43+
"source-map-loader": "^5.0.0",
3944
"style-loader": "^4.0.0",
45+
"ts-loader": "^9.5.2",
4046
"webpack": "^5.38.1",
4147
"webpack-cli": "^4.7.2",
4248
"webpack-node-externals": "^3.0.0"
4349
},
4450
"peerDependencies": {
45-
"@playwright/test": "^1.49.0"
51+
"@playwright/test": "^1.56.0"
4652
}
4753
}

examples/express/src/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import express from "express";
22
import animalsRouter from "./routes/animals/router.js";
33
import configRouter from "./routes/config/router.js";
4+
import parallelFolderConventionRouter from "./routes/parallel-folder-convention/router.tsx";
45

56
const app = express();
67
const PORT = process.env.PORT;
78

89
app.use("/animals", animalsRouter);
910
app.use("/config", configRouter);
11+
app.use("/parallel-folder-convention", parallelFolderConventionRouter);
1012
app.get("/", (_, response) => {
1113
response.send(`<!DOCTYPE html>
1214
<html lang="en">
@@ -39,6 +41,7 @@ app.get("/", (_, response) => {
3941
<ul>
4042
<li><a href="/animals">Version header with nodeRequestScoped store</a></li>
4143
<li><a href="/config">.env config with ssrBackedReactContext store for initial value in browser</a></li>
44+
<li><a href="/parallel-folder-convention">parallel folder convention, with varied constants, css, react & redux</a></li>
4245
</ul>
4346
</body>
4447
</html>`);

examples/express/src/routes/config/Component.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const Component = () => (
22
<div
33
style={{ fontSize: "18pt", width: "50vw", minWidth: "6em", height: "50vh" }}
44
>
5-
I'm Medium
5+
I am Medium
66
</div>
77
);
88

examples/express/src/routes/config/__variants__/div-style/Large/Component.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const Component = ({ backgroundColor }) => (
88
backgroundColor
99
}}
1010
>
11-
I'm Large
11+
I am Large
1212
</div>
1313
);
1414

0 commit comments

Comments
 (0)