-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(v13): Flagship Code v13 #138
Conversation
…lugin-fastlane chore: add README for code-plugin-fastlane package
…lugin-fbsdk-next chore: add README for code-plugin-fbsdk-next package
…-firebase-analytics chore: add README for code-plugin-firebase-analytics package
…-firebase-app chore: add README for code-plugin-firebase-app package
…d#2613) minimal README with link to documentation site update package json fields Co-authored-by: Jason Mosley <[email protected]>
minimal README with link to documentation site update package json fields Co-authored-by: Jason Mosley <[email protected]>
…brand#2615) minimal README with link to documentation site update package json fields
…d#2616) minimal README with link to documentation site update package json fields
…gbrand#2617) minimal README with link to documentation site update package json fields
…rand#2618) minimal README with link to documentation site update package json fields
…2619) minimal README with link to documentation site update package json fields
…e_0.71.11 feat(code): react-native v0.71.11
feat(code-core): ENG-3750 - Android API 33, Gradle plugin version ENV var
…up-docs chore: bump all package versions and setup docs to release
…egate fix(leanplum): unnotification delegate + launchOptions
…s-deploy chore: move doc deploy to target main branch
…ase_dir fix(core): android template release directory
…-leanplum/1_0_1 docs(leanplum): 1.0.1 version changelog and docs
|
||
In this update, all Flagship Code dependencies have undergone a major version upgrade, accompanied by notable deprecations. Particularly, the package `@brandingbrand/code-core` has been deprecated in favor of `@brandingbrand/code-cli-kit`. This change stems from the recognition that the former package name lacked clarity regarding its intended use-case. We believe that `code-cli-kit` better communicates that this package serves as a developer toolkit to support the CLI package. | ||
|
||
Furthermore, several plugins have been deprecated due to their inability to undergo open-source testing. Some of these plugins necessitated third-party accounts, posing a risk of exposing Branding Brand's accounts to public developers. These deprecated plugins, including `@brandingbrand/code-plugin-fbsdk-next`, `@brandingbrand/code-plugin-firebase-analytics`, `@brandingbrand/code-plugin-firebase-app`, `@brandingbrand/code-plugin-google-signin`, and `@brandingbrand/code-plugin-leanplum`, will need to be re-implemented in the new plugin format, following the guidelines outlined in the [plugin guide](/guides/plugins). While we understand that this may be frustrating for developers, we firmly believe that this approach is necessary to ensure the quality and supportability of our plugins. |
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.
@crherman7 @jasonmosley I think we may need discuss these removal of plugins and current usage. My personal thought is we may need to keep them for this version and then build out a true deprecation path rather then just removing from this version.
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.
@NickBurkhartBB @crherman7 I agree. We should mark them as deprecated but recreate them for this version. We could even have part of the migration plan move these into the projects as local plugins. Since the old plugins are not compatible with this version, we can't leave existing clients hanging.
.github/workflows/deploy-docs.yml
Outdated
@@ -1,62 +0,0 @@ | |||
# Workflow for building and deploying Flagship Code™ Docs to GitHub Pages |
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.
@crherman7 I think we need to keep our workflows for deploy docs and running test for PRs
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.
correct
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.
updated
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.
running yarn prebuild -b internal.blah -e prod
in example app doesn't stop at config due to missing build config, but continues to run and you end up seeing undefined error in template instead of invalid build config error.
packages/cli/src/index.ts
Outdated
* @type {Object} | ||
*/ | ||
program | ||
.name("@brandingbrand/code-cli") |
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.
flagship-code instead of package name
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.
updated
packages/cli/src/lib/guards.ts
Outdated
action: () => Promise<void | string>, | ||
name: string | ||
) { | ||
return withAction(action, name); |
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.
this function doesn't seem to add anything above withAction, can we remove?
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.
yeah probably can remove it
packages/cli/src/lib/guards.ts
Outdated
* console.log(transformedContent); | ||
* ``` | ||
*/ | ||
export function defineTransformer<T>(transformer: Transformer<T>) { |
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.
this function just returns the transformer without any additional logic, is it even needed?
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.
yes it type guards entry point
packages/cli/src/lib/errors.ts
Outdated
* console.log(result); // Output: true | ||
* ``` | ||
*/ | ||
export function isWarning(error: Error | unknown | any): boolean { |
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 union type is unnecessary as once any is involved the type is just any, so you can just remove Error | unknown as it seems it wants to work with any.
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.
updated
/** | ||
* Specifies the file to be transformed, which is AndroidManifest.xml in this case. | ||
*/ | ||
file: "AndroidManifest.xml", |
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.
this value doesn't seem to matter, it doesn't actually affect what file is transformed cause that is handled in the transform function, it feels like a name instead of file, but I couldn't find the usage to determine if we need it
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.
we can remove it, but it's for future usage potentially
export async function ios(config: BuildConfig & CodePluginSplashScreen) { | ||
// Extract xcassetsDir and xcassetsFile from the iOS legacy splash screen configuration | ||
const { xcassetsDir, xcassetsFile, storyboardFile } = | ||
// @ts-ignore |
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.
remove ts-ignore and handle typescript error
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.
updated
*/ | ||
export async function android(config: BuildConfig & CodePluginSplashScreen) { | ||
// Extract assetsDir from the Android legacy splash screen configuration | ||
// @ts-ignore |
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.
remove ts-ignore and handle typescript error
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.
updated
packages/cli/src/lib/config.ts
Outdated
if (!/^[a-z0-9-~][a-z0-9-._~]*$/gm.test(data.name)) { | ||
// Throw an error if the name does not match the specified format | ||
throw Error( | ||
"[GenerateCliCommandError]: name must follow non-scoped package names format" |
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.
why can't we use scoped package name? I can modify the package after generation to scope and it seems to work
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.
it uses the package name as the name of the directory - this will be a problem. they shouldn't be scoped anyway because they aren't being published anywhere. imo it's much easier to block this at the top level then sanitizing the name for dual purposes of linking vs naming.
apps/example/flagship-code.config.ts
Outdated
'@brandingbrand/code-plugin-asset', | ||
'@brandingbrand/code-plugin-app-icon', | ||
'@brandingbrand/code-plugin-permissions', | ||
'@brandingbrand/code-plugin-splash-screen', |
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.
missing example local plugin
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.
good catch
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.
updated
|
||
import plugin from "../src"; | ||
|
||
describe("plugin", () => { |
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.
using generated plugin in example gives prettier rule warning Strings must use single quote, we should probably switch to single quotes here to match rule
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.
we will have to revisit prettier rules to sync them as they likely clash then
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.
after looking into it - we will need to add the prettier config at the root of the repo so vs code can sync those settings appropriately with format command. we may want to do this is subsequent commit after merge since it affects most files.
updated. |
looks good, let's rebase this to only have history of the rewrite and get it up on the brandingbrand repo |
Describe your changes
Issue ticket number and link
Type of change
Please delete options that are not relevant.
Test Plan
Checklist before requesting a review