Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Versioning the retail react app #1209

Merged
merged 296 commits into from
May 29, 2023
Merged
Changes from 1 commit
Commits
Show all changes
296 commits
Select commit Hold shift + click to select a range
e2bb649
more fixes for out of sync package / lockfiles
bfeister Mar 14, 2023
f4790fc
add missing pwa-kit packages
yunakim714 Mar 14, 2023
e18076c
Fix regex matching patterns (#1057)
yunakim714 Mar 14, 2023
694104e
fix dependency dupes
bfeister Mar 14, 2023
7664191
Remove all console logs / cleanup / unnecessary code
bfeister Mar 15, 2023
2e1ec7f
fix some problems with final cleanup
bfeister Mar 15, 2023
80e29f9
merge
bfeister Mar 15, 2023
389a1df
Merge branch 'feature/template-extensibility-stress-test' into featur…
bfeister Mar 15, 2023
a456791
remove stress test files post-merge
bfeister Mar 15, 2023
de04c3e
added pdp page override with small customization
yunakim714 Mar 16, 2023
d1ca004
add constants file to spike project and tweak overrides values
yunakim714 Mar 16, 2023
c843b5c
Fix bug where `<path>/dir/index.(js|jsx|etc)` was being picked up by …
bfeister Mar 20, 2023
f675074
fix package.json scripts
bfeister Mar 21, 2023
478276d
fix falsy value defaulting causing errors in `path.join` fix broken `…
bfeister Mar 23, 2023
89795cc
delete `build/loadable-stat.json` from git, gitignore should work fro…
bfeister Mar 23, 2023
d7f8861
fix some file pathing issues in how SDK looks up default / universal …
bfeister Mar 23, 2023
71c037c
Perf enhancements, don't use regex all (.*) for module replacement, r…
bfeister Mar 23, 2023
c7e9be5
minor code style tweak
bfeister Mar 23, 2023
1306b57
cleanup
bfeister Mar 23, 2023
3f8939e
initial work on moving code to use resolver
yunakim714 Mar 27, 2023
f650221
fix getoverridepath and break on ^ imports
yunakim714 Mar 29, 2023
a5d3f01
add todos and comments
yunakim714 Mar 29, 2023
2eecb75
rewrite requestcontext.request for path with caret
yunakim714 Mar 30, 2023
3766818
perform overrideshashmap lookup for relative import
yunakim714 Mar 30, 2023
24bb5c3
merge v3 and regenerate lock files with version 2
yunakim714 Apr 3, 2023
1b42d87
progress
yunakim714 Apr 4, 2023
6fd8cdd
fix conflicts
yunakim714 Apr 5, 2023
7f3c364
fix package lockfiles that were out of sync
bfeister Apr 5, 2023
f0900d5
Revert "fix package lockfiles that were out of sync"
bfeister Apr 5, 2023
9a2252c
progress
yunakim714 Apr 5, 2023
f4e332e
fix out of sync lockfiles
bfeister Apr 5, 2023
b2cad1d
Merge branch 'v3' into feature/template-extensibility
bfeister Apr 6, 2023
b4ef5b9
merge feature branch back
yunakim714 Apr 6, 2023
93727d1
resolve merge conflicts
yunakim714 Apr 6, 2023
d664877
Merge branch 'v3' into feature/template-extensibility
bfeister Apr 6, 2023
a11bbcc
merge conflict
bfeister Apr 6, 2023
34dc3f0
resolve merge conflict
bfeister Apr 6, 2023
ca6a625
update spike project's engines / regen v3 lockfiles
bfeister Apr 6, 2023
3863783
regenerate lock files
yunakim714 Apr 6, 2023
c562975
add missing node engines
bfeister Apr 6, 2023
cee6d04
add missing useToast (bad merge)
bfeister Apr 6, 2023
dfb656b
updates from underlying template-retail-react-app
bfeister Apr 6, 2023
5f364df
drop unnecessary pages/product-detail override
bfeister Apr 6, 2023
cc30d3a
Merge branch 'feature/template-extensibility' into extensibility-code…
bfeister Apr 6, 2023
a22ef36
fix dupe useToast
bfeister Apr 6, 2023
74f1d24
progress on making `charles-solution` work
bfeister Apr 6, 2023
8b80436
initial pass at migration to `resolver.getHook('resolve').tapAsync` w…
bfeister Apr 7, 2023
b388e56
restore icons file and add extensible text to home
yunakim714 Apr 7, 2023
6541b8f
add some comments and construct hashmap in new plugin
yunakim714 Apr 10, 2023
a654ef3
working glob sync lookup??
yunakim714 Apr 11, 2023
2cb9cce
resolve lookup when there is no extension
yunakim714 Apr 11, 2023
fcd183b
add component slot for testing
yunakim714 Apr 11, 2023
7adceb1
fix some lookup errors
yunakim714 Apr 11, 2023
de69faa
migrate to new directory
bfeister Apr 12, 2023
592931e
remove unnecessary directory nesting, remove unnecessary files for "m…
bfeister Apr 12, 2023
9e4b187
add example of extending routes non-destructively, add example of qui…
bfeister Apr 12, 2023
32e0ae0
Update example route
bfeister Apr 12, 2023
c751bbf
add some demo examples of overrides
bfeister Apr 12, 2023
d287a16
cleanup
yunakim714 Apr 13, 2023
1dcb461
commit package name change
bfeister Apr 13, 2023
a8b593d
rewrite requests coming from underlying template
yunakim714 Apr 14, 2023
9d79b8e
cleanup
yunakim714 Apr 14, 2023
6ebbe1a
rename plugin file
yunakim714 Apr 14, 2023
38f3b92
resolve merge conflict
yunakim714 Apr 14, 2023
be3bb04
remove unnecessary build files
yunakim714 Apr 19, 2023
0cb80f4
rename to overrides
yunakim714 Apr 19, 2023
2b726b9
fix lookup errors
yunakim714 Apr 20, 2023
1ae6125
Merge branch 'v3' into feature/template-extensibility
bfeister Apr 25, 2023
940565a
Merge branch 'feature/template-extensibility' into extensibility-code…
bfeister Apr 25, 2023
e76ee0a
fix some broken upstream changes, eslint fixes
bfeister Apr 25, 2023
1f9ac65
fix bad merge conflict
bfeister Apr 25, 2023
7345439
Bring back the deleted package.json
vmarta Apr 26, 2023
f9b1477
Install new eslint plugin
vmarta Apr 26, 2023
71f21b2
No more relative imports in retail-react-app
vmarta Apr 26, 2023
16cca08
Create .prettierrc.yaml
vmarta Apr 26, 2023
4fcbf92
restore other deleted package lockfiles
bfeister Apr 26, 2023
a8d9021
fix some eslint issues
bfeister Apr 26, 2023
d3f6860
remove `^` imports and begin migrating logic away from previous API. …
bfeister Apr 26, 2023
ef25c00
bring back deleted package lockfiles
vmarta Apr 26, 2023
f0bed51
short circuit plugin temporarily, get webpack `alias` working for tem…
bfeister Apr 26, 2023
856427d
fix unreachable condition
bfeister Apr 26, 2023
e8cc5b4
wow... freaking works 🚀
bfeister Apr 26, 2023
f2ce238
cleanup, get `template-retail-react-app` working again
bfeister Apr 26, 2023
24622a6
cleanup
bfeister Apr 26, 2023
6df83a6
Create .eslintrc.js
vmarta Apr 27, 2023
edacf34
fix routes.jsx which no longer pulled relative template
bfeister Apr 27, 2023
1862c9e
make routes.jsx more concise
bfeister Apr 27, 2023
20c3042
update lockfiles
bfeister Apr 27, 2023
69fcd79
add jsconfig.json for IDEs to have magic `retail-react-app` be discov…
bfeister Apr 27, 2023
240a9d5
Merge branch 'v3' into feature/template-extensibility
bfeister Apr 28, 2023
78b6c53
Merge branch 'feature/template-extensibility' into feature/template-e…
bfeister Apr 28, 2023
4241eab
more cleanup
bfeister Apr 28, 2023
7bac071
change package.json key from `mobify` => `ccExtensibility`
bfeister Apr 28, 2023
dbaba8b
cleanup
bfeister Apr 28, 2023
06cb1f0
Final cleanup, remove console.logs, make `extendable` dynamic for int…
bfeister Apr 28, 2023
98c382b
fix straggler non-dynamic filepath
bfeister Apr 28, 2023
29e6e58
cleanup
bfeister Apr 28, 2023
c3fa1f3
remove code that shouldn't be in v3+
bfeister Apr 28, 2023
29f5bfc
bump-version script ignores the retail-react-app
vmarta May 1, 2023
ebf716d
See if this `--pre-dist-tag` works as expected
vmarta May 1, 2023
13ff1bf
Clean up code
vmarta May 1, 2023
a827459
Add todo
vmarta May 1, 2023
9b39529
sync package.json deps in extended example project
bfeister May 2, 2023
b8fe972
cleanup / pr feedback
bfeister May 2, 2023
02eb090
Update npm scripts
vmarta May 2, 2023
4014396
Disable `npm install` step
vmarta May 2, 2023
a33de20
List the packages' versions for easy review
vmarta May 2, 2023
50b2f09
Fix bug with versioning the root package file
vmarta May 2, 2023
67623a2
Merge branch 'feature/template-extensibility-algo-refactor' into vers…
vmarta May 2, 2023
7eea73f
A bit of refactoring
vmarta May 2, 2023
2d33647
Some clean up
vmarta May 2, 2023
148ea0a
pr feedback, great catch @kevinxh
bfeister May 3, 2023
4543a4d
fix problem with bad copy from underlying template file
bfeister May 3, 2023
11701dc
pr feedback / cleanup
bfeister May 3, 2023
e1aabf1
cleanup
bfeister May 3, 2023
c6b5e1f
Merge branch 'feature/template-extensibility-algo-refactor' into vers…
vmarta May 3, 2023
2fe771e
Update package-lock.json
vmarta May 3, 2023
83f07fe
WIP
vcua-mobify May 3, 2023
7e3b678
drop unneeded complexity
bfeister May 3, 2023
95488be
lockfiles
bfeister May 3, 2023
8b6f5fb
moving toward an array of `alias`es
bfeister May 4, 2023
a92b6ef
Generator: try downloading retail-react-app@latest from npm
vmarta May 4, 2023
7c3030c
Some refactoring
vmarta May 5, 2023
a29cc07
Refactor template extensibility functionality to use `resolve.alias` …
bfeister May 5, 2023
bdc1cfb
Tweak the versioning logic
vmarta May 5, 2023
7367fd7
These are optional options
vmarta May 5, 2023
9fe7f69
Use a new npm tag for testing purpose
vmarta May 5, 2023
d96c107
Merge branch 'feature/template-extensibility-algo-refactor' of github…
vcua-mobify May 5, 2023
ce151a1
add brand-logo with no clash for server side viewBox
bfeister May 5, 2023
034e2d7
add `request-processor.js` (required for worker.js to load) and fix b…
bfeister May 5, 2023
c9b13c4
Merge branch 'feature/template-extensibility-algo-refactor' into vers…
vmarta May 8, 2023
c680256
Add some comments
vmarta May 8, 2023
e0cbc17
Install shelljs
vmarta May 8, 2023
937fc25
retail-react-app: version updates scoped to this directory only
vmarta May 8, 2023
253874f
Update versioning logic in the root
vmarta May 8, 2023
ee66828
retail-react-app: simplify the versioning logic
vmarta May 8, 2023
3aad2da
fake sdk release v3
vmarta May 8, 2023
f8dcaa0
fake release of retail-react-app v1
vmarta May 8, 2023
a0086fd
lint fix
bfeister May 9, 2023
a9ec4bf
fix failing pwa-kit-react-sdk tests
bfeister May 9, 2023
2afa605
cleanup
bfeister May 9, 2023
94308c5
Merge branch 'v3' into feature/template-extensibility
bfeister May 9, 2023
2c6be38
regen package lockfiles
bfeister May 9, 2023
de5fd5c
Merge branch 'feature/template-extensibility' into feature/template-e…
bfeister May 9, 2023
5cb9f44
lint:fix
bfeister May 9, 2023
42a8bc1
Explore publishing certain packages only
vmarta May 9, 2023
342f294
Revert "fake release of retail-react-app v1"
vmarta May 9, 2023
13a7c26
Revert "fake sdk release v3"
vmarta May 9, 2023
58becd0
fix failing tests in CI re: `TextDecoder is not defined`
bfeister May 9, 2023
344a65e
take 2 attempting to fix TextDecoder global in jest
bfeister May 9, 2023
e7eba97
fix jest module mapper
bfeister May 9, 2023
79a1b55
fix jest moduleMapper config
bfeister May 9, 2023
e0c6c4b
REALLY fix jest moduleNameMapper config for new pathing + fix node `u…
bfeister May 9, 2023
e750b29
add brand-logo
bfeister May 9, 2023
f5b14d0
remove previously added `AbovePDP` Template Hook component
bfeister May 9, 2023
65293a2
replay #1128 from bad merge
bfeister May 9, 2023
a9fae57
eslint:fix for `retail-react-app` base paths
bfeister May 10, 2023
f382362
de-duplicate deps in bundle
bfeister May 10, 2023
eafa3b1
fix path defaulting, don't pass nullish value to path.resolve
bfeister May 10, 2023
151b96b
improve pathing for overridesDir in pwa-kit-dev webapack config + add…
bfeister May 10, 2023
61e32b8
Merge branch 'v3' into feature/template-extensibility-algo-refactor
bfeister May 10, 2023
868f9b2
fix pathing
bfeister May 11, 2023
fe7c3ce
fix pathing issue that was mysteriously UNFIXED
bfeister May 11, 2023
bf921b9
fix `worker.js` path
bfeister May 11, 2023
1115294
Merge branch 'feature/template-extensibility-algo-refactor' into vers…
vmarta May 11, 2023
bef1c95
Now also increment the pre-release version of the templates
vmarta May 11, 2023
0622c8c
Now allows for publishing one package only to npm
vmarta May 12, 2023
74d1191
fix app/static pathing in non-extensible builds
bfeister May 12, 2023
2250b4e
Make sure Lerna uses the exact versions (without carrot)
vmarta May 12, 2023
fe78312
Update package.json
vmarta May 12, 2023
a45c24b
What I expect to see from Ben's work
vmarta May 15, 2023
34bcdac
Some refactoring
vmarta May 15, 2023
509b145
Scale to multiple independent packages
vmarta May 15, 2023
335b52b
Make sure version updates are synced throughout
vmarta May 15, 2023
06cbf0c
Some refactoring
vmarta May 15, 2023
c432be9
Remove commented lines
vmarta May 15, 2023
fdda4b4
Merge branch 'feature/template-extensibility-algo-refactor' into vers…
vmarta May 16, 2023
a73346d
No need to do version-pinning ourselves
vmarta May 16, 2023
3fa148b
Add eslint and prettier
vmarta May 16, 2023
915ced6
Move script to allow reuse by future templates
vmarta May 16, 2023
3e57e0b
[Extensibility] Remove Einstein proxy and send Einstein events direct…
vcua-mobify May 16, 2023
dd5ba30
Merge branch 'feature/template-extensibility-algo-refactor' into vers…
vmarta May 16, 2023
412c3f8
Replace ExtendsCircularImportsPlugin with OverridesResolverPlugin (#1…
vcua-mobify May 16, 2023
ac0e092
Move `npm install` to the publishing step
vmarta May 16, 2023
b2de157
Update console log
vmarta May 17, 2023
b3d3ac1
Prep for fixing a bug
vmarta May 17, 2023
3a9419e
Updating a package version checks deps in other packages
vmarta May 17, 2023
6a53a96
remove irrelevant bundlesize check to pass CI
bfeister May 17, 2023
ee25ccd
Extract shared util functions
vmarta May 17, 2023
5195a2b
Consistency: add newline to EOF
vmarta May 18, 2023
371dd71
Get the name of the current package
vmarta May 18, 2023
d429521
Fix `vendor.js` inclusion of `retail-react-app` files (#1198)
bfeister May 18, 2023
8795667
Merge branch 'feature/template-extensibility-algo-refactor' into vers…
vmarta May 18, 2023
bddb532
replace relative with absolute path fetchTranslations (#1215)
alexvuong May 18, 2023
0ddd790
For now, make this package private
vmarta May 18, 2023
f074f3f
Iterate over the other packages only
vmarta May 18, 2023
8524c0f
Exclude these npm scripts from the smoke test
vmarta May 18, 2023
f5ce28b
Handle scenario of an SDK package with independent version
vmarta May 18, 2023
e1b5bfd
Refactor for unit testing, fix pathing issue from old version of file…
bfeister May 18, 2023
8e73a02
Add a 'sync' version of the script
vmarta May 18, 2023
d3407b3
Tweak conditions
vmarta May 18, 2023
20c9c9d
Some refactoring
vmarta May 18, 2023
0a8d6fb
Some refactoring
vmarta May 18, 2023
1af6712
Script to run a local npm registry
vmarta May 19, 2023
49f3338
Add todos for bug fixes
vmarta May 19, 2023
bf77140
Verify where the npm registry is
vmarta May 19, 2023
bc774ea
Merge branch 'feature/template-extensibility-algo-refactor' into vers…
vmarta May 19, 2023
534778c
Ignore this linting error
vmarta May 19, 2023
e9fac09
Update regex
vmarta May 19, 2023
7efe707
Add comments
vmarta May 19, 2023
00b17ea
Checks for clean working tree
vmarta May 19, 2023
86de1b7
Handle uncommitted changes
vmarta May 22, 2023
2a655a1
Make sure to update the package lock files
vmarta May 22, 2023
ea214fe
If error, make sure to still clean up
vmarta May 22, 2023
b29cb1f
Install from the root
vmarta May 22, 2023
ecb73d1
Some refactoring
vmarta May 22, 2023
d6f64ce
No longer needing this install step
vmarta May 22, 2023
116942b
For safety
vmarta May 22, 2023
f8501e2
If not on CI, make sure to publish to local npm
vmarta May 23, 2023
88b26c1
Only exit if there's an error
vmarta May 23, 2023
7dafb99
Merge branch 'develop' into feature/template-extensibility
bfeister May 23, 2023
9585094
remove demo extensible app in light of soon-to-be-merged PR from @bendvc
bfeister May 23, 2023
e2c82d1
lockfiles from reaact18 / chakra2
bfeister May 23, 2023
851366a
Feature/template extensibility (#1162)
bfeister May 23, 2023
2b40687
support windows file paths
bfeister May 23, 2023
911f1f9
Merge branch 'feature/template-extensibility' into versioning-retail-…
bfeister May 24, 2023
9bd5fea
Remove package
vmarta May 24, 2023
1b05f2c
Make sure versions are all 3.0.0-dev
vmarta May 24, 2023
c5f97b7
Update package lock files
vmarta May 24, 2023
7e82d8e
Follow up to recent merge conflicts
vmarta May 24, 2023
c8a2b92
Revert these changes to the generator
vmarta May 24, 2023
31ae716
Fix issue with failed tests because of react query dev tools
bendvc May 23, 2023
33b3058
Let the output of `npm version` pass through
vmarta May 24, 2023
cbf8768
Revert "Let the output of `npm version` pass through"
vmarta May 24, 2023
8c06d52
Make sure to `npm install` after updating dependencies
vmarta May 24, 2023
31cb7a8
Prepare to consolidate all of the versioning scripts
vmarta May 25, 2023
2ecacca
Move the rest of scripts into the monorepo root
vmarta May 26, 2023
9c2e3db
commerce-sdk-react now has its own version
vmarta May 26, 2023
49cc1c4
Use correct package name
vmarta May 26, 2023
61eceb3
Add todos
vmarta May 26, 2023
315be52
Reconsider where to do `npm install`
vmarta May 26, 2023
e1059c2
Clean up
vmarta May 26, 2023
8053cfa
Remove todo
vmarta May 26, 2023
1612d55
Merge branch 'develop' into versioning-retail-react-app
vmarta May 26, 2023
95a5cba
Remove unused dependency
vmarta May 26, 2023
3210576
Some code cleanup
vmarta May 26, 2023
bb3fc73
Merge branch 'develop' into versioning-retail-react-app
vmarta May 26, 2023
7f66aec
Move the versioning scripts into their own folder
vmarta May 29, 2023
0fcf9f3
Merge branch 'develop' into versioning-retail-react-app
vmarta May 29, 2023
6ea4a4a
Delete run-local-npm.js
vmarta May 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 38 additions & 4 deletions packages/pwa-kit-dev/src/configs/webpack/overrides-charles.js
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@ class OverlayResolverPlugin {
[end, rest]
)
})
console.log('this.overridesHashMap', this.overridesHashMap)
}

isRelevant(p) {
@@ -196,6 +197,7 @@ class OverlayResolverPlugin {
this.isAppBaseRelative(requestContext.path) &&
requestContext.request.startsWith('.')
) {

// app base request relative
// ex - /Users/yunakim/cc-pwa/pwa-kit/packages/spike-extendend-retail-app/pwa-kit/overrides/app/components/header
var resolvedPath = path.resolve(requestContext.path, requestContext.request)
@@ -205,7 +207,6 @@ class OverlayResolverPlugin {
let overlayRelative = this.toOverlayRelative(resolvedPath)

let targetFile, target
const vars = [overlayRelative, this._allSearchDirs, resolver.options.extensions]
try {
targetFile = this.findFileMap(
overlayRelative,
@@ -235,6 +236,41 @@ class OverlayResolverPlugin {
} else {
return callback()
}
} else if (requestContext.request.startsWith('.')) {
// if request looks like '../../components/product-detail/above-fold'
// and the path looks like '/Users/yunakim/cc-pwa/pwa-kit/packages/template-retail-react-app/app/pages/product-detail'
const overlayRelative = requestContext.request.replaceAll('../', '')
let targetFile, target

if (requestContext.request === '../../components/product-detail/above-fold') {
console.log('overlayRelative', overlayRelative)
}
try {
targetFile = this.findFileMap(
overlayRelative,
this._allSearchDirs,
resolver.options.extensions
)
if (targetFile) {
console.log('~FOUND', targetFile)
}

if (targetFile) {
target = resolver.ensureHook('resolved')
requestContext.path = targetFile
resolver.doResolve(
target,
requestContext,
`${this.constructor.name} found base override file`,
resolveContext,
callback
)
} else {
return callback()
}
} catch (e) {
return callback()
}
} else if (
requestContext.request &&
this.isAppBaseRelative(requestContext.request)
@@ -267,9 +303,7 @@ class OverlayResolverPlugin {
return callback()
}
} else {
if (requestContext.request === '../../components/product-detail/above-fold') {
console.log('MISSING THIS')
}

callback()
}
}.bind(this)
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ const CheckoutConfirmation = loadable(
const LoginRedirect = loadable(() => import('^retail-react-app/app/pages/login-redirect'), {
fallback,
})
const ProductDetail = loadable(() => import('./pages/product-detail'), {
const ProductDetail = loadable(() => import('^retail-react-app/app/pages/product-detail'), {
fallback,
})
const ProductList = loadable(() => import('^retail-react-app/app/pages/product-list'), {fallback})