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

feat(v13): Flagship Code v13 #138

Closed
wants to merge 2,550 commits into from
Closed

feat(v13): Flagship Code v13 #138

wants to merge 2,550 commits into from

Conversation

crherman7
Copy link
Owner

Describe your changes

Issue ticket number and link

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Test Plan

Checklist before requesting a review

  • A self-review of my code has been completed
  • Tests have been added / updated if required
  • Documentation has been updated to reflect these changes

jasonmosley and others added 30 commits June 15, 2023 14:53
…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.

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.

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.

@@ -1,62 +0,0 @@
# Workflow for building and deploying Flagship Code™ Docs to GitHub Pages

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

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Copy link

@NickBurkhartBB NickBurkhartBB left a 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.

* @type {Object}
*/
program
.name("@brandingbrand/code-cli")

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

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

action: () => Promise<void | string>,
name: string
) {
return withAction(action, name);

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?

Copy link
Owner Author

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

* console.log(transformedContent);
* ```
*/
export function defineTransformer<T>(transformer: Transformer<T>) {

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?

Copy link
Owner Author

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

* console.log(result); // Output: true
* ```
*/
export function isWarning(error: Error | unknown | any): boolean {

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.

Copy link
Owner Author

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",

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

Copy link
Owner Author

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

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

Copy link
Owner Author

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

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

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

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"

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

Copy link
Owner Author

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.

'@brandingbrand/code-plugin-asset',
'@brandingbrand/code-plugin-app-icon',
'@brandingbrand/code-plugin-permissions',
'@brandingbrand/code-plugin-splash-screen',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing example local plugin

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

Copy link
Owner Author

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", () => {

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

Copy link
Owner Author

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

Copy link
Owner Author

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.

@crherman7
Copy link
Owner Author

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.

updated.

@NickBurkhartBB
Copy link

looks good, let's rebase this to only have history of the rewrite and get it up on the brandingbrand repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants