-
Notifications
You must be signed in to change notification settings - Fork 27
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
enable mac compatibility #27
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe changes involve setting up a GitHub Actions workflow for Playwright tests and modifying the API by removing a theme export. The workflow is configured to run tests on an Ubuntu environment, with steps for setup, dependency installation, and test execution. The API change suggests a cleanup or deprecation of a theme. Changes
TipsChat with CodeRabbit Bot (
|
5c4acd9
to
60c3d21
Compare
Yeah happy to just remove |
the apage theme access process.env in an unsafe way which leads to crashes. removed.
60c3d21
to
21e45c3
Compare
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.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files ignored due to filter (2)
- apps/registry/package.json
- pnpm-lock.yaml
Files selected for processing (2)
- .github/workflows/playwright.yml (1 hunks)
- apps/registry/pages/api/formatters/template.js (1 hunks)
Files skipped from review due to trivial changes (1)
- .github/workflows/playwright.yml
Additional comments: 1
apps/registry/pages/api/formatters/template.js (1)
- 1-6: The removal of the
apage
theme from theTHEMES
object is consistent with the PR's intent to address MacOS compatibility issues.
export const THEMES = { | ||
ace: require('jsonresume-theme-ace'), | ||
actual: require('jsonresume-theme-actual'), | ||
apage: require('jsonresume-theme-apage'), | ||
autumn: require('jsonresume-theme-autumn'), | ||
caffeine: require('jsonresume-theme-caffeine'), | ||
class: require('jsonresume-theme-class'), |
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.
The getTheme
function should handle the case where a theme is not found in the THEMES
object to prevent runtime errors.
const getTheme = (theme) => {
if (!THEMES[theme]) {
return {
error: 'Theme is not supported.',
};
}
try {
return THEMES[theme];
} catch (e) {
return {
e: e.toString(),
error: 'Theme is not supported.',
};
}
};
Committable suggestion
❗ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
export const THEMES = { | |
ace: require('jsonresume-theme-ace'), | |
actual: require('jsonresume-theme-actual'), | |
apage: require('jsonresume-theme-apage'), | |
autumn: require('jsonresume-theme-autumn'), | |
caffeine: require('jsonresume-theme-caffeine'), | |
class: require('jsonresume-theme-class'), | |
export const THEMES = { | |
ace: require('jsonresume-theme-ace'), | |
actual: require('jsonresume-theme-actual'), | |
autumn: require('jsonresume-theme-autumn'), | |
caffeine: require('jsonresume-theme-caffeine'), | |
class: require('jsonresume-theme-class'), | |
} | |
const getTheme = (theme) => { | |
if (!THEMES[theme]) { | |
return { | |
error: 'Theme is not supported.', | |
}; | |
} | |
try { | |
return THEMES[theme]; | |
} catch (e) { | |
return { | |
e: e.toString(), | |
error: 'Theme is not supported.', | |
}; | |
} | |
}; |
Based on #25. The
apage
theme requires an environment variableLANG
to be present, which is not the case on MacOS, but probably only on linux. I think that makes the theme essentially broken and we should remove it, until this issue has been fixed.Summary by CodeRabbit
New Features
Chores