-
Notifications
You must be signed in to change notification settings - Fork 4
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
Build Milestone: frontend-build migrated into the library #5
Conversation
PR #258 Co-authored-by: Abdullah Waheed <[email protected]>
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](json5/json5@v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
chore: Remove irrelevant webpack dev server clauses in production build fix: Test configuration for typescript chore: Add documentation for using tsconfig.json in client repos chore: Update tsconfig.json to use noImplicitAny=false for now chore: Update tsconfig.json libs, and correct exclude list
…cript feat: Enable typescript for production builds
fix: Fix and additional documentation for tsconfig
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. - [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases) - [Commits](SamVerschueren/decode-uri-component@v0.2.0...v0.2.2) --- updated-dependencies: - dependency-name: decode-uri-component dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Bumps [cookiejar](https://github.com/bmeck/node-cookiejar) from 2.1.3 to 2.1.4. - [Release notes](https://github.com/bmeck/node-cookiejar/releases) - [Commits](https://github.com/bmeck/node-cookiejar/commits) --- updated-dependencies: - dependency-name: cookiejar dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
The .github/workflows/self-assign-issue.yml workflow is missing or needs an update to stay in sync with the current standard for this workflow as defined in the `.github` repo of the `openedx` GitHub org.
…yml`. The .github/workflows/add-remove-label-on-comment.yml workflow is missing or needs an update to stay in sync with the current standard for this workflow as defined in the `.github` repo of the `openedx` GitHub org.
…d.yml`. The .github/workflows/add-depr-ticket-to-depr-board.yml workflow is missing or needs an update to stay in sync with the current standard for this workflow as defined in the `.github` repo of the `openedx` GitHub org.
* feat: added CSS custom media query support * refactor: added PostCssCustom media for dev-stage and prod webpack configs `@edx/frontend-build` now supports custom CSS media queries in order to support media query definitions using CSS variables (not natively supported by CSS). To do so, it uses PostCSS Custom Media to let you define `@custom-media` in CSS following the Custom Media Specification: https://www.w3.org/TR/mediaqueries-5/#at-ruledef-custom-media.
Update standard workflow files.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Bumps [webpack](https://github.com/webpack/webpack) from 5.75.0 to 5.76.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](webpack/webpack@v5.75.0...v5.76.0) --- updated-dependencies: - dependency-name: webpack dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Webpack tree shaking depends on “sideEffects” being false in package.json so that it knows that our code has no side effects. Tree shaking relies on imports/exports to understand what code is in use, so if a file has side effects - not just an export, which it shouldn’t do - then it may be tree shaken mistakenly. This field indicates that no code in the repository has side effects.
The ADR is about all the libraries we’re going to migrate into frontend-base, not just frontend-build.
Added steps to add `frontend-base` to a local MFE checkout instead of `frontend-build`. This is very similar to what developers will ultimately do to cut over to `frontend-base` from `frontend-build` in the future.
Thanks for the pull request, @davidjoy! What's next?Please work through the following steps to get your changes ready for engineering review: 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently unmaintained. To get help with finding a technical reviewer, tag the community contributions project manager for this PR in a comment and let them know that your changes are ready for review:
Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Currently just a list of notes about required/breaking changes in the repo that MFEs will need to address when migrating.
A prior commit removed a peerDependency on react in the top-level package.json. This meant that react was no longer installed in the node_modules directory. When eslint runs, that means it encountered this error: <local path>/frontend-base/cli/test-app/src/Image.tsx 1:38 error Unable to resolve path to module 'react' import/no-unresolved The test-app (example back in frontend-build) relied on react being installed, since it’s own dependencies weren’t installed. This commit actually runs npm ci on the test-app, as we should have been doing. The fact that it wasn’t breaking in the past was a lucky side effect of how peer dependencies work with npm.
Straightening out the library’s ESLint configuration files. Pulled @edx/eslint-config into the repository as part of this, so we can iterate on it and simplify it for a typescript world independent of how it’s being used in apps today.
The previous commit removes our usage of the @edx/eslint-config, this removes the dependency.
Working on the CI failure. Having some issues getting Jest configured correctly. |
VSCode was having issues finding the tsconfig.json because frontend-base existed in a larger workspace, and so it was looking for it in the root of the workspace. This makes it look relative to the actual file trying to use it, which should work regardless of anyone’s workspace structure.
- Now extends from the installed frontend-base, not from its parent. This makes it act more like a real app. - Adding jest.config.js to the included files.
The test-app is in this repository, but should otherwise act like an independent app. This helps keep ESLint from getting confused about whether it should be linting it. It can lint itself.
The jest config for the plugins directory needs to have a “node” test environment, rather than the “jsdom” test environment used by most test suites.
- The top-level tsconfig should exclude the test-app. - It should also include the jest config and index.js file. - It should include the ‘cli’ directory. - It should exclude the ‘cli/test-app’ directory completely.
This commit changes how we manage jest configs to some extent, and puts a bit more responsibility on the apps consuming our common jest config here in frontend-base. See the README for more details, but there was no good way to provide mock JS files for SVG and files in the repo here now that we’re using ts-jest instead of babel.
These type definitions are used by consuming apps. In particular, this includes a type definition for an SVG file so consuming app test suites can understand their own SVG files. This commit also updates the README to record additional migration steps.
- tsconfig include directories need globs (**/*) - bumping version of react in test-app to be 17. - Removing unnecessary parameters to package.json lint script - using CLI for linting in test-app
@svgr/webpack is not compatible with anything but babel. It provides a little-used feature that lets developers import SVG files as react components instead of paths. We’re losing very little by removing it, and are gaining a simpler (and functional) webpack config.
We've decided to merge this PR, since it's effectively a point-in-time check-in and work has progressed beyond it significantly. |
@davidjoy 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
* docs: plugin hooks --------- Co-authored-by: Maxwell Frank <[email protected]>
This PR contains a fully functional version of https://github.com/openedx/frontend-build, including all its commit history.
Beyond the commit history from frontend-build, this PR contains some other changes:
frontend-base
, andbabel-loader
,@babel/preset-env
, and Browserslist tots-loader
andtsconfig.json
.frontend-build
(which works well).