< 292022-03-30⋎31 >

Topic for #farmOS is: farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Forum: farmOS.discourse.groupSet by mstenta on 2021-06-15 at 12:52
03:54paul121[m]hmm symbioquine I forgot about the package.json files in the farmOS-map `/examples` directory
03:55paul121[m]we just got some dependabot PRs #149 #150 and #151 to update some deps in those: github.com/farmOS/farmOS-map/pull/149
03:56paul121[m]is there an easy way to update all of those together? I assume they have many of the same dependencies?
05:10symbioquine[m]Similar dependencies, yes
05:11symbioquine[m]<paul121[m]> "is there an easy way to update..." <- I've got to get to bed, but I think the answer is probably somewhere in here: github.com/lerna/lerna/issues/1663
16:09paul121[m]<symbioquine[m]> "I've got to get to bed, but I..." <- awesome! `lerna exec npm audit fix` did the trick
16:10paul121[m]this cascaded into a slew of additional dependabot prs... needed to run`npm audit fix` directly in the `/examples` directory as well
16:12paul121[m]maybe we should configure dependabot to ignore the `/examples` directory if this gets out of hand 😅
19:08MarcosCarballal[github.com/farmOS/farmOS/blob/2.x/module
19:08MarcosCarballal[Hi all, I am trying to use the farmFieldFactory to define a new asset type.
19:08MarcosCarballal[Am I crazy in saying that there is no "number" type here for specifying the type of fields? I can't seem to get a float or integer as a field type through this method.
19:09mstenta[m]Marcos Carballal: you're not crazy - that class has a `fraction` field type available, but in order to use other numeric Drupal field types you'll need to build the field definition yourself
19:10paul121[m]Here is an example of building a `decimal` bundle field on assets: github.com/Vital-Agronomics/farm_asset_a
19:10mstenta[m]fwiw, Fraction fields can store decimal values - they just split them into two integer fields, for maximum precision (numerator and denominator)
19:10mstenta[m](hidden from the end user... still "feels" like a decimal)
19:11mstenta[m]FYI here is the list of Drupal core field types: www.drupal.org/docs/drupal-apis/entity-a
19:12mstenta[m]the `fraction` field type comes from this contrib module (not Drupal core): www.drupal.org/project/fraction/
19:15MarcosCarballal[Ah great, so I can take the field output of `$this->farmFieldFactory->bundleFieldDefinition($options);` and then just manually call the setDisplaySettings with the values I need?
19:16mstenta[m]yes you can do that to override `FarmFieldFactory` defaults
19:17MarcosCarballal[Great thanks!
19:17mstenta[m]paul121's example above is a good example of bypassing `FarmFieldFactory` entirely - that is what it *noramally* looks like creating a Drupal field definition
19:17mstenta[m]s/*noramally*/_normally_/
19:18mstenta[m]`FarmFieldFactory` is just a helper to create the same things, but provides some farmOS-specific opinions for certain types of fields we use a lot in core asset/logs types :-)

< 292022-03-30⋏31 >