-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Monorepo Part 2: Putting it all together #14002
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
Conversation
❌ Deploy Preview for authentik-docs failed. Why did it fail? →
|
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
| "prefix": "#<num>", | ||
| "url": "https://github.com/goauthentik/authentik/issues/<num>", | ||
| "ignoreCase": false | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
| trim_trailing_whitespace = true | ||
| insert_final_newline = true | ||
|
|
||
| [*.html] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
| @@ -0,0 +1,51 @@ | |||
| # Prettier Ignorefile | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Migrated and deduped from individual packages
| "ms-python.black-formatter", | ||
| "ms-python.debugpy", | ||
| "ms-python.python", | ||
| "ms-python.vscode-pylance", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
| @@ -1,16 +1,16 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
package.json
Outdated
| "packages/*" | ||
| ], | ||
| "prettier": "@goauthentik/prettier-config", | ||
| "packageManager": "[email protected]+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto set by NPM when workspaces are defined. Running npm will continue to work as expected without introducing a dependency on Yarn.
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #14002 +/- ##
==========================================
- Coverage 92.74% 91.60% -1.15%
==========================================
Files 799 799
Lines 41230 41230
==========================================
- Hits 38240 37767 -473
- Misses 2990 3463 +473
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| "excludeDirectories": [ | ||
| "**/.git", // Git | ||
| "**/.yarn", // Yarn | ||
| "**/.vscode", // VS Code | ||
| "**/.vscode-test-web", // VS Code Web Test | ||
| "**/dist", // Distributed build files | ||
| "**/out", // Output build files | ||
| "**/.drafts", // Drafts | ||
| "**/.github", // GitHub | ||
| "**/node_modules" // Node modules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each additional excluded directory improves the performance of watcher mode type checking, allowing TypeScript to skip cruft within imported node modules.
| export function updateURLParams(params: { [key: string]: unknown }, replace = true): void { | ||
| export function updateURLParams(nextParams: { [key: string]: unknown }, replace = true): void { | ||
| const currentParams = getURLParams(); | ||
| for (const key in params) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linter detected use of for in loop.
| this.states = []; | ||
|
|
||
| this.host.actions.map((act, idx) => { | ||
| this.states.push({ | ||
| action: act, | ||
| state: ActionState.pending, | ||
| idx: idx, | ||
| }); | ||
| }); | ||
| this.states = this.host.actions.map((act, idx) => ({ | ||
| action: act, | ||
| state: ActionState.pending, | ||
| idx: idx, | ||
| })); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix for linter warning of Array.prototype.map as side-effects.
| @@ -1,4 +1,3 @@ | |||
| // eslint-disable-next-line @typescript-eslint/ban-ts-comment | |||
| // @ts-nocheck | |||
| // ^^^^^^^^^^^ Because TSC cannot handle metaprogramming, and metaprogramming | |||
| // via `defineProperties` is how we installed the OUID finders for the various | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Followed up in #13745
| // TODO: We should enable this when when we're ready to enforce it. | ||
| "noUncheckedIndexedAccess": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually enforcing this is quite the journey but worth it.
| @@ -1,8 +1,8 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
| @@ -1,9 +1,8 @@ | |||
| import "mdast-util-to-hast"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
| @@ -1,10 +1,8 @@ | |||
| import "mdast-util-to-hast"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
| @@ -1,10 +1,9 @@ | |||
| import "mdast-util-to-hast"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
| @@ -1,5 +1,5 @@ | |||
| import { generateVersionDropdown } from "./src/utils.js"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
| @@ -1,12 +1,6 @@ | |||
| import React, { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
| throw new Error(`Invalid semver version: ${semver}`); | ||
| } | ||
|
|
||
| const yearCutoff = new Date().getFullYear() - 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
website/src/css/custom.css
Outdated
| --ifm-badge-background-color: var(--ifm-color-warning-contrast-background); | ||
| --ifm-badge-color: var(--ifm-color-warning-contrast-foreground); | ||
| --ifm-badge-border-color: var(--ifm-color-warning-contrast-foreground); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
| * - the markdown content does not already contain a top-level h1 heading | ||
| * | ||
| * @vendor docusaurus | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
| @@ -1,5 +1,5 @@ | |||
| import React from "react"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
| * This component is a swizzled version of the original DocItemContent component. | ||
| * | ||
| * Similar to Docusaurus' default `DocItemContent`, this component renders | ||
| * the content of a documentation page. However, it also adds support for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
| @@ -1,13 +1,12 @@ | |||
| import React, { type ReactNode } from "react"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
| @@ -1,27 +1,36 @@ | |||
| const html = String.raw; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
| @@ -1,7 +1,8 @@ | |||
| import test from "node:test"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 File diff only contains linter changes.
45926a6 to
4a62cbd
Compare
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-b46ba9862ad8405626d4f5e098b5c505a41974ac
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-b46ba9862ad8405626d4f5e098b5c505a41974acAfterwards, run the upgrade commands from the latest release notes. |
ca2e478 to
b46ba98
Compare
web: Update config. Flesh out build. Fix issue surrounding build. Fix paths. Update workspaces. Fix build steps. Apply linter. Temporarily remove problem rules. Add ignorefile. Prep for formatting. Lint website. Lint web, repo packages. Refine Prettier usage. Fix imports. Tidy build. Move node ignore files. Remove unused. Update job. Fix lint step. Build before compiling. Use root for paths. Fix issues surrounding import references, types, package names. Fix build paths. Tidy. Enforce prefix. Apply prefixes to imports. Enable linter, compiler, etc. Fix references. Update names. Mark optional. Revise mounts. Fix build order. Update package.json. Ignore all docusaurus. Fix paths, types. Clean up build steps, names. Fix paths. website: Fix nested paragraphs build warning. web: Enforce module resolution. Use consistent LTS version. Track Node version. Use default resolution. Test main entrypoint. Fix Node v20 compatibility. Add task names. WIP: Fix styles.
b46ba98 to
a4f92f5
Compare
Details
This PR concludes the majority of #1368, allowing us to take advantage of NPMs workspaces, TypeScript's project-wide compiler, and our packaged linter configurations.
Overall, the changes in this PR should keep existing code behaviors as they were, sometimes at the expense of turning off ESLint's more aggressive "nightmare mode" rules. A follow up PR will address disabled rules and avoid intermixing too much linter noise.
Checklist
ak test authentik/)make lint-fix)If an API change has been made
make gen-build)If changes to the frontend have been made
make web)If applicable
make website)