Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
edfeba6
upgrade esbuild to 0.17.19 to preserve directive `"use client"`for Re…
mark-tate Jun 7, 2023
854b5de
update Next to 13.4.4 to resolve issue with loading React Server Comp…
mark-tate Jun 7, 2023
1506787
remove context from store for rsc support
mark-tate Jun 11, 2023
55eea22
convert site to use app router
mark-tate Jun 11, 2023
5a6dcd3
update `next-mdx/remote' to support rsc
mark-tate Jun 11, 2023
805e9e3
add `'use client'` directive to components for app router support
mark-tate Jun 11, 2023
771de08
add `'use client'` directive to site components for app router support
mark-tate Jun 11, 2023
f5f63c1
refactor layouts to work with app router
mark-tate Jun 11, 2023
8ef1943
remove markdown components into `@jpmorganchase/mosaic-components-cli…
mark-tate Jun 19, 2023
2b78e3c
move mdx export from `@jpmorganchase/mosaic-site-components` to `@jpm…
mark-tate Jun 19, 2023
342328d
new packages for client-side MDX components called `@jpmorganchase/mo…
mark-tate Jun 19, 2023
186680f
new `@jpmorganchase/mosaic-components-server` package to support Remo…
mark-tate Jun 19, 2023
b3dadf5
new package for icons assets `@jpmorganchase/mosaic-icons`
mark-tate Jun 19, 2023
97a5e5a
move ThemeProvider to `@jpmorganchase/site-components` to remove depe…
mark-tate Jun 19, 2023
85433ab
simplify the configuration of site by moving providers to site compon…
mark-tate Jun 23, 2023
d1d4b78
remove un-necessary 'use client' directives from site-components
mark-tate Jun 23, 2023
db73583
remove open-api and lab components from default component packages
mark-tate Jun 27, 2023
268181f
add `@jpmorganchase/site-loaders` which add loaders to site for suppo…
mark-tate Jun 27, 2023
7c5a203
rebase on beta.38
mark-tate Jul 6, 2023
42da9eb
move favicon from static images to app dir and don't reuse for logo
mark-tate Jul 8, 2023
0c42456
move next-auth to page router to avoid clash with dynamic routes in a…
mark-tate Jul 8, 2023
cf3e24c
refactor MDX loader to support static site exports
mark-tate Jul 8, 2023
5814a06
add 404 and 500 support
mark-tate Jul 9, 2023
c29f04c
upgrade Next to 13.4.9 with improved build times
mark-tate Jul 10, 2023
a662a6c
add un-optimized support for SearchInput
mark-tate Jul 11, 2023
e3d321e
remove duplicate local env var for NEXTAUTH_URL
mark-tate Jul 11, 2023
445e5e0
remove redundant `@jpmorganchase/mosaic-site-middleware` replaced by …
mark-tate Jul 11, 2023
bed0381
remove snaphot support
mark-tate Jul 11, 2023
debafac
remove `transpilePackages` from `next.config.ts`
mark-tate Jul 11, 2023
57323d4
update Next to 13.4.10
mark-tate Jul 16, 2023
91cf27e
rebase on beta.39
mark-tate Jul 18, 2023
5f00ef0
generate static pages for site for creating a build
mark-tate Jul 18, 2023
2a71440
ensure static sites 404 pages are served when file not found
mark-tate Jul 23, 2023
c5e43db
rebase on beta.40
mark-tate Jul 23, 2023
3f7df12
rebased onto beta.47
mark-tate Sep 12, 2023
44353fd
rebase on beta.51
mark-tate Oct 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ tsconfig.tsbuildinfo

# Deployment
packages/rig
packages/site/out

# Test Results
coverage
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ patches
LICENSE
*.png
*.hbs
*.ico

**/build
**/dist
Expand Down
2 changes: 1 addition & 1 deletion docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sharedConfig:
header:
homeLink: /mosaic/index
title: Mosaic (BETA)
logo: /img/favicon.png
logo: /img/logo.png
searchNamespace: mosaic
menu:
- title: Getting Started
Expand Down
2 changes: 1 addition & 1 deletion docs/test/layouts/detail-highlight.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameOverrides:
header:
homeLink: /mosaic/index
title: Mosaic (BETA)
logo: /img/favicon.png
logo: /img/logo.png
searchNamespace: mosaic
menu:
- title: Docs
Expand Down
2 changes: 1 addition & 1 deletion docs/test/layouts/detail-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameOverrides:
header:
homeLink: /mosaic/index
title: Mosaic (BETA)
logo: /img/favicon.png
logo: /img/logo.png
searchNamespace: mosaic
menu:
- title: Docs
Expand Down
2 changes: 1 addition & 1 deletion docs/test/layouts/detail-technical.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameOverrides:
header:
homeLink: /mosaic/index
title: Mosaic (BETA)
logo: /img/favicon.png
logo: /img/logo.png
searchNamespace: mosaic
menu:
- title: Docs
Expand Down
2 changes: 1 addition & 1 deletion docs/test/layouts/edit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameOverrides:
header:
homeLink: /mosaic/index
title: Mosaic (BETA)
logo: /img/favicon.png
logo: /img/logo.png
searchNamespace: mosaic
menu:
- title: Docs
Expand Down
2 changes: 1 addition & 1 deletion docs/test/layouts/full-width.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameOverrides:
header:
homeLink: /mosaic/index
title: Mosaic (BETA)
logo: /img/favicon.png
logo: /img/logo.png
searchNamespace: mosaic
menu:
- title: Docs
Expand Down
2 changes: 1 addition & 1 deletion docs/test/layouts/landing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameOverrides:
header:
homeLink: /mosaic/index
title: Mosaic (BETA)
logo: /img/favicon.png
logo: /img/logo.png
searchNamespace: mosaic
menu:
- title: Docs
Expand Down
2 changes: 1 addition & 1 deletion docs/test/layouts/newsletter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameOverrides:
header:
homeLink: /mosaic/index
title: Mosaic (BETA)
logo: /img/favicon.png
logo: /img/logo.png
searchNamespace: mosaic
menu:
- title: Docs
Expand Down
2 changes: 1 addition & 1 deletion docs/test/layouts/product-discover.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameOverrides:
header:
homeLink: /mosaic/index
title: Mosaic (BETA)
logo: /img/favicon.png
logo: /img/logo.png
searchNamespace: mosaic
menu:
- title: Docs
Expand Down
2 changes: 1 addition & 1 deletion docs/test/layouts/product-preview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameOverrides:
header:
homeLink: /mosaic/index
title: Mosaic (BETA)
logo: /img/favicon.png
logo: /img/logo.png
searchNamespace: mosaic
menu:
- title: Docs
Expand Down
1 change: 1 addition & 0 deletions jest.config.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const moduleNameMapper = {
'.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/__mocks__/file-stub.js',
'@jpmorganchase/mosaic-components': '<rootDir>/packages/components/dist/index.js',
'@jpmorganchase/mosaic-icons': '<rootDir>/packages/icons/dist/index.js',
'@jpmorganchase/mosaic-store': '<rootDir>/packages/store/dist/index.js',
'@jpmorganchase/mosaic-theme': '<rootDir>/packages/theme/dist/index.js'
};
Expand Down
14 changes: 5 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
"engines": {
"node": ">=16.10.0 || >=18.0.0"
},
"bin": {
"mosaic": "yarn workspace @jpmorganchase/mosaic-cli"
},
"scripts": {
"build:site": "turbo run build --filter=@jpmorganchase/mosaic-site",
"build": "turbo run build",
Expand All @@ -27,20 +24,19 @@
"e2e:codegen": "turbo run e2e:codegen --filter=@jpmorganchase/mosaic-site",
"e2e:setup": "npx playwright install",
"e2e": "turbo run e2e --filter=@jpmorganchase/mosaic-site",
"export:static": "turbo run export:static --filter=@jpmorganchase/mosaic-site",
"gen:rig": "turbo run create:rig copy:rig:images --filter=//",
"gen:site": "turbo run create:site copy:site:images --filter=//",
"gen:snapshot": "turbo run gen:snapshot --filter=@jpmorganchase/mosaic-site",
"gen": "turbo run gen:site gen:snapshot --filter=//",
"gen": "turbo run gen:site export:static --filter=//",
"lint": "turbo run lint",
"mosaic": "node ./packages/cli/dist/index.js",
"postinstall": "patch-package",
"prepare": "husky install",
"prettier:ci": "prettier --check .",
"prettier": "prettier --write .",
"serve:rig": "turbo run serve --filter=@jpmorganchase/mosaic-rig",
"serve:snapshot:file": "turbo run serve:snapshot:file --filter=@jpmorganchase/mosaic-site",
"serve:snapshot:s3": "turbo run serve:snapshot:s3 --filter=@jpmorganchase/mosaic-site",
"serve": "turbo run serve --filter=@jpmorganchase/mosaic-site",
"serve:static": "turbo run serve:static --filter=@jpmorganchase/mosaic-site",
"start": "turbo run start --filter=@jpmorganchase/mosaic-site",
"test:client": "jest --config ./jest.config.client.js --coverage",
"test:server": "jest --config ./jest.config.server.js --coverage",
Expand All @@ -66,8 +62,8 @@
"@vanilla-extract/esbuild-plugin": "^2.0.0",
"concurrently": "^7.1.0",
"del-cli": "^4.0.1",
"esbuild": "0.14.35",
"esbuild-node-externals": "^1.0.2",
"esbuild": "^0.17.19",
"esbuild-node-externals": "^1.7.0",
"eslint": "^7.23.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
Expand Down
7 changes: 4 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"scripts": {
"build": "npm-run-all --parallel build:*",
"build:types": "tsc",
"build:cli": "node ./scripts/bundle.js",
"build:cli": "node ./scripts/bundle.mjs",
"clean": "rm -fr dist",
"docker:build": "docker build . --tag mosaic-fs:latest",
"docker:start": "docker run -it --rm --ipc=host -p 8080:8080 --mount source=docs,destination=/app/docs --network mosaic-net --name mosaic-fs mosaic-fs:latest",
Expand All @@ -38,8 +38,8 @@
},
"devDependencies": {
"@jpmorganchase/mosaic-types": "^0.1.0-beta.51",
"esbuild": "0.14.35",
"esbuild-node-externals": "^1.0.2",
"esbuild": "0.17.19",
"esbuild-node-externals": "^1.7.0",
"fast-glob": "^3.2.7"
},
"dependencies": {
Expand All @@ -49,6 +49,7 @@
"@jpmorganchase/mosaic-source-local-folder": "^0.1.0-beta.51",
"@aws-sdk/client-s3": "^3.359.0",
"@fastify/middie": "^8.3.0",
"@fastify/static": "^6.11.2",
"commander": "^9.4.1",
"cors": "^2.8.5",
"deepmerge": "^4.2.2",
Expand Down
48 changes: 0 additions & 48 deletions packages/cli/scripts/bundle.js

This file was deleted.

45 changes: 45 additions & 0 deletions packages/cli/scripts/bundle.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import fs from 'fs-extra';
import glob from 'fast-glob';
import esbuild from 'esbuild';
import { nodeExternalsPlugin } from 'esbuild-node-externals';

const args = process.argv.slice(2);
const watchEnabled = args[0] === 'watch';
const packageName = process.env.npm_package_name;

try {
const context = await esbuild.context({
entryPoints: glob.sync(['src/**/*.ts?(x)', 'src/*.ts?(x)'], {
ignore: ['**/__tests__', 'src/labs']
}),
outdir: './dist',
outExtension: { '.js': '.mjs' },
bundle: true,
sourcemap: false,
splitting: true,
minify: true,
format: 'esm',
target: ['es2022', 'node18'],
platform: 'node',
plugins: [nodeExternalsPlugin()]
});
await context.rebuild();
if (watchEnabled) {
await context.watch();
}
await context.serve();
context.dispose();
} catch (e) {
if (e.errors && e.errors.length > 0) {
console.group(`!!!!!!! ${packageName} build errors !!!!!!!`);
console.error(e.errors);
console.groupEnd();
}

if (e.warnings && e.warnings.length > 0) {
console.group(`!!!!!!! ${packageName} build warnings !!!!!!!`);
console.error(e.warnings);
console.groupEnd();
}
process.exit(1);
}
105 changes: 0 additions & 105 deletions packages/cli/src/build.ts

This file was deleted.

Loading