mason 0.1.0-dev.41
mason: ^0.1.0-dev.41 copied to clipboard
A Dart template generator which helps teams generate files quickly and consistently.
0.1.0-dev.41 #
- deps: upgrade to
Dart >=2.17,mason_logger ^0.2.4, andvery_good_analysis ^3.1.0 - fix:
createBundleandunpackBundlenormalize bundled file paths.
0.1.0-dev.40 #
- feat: export
StringCaseExtensions
0.1.0-dev.39 #
- BREAKING refactor!: remove
GeneratorHooks.fromBundlein favor ofGeneratorHooks.fromBrickYaml. - feat: support relative imports in hooks
- feat: support non-ascii characters in hooks
- feat: support bricks with no
__brick__directory - feat: hook artifacts are stored in the
build/hooksdirectory within the corresponding hooks directory - feat: bundled artifacts from
MasonGenerator.fromBundleare stored in thebundleddirectory within the mason cache. - fix: avoid bundling extraneous hook files (e.g. coverage files)
0.1.0-dev.38 #
- perf: compile hooks
- fix: allow optional
__brick__directory
0.1.0-dev.37 #
- fix: hook execution after pub cache clean
0.1.0-dev.36 #
- fix: support mp3 binary file types
0.1.0-dev.35 #
- BREAKING feat!: avoid templating hook contents
- chore(deps): upgrade to
mason_logger ^0.2.2
0.1.0-dev.34 #
- chore(deps): upgrade to
mason_logger ^0.2.0
0.1.0-dev.33 #
- refactor: use
mason_logger ^0.1.3
0.1.0-dev.32 #
- fix: use file descriptor pooling
- chore: add additional
pubspec.yamlmetadata
0.1.0-dev.31 #
- fix: render asymmetrical shorthand lambda expressions correctly
0.1.0-dev.30 #
- refactor(deps): remove
pkg:universal_io - refactor: use
mason_logger ^0.1.1
0.1.0-dev.29 #
- fix: improve lambda shorthand syntax flexibility
- perf: speed up hooks execution
- refactor: use
mason_logger ^0.1.0
0.1.0-dev.28 #
- fix: override
toStringonMasonException
0.1.0-dev.27 #
- perf: run substitutions in isolate and improve render specificity
- chore: use
mason_logger ^0.1.0-dev.14
0.1.0-dev.26 #
-
fix: file path looping array resolution
-
feat:
brick.yamlvars array supportvars: color: type: array description: Your desired build flavors defaults: - production prompt: What build flavors would you like? values: - development - staging - production
0.1.0-dev.25 #
-
fix: do not prompt when overwrite rule is
alwaysOverwrite -
feat:
brick.yamlvars enum supportvars: color: type: enum description: Your favorite color default: green prompt: What is your favorite color? values: - red - green - blue
0.1.0-dev.24 #
- fix: rendering shorthand lambdas within loops
0.1.0-dev.23 #
- chore: use
mason_logger ^0.1.0-dev.9
0.1.0-dev.22 #
- feat: add
mustacheCaselambda
0.1.0-dev.21 #
- feat: expose
OverwriteRule
0.1.0-dev.20 #
- feat: expose
GeneratorTarget
0.1.0-dev.19 #
-
refactor: improve brick location serialization for hosted bricks
# before hello: version: ^0.1.0 # after hello: ^0.1.0
0.1.0-dev.18 #
- fix:
HookContextvars mutation
0.1.0-dev.17 #
- fix: lambda shorthand conditional interop
- fix: lambda shorthand partials interop
0.1.0-dev.16 #
- fix: lamdba shorthand syntax interop
0.1.0-dev.15 #
- feat: introduce shorthand lambda syntax
{{name.upperCase()}}<->{{#upperCase}}{{name}}{{/upperCase}}
- chore: use
mason_logger ^0.1.0-dev.8
0.1.0-dev.14 #
- feat: add optional
repositoryfield tobrick.yaml
0.1.0-dev.13 #
- BREAKING: feat:
BricksJson.addreturnsCachedBrickinstead ofStringlocation. - feat: add
MasonLockJson - feat: export
CachedBrick,GeneratorHooks,MasonLockJson,Version,VersionConstraint, andVersionRange
0.1.0-dev.12 #
- feat: include
README,CHANGELOG, andLICENSEinMasonBundle
0.1.0-dev.11 #
- fix:
Yaml.encodehandle escape characters
0.1.0-dev.10 #
- BREAKING: feat: run
fromUniversalBundleinIsolate(async) - feat: expose
Yamlencoding utility - feat: add
fromDartBundletoMasonBundle
0.1.0-dev.9 #
- feat: expose
MasonBundledFile
0.1.0-dev.8 #
-
feat: add environment to
brick.yamlname: example description: An example brick version: 0.1.0+1 environment: mason: ">=0.1.0-dev.1 <0.1.0" -
feat: add
isBrickCompatibleWithMason
0.1.0-dev.7 #
- BREAKING: feat: add
MasonGenerator.fromBrick- refactor: remove
MasonGenerator.fromGitPath(usefromBrickinstead) - refactor: remove
MasonGenerator.fromBrickYaml(usefromBrickinstead)
- refactor: remove
- BREAKING: refactor:
Bricknamed constructorsBrick.path,Brick.git,Brick.version
- BREAKING: refactor: remove
WriteBrickException - BREAKING: refactor: simplify
bricks.jsonformat - refactor: git cache directory location
- feat: add
fromUniversalBundleandtoUniversalBundleonMasonBundle - feat: add
BrickLocation - feat: add
unpackBundleto convert universal bundle bytes to aMasonBundle - fix: yaml string encoding for semver
- fix:
BrickNotFoundExceptionmessage when git path is empty - chore: upgrade to
mason_logger ^0.1.0-dev.5 - chore: upgrade to Dart 2.16
0.1.0-dev.6 #
- BREAKING feat: return list of
GeneratedFilefromgenerate
import 'dart:io';
import 'package:mason/mason.dart';
Future<void> main() async {
final generator = await MasonGenerator.fromGitPath(
const GitPath(
'https://github.com/felangel/mason.git',
path: 'bricks/greeting',
),
);
final files = await generator.generate(
DirectoryGeneratorTarget(Directory.current),
vars: <String, dynamic>{'name': 'Dash'},
);
}
- feat: expose
packageVersion
0.1.0-dev.5 #
- BREAKING feat: add computed vars support via
HookContext
// pre_gen.dart
import 'package:mason/mason.dart';
// Every hook must contain a run method which accepts a `HookContext`
// from package:mason/mason.dart.
void run(HookContext context) {
// Read/Write vars
context.vars = {...context.vars, 'custom_var': 'foo'};
// Use the logger
context.logger.info('hello from pre_gen.dart');
}
0.1.0-dev.4 #
- BREAKING feat: restructure
brick.yamlvars to support type, description, and default:
name: example
description: An example brick.
# The following defines the version and build number for your brick.
# A version number is three numbers separated by dots, like 1.2.34
# followed by an optional build number (separated by a +).
version: 0.1.0+1
# Variables specify dynamic values that your brick depends on.
# Zero or more variables can be specified for a given brick.
# Each variable has:
# * a type (string, number, or boolean)
# * an optional short description
# * an optional default value
# * an optional prompt phrase used when asking for the variable.
vars:
name:
type: string
description: Your name
default: Dash
prompt: What is your name?
-
BREAKING feat: add
versionto bundle -
BREAKING refactor: API improvements to
MasonBundle,MasonGenerator, andDirectoryGeneratorTargetMasonBundle- Use named constructor parameters instead of positional parameters
MasonGenerator.generate(...)- Accepts optional
LoggerandFileConflictResolution
- Accepts optional
DirectoryGeneratorTarget- No longer accepts optional
LoggerandFileConflictResolution(moved togenerateAPI above)
- No longer accepts optional
Before
final generator = MasonGenerator.fromBundle(myBundle); final target = DirectoryGeneratorTarget(dir, Logger(), FileConflictResolution.skip); await generator.generate(target, vars: {...});After
final generator = MasonGenerator.fromBundle(myBundle); final target = DirectoryGeneratorTarget(dir); await generator.generate( DirectoryGeneratorTarget(tempDir), vars: {...}, logger: Logger(), // optional logger fileConflictResolution: FileConflictResolution.skip, // optional conflict resolution strategy ); -
fix: ignore
FileConflictResolutionwhen there are no conflicts -
docs: README updates and upgrade example bricks
-
chore: upgrade to
mason_logger: v0.1.0-dev.4
0.1.0-dev.3 #
- BREAKING feat: add version to
brick.yaml - fix: bundle file sort order
0.1.0-dev.2 #
- feat: export
renderAPIsRenderTemplateextension onString
0.1.0-dev.1 #
- feat: decompose
masonintomason,mason_cliandmason_loggerpackage:mason- core generatorpackage:mason_cli- command line interfacepackage:mason_logger- reusable logger
- fix: file resolution with custom path generates in the correct location
0.0.1-dev.57 #
- feat: add
mason bundleoutput - feat: add generator hooks support (custom script execution)
- support for
pre_genandpost_genhooks
- support for
0.0.1-dev.56 #
- fix:
mason newoutput format improvements- use
logger.detailinstead oflogger.successcolor for consistency
- use
0.0.1-dev.55 #
- fix: partials file name resolution
0.0.1-dev.54 #
- fix: nested lambdas within loops
0.0.1-dev.53 #
- feat: improve automatic update prompt style
0.0.1-dev.52 #
- feat: add automatic update support
0.0.1-dev.51 #
- feat: conditional file and directory creation support
0.0.1-dev.50 #
- BREAKING refactor: remove
mason installandmason uninstallmason install->mason add -gmason uninstall->mason remove -g
- feat: adjust
mason initgeneratedmason.yaml - feat: improve
mason listempty output - feat: create
mason removecommand - feat: create
mason addcommand - feat:
mason initcommand automatically gets first brick - feat: improve output and description for
mason getcommand - fix: logger stopwatch units
- docs: update example/README
0.0.1-dev.49 #
- refactor: remove
dart:ioplatform dependency
0.0.1-dev.48 #
- feat: add append conflict resolution strategy
- fix: mason get ensures brick exists
- docs: add built-in lambdas section to README
0.0.1-dev.47 #
- fix:
varsinbrick.yamlare not required
0.0.1-dev.46 #
- fix:
mason bundleresolvesimplicit_dynamic_map_literalin generated Dart bundle - docs: add bundle usage to README
0.0.1-dev.45 #
- fix:
mason bundleadd.otfsupport
0.0.1-dev.44 #
- feat: custom file conflict resolution via
mason make --on-conflict
0.0.1-dev.43 #
-
feat: support partials
Example:
├── HELLO.md ├── {{~ footer.md }} └── {{~ header.md }}{{~ header.md }}# 🧱 {{name}}{{~ footer.md }}_made with 💖 by mason_HELLO.md{{> header.md }} Hello {{name}}! {{> footer.md }}$ mason make hello --name DashHELLO.md# 🧱 Dash Hello Dash! _made with 💖 by mason_
0.0.1-dev.42 #
-
fix: improve
mason make --helpto show complete usage informationGenerate code using an existing brick template. Usage: mason make [arguments] -h, --help Print this usage information. -c, --config-path Path to config json file containing variables. -o, --output-dir Directory where to output the generated code. (defaults to ".") Run "mason help" to see global options.
0.0.1-dev.41 #
- feat: add
OverwriteRulefor file conflict resolution (Yna)Y- overwrite (default)n- do not overwritea- overwrite this and all others
0.0.1-dev.40 #
- fix: create target directory if it does not exist
0.0.1-dev.39 #
- feat!: update
mason maketo support custom output directory via--output-dir(-o) - refactor!: rename
mason bundle --directory(-d) tomason bundle --output-dir(-o) - refactor!: rename
mason make --json(-j) tomason make --config-path(-c)
0.0.1-dev.38 #
- feat!: remove
--forcefrommason cache clearmason cache clearwill remove all local bricks so--forceis not necessary
- fix:
mason cache clearbehavior to always clear local and global brick caches - fix: local and global brick installation conflicts
- fix:
mason listduplicate bricks - refactor:
MasonCachetoBricksJson- simplification of internal APIs and cache implementation
0.0.1-dev.37 #
- feat: add
mason listcommand - docs: update command descriptions for consistency
0.0.1-dev.36 #
- feat: add
mason uninstallcommand
0.0.1-dev.35 #
- fix: adjust
mason cache clear --forcetarget directory to avoid deleting local files
0.0.1-dev.34 #
- fix: local mason get installation location for remote bricks
- fix!: always attempt to fetch latest remote brick
mason getno longer supports--forcesince it is handled automatically
0.0.1-dev.33 #
- feat: mason install command for global brick templates
- docs: update mustache manual link
- docs: update mason.yaml from init to use https for git
0.0.1-dev.32 #
- feat!: windows compatibility fixes
- 100% compatibility across macos, linux, and windows
- if you are experiencing issues after upgrading, try force re-fetching all templates via
mason get --force
0.0.1-dev.31 #
- feat: new templates are readily available
- docs: update README usage section to include
bundle - docs: update file resolution section and include note about unescaped variables
0.0.1-dev.30 #
- fix: improved error handling and error reporting
- improve error message when
mason newis missing a brick name - improve error message when
mason makeis missing a subcommand mason gethandle empty brick list inmason.yaml- avoid hydrating cache when
bricks.jsonis empty.
- improve error message when
- docs: add bundling documentation to
README
0.0.1-dev.29 #
- refactor: update logger api to support nullable strings
0.0.1-dev.28 #
- BREAKING feat: migrate to null safety
- BREAKING refactor: update file resolution tag to
{{% %}}for windows compatibility - fix: normalize brick paths to avoid escaping issues on windows
0.0.1-dev.27 #
- fix:
mason bundlepath resolution fixes
0.0.1-dev.26 #
- feat: exclude analyzer warnings from dart bundle
0.0.1-dev.25 #
- feat: add
mason bundlecommand - feat: add
MasonGenerator.fromBundle - fix: asset resolution issues
0.0.1-dev.24 #
- feat: add
mason cache clearcommand - fix:
mason getrestores bricks whenbrick.jsonis empty/missing
0.0.1-dev.23 #
- fix: support non-ascii characters in templates
0.0.1-dev.22 #
- fix: issue with variable mutation which excluded variables within arrays
0.0.1-dev.21 #
- feat: export
MasonGeneratorand relevant objects to allowmasonto be consumed as a library - feat: expose
fromGitPathonMasonGenerator
0.0.1-dev.20 #
- fix: file loop content template variable resolution
0.0.1-dev.19 #
- feat: file loop support
- fix: mason init incorrectly throwing MissingMasonYamlException
- refactor: simplify MasonGenerator.fromBrickYaml
0.0.1-dev.18 #
- BREAKING revert: remove dart executable template support
- feat: add
lowerCaseandupperCaselambdas - fix: support non utf8 encoded files
- fix: switch templating engine to be lenient by default
- refactor: avoid templating content with no delimeters
0.0.1-dev.17 #
- feat: support dart execution inside templates
- docs: add random_number example
- fix: handle empty or missing vars in
brick.yaml
0.0.1-dev.16 #
- BREAKING:
mason makecreates subcommands for all available bricksmason make <BRICK_NAME> -- --var1 value1 --var2 value2->mason make <BRICK_NAME> --var1 value1 --var2 value2
- feat:
mason make -hprovides a list of available subcommands based on available bricks - feat: add
mason getto get all bricks - feat: support for
mason get --force - feat: add local cache all bricks
- feat: improve error handling and messaging
- feat: require brick name consistency between
mason.yamlandbrick.yaml - fix: handle empty or malformed
mason.yaml - fix: handle empty or malformed
brick.yaml
0.0.1-dev.15 #
- feat: add
mason newto create a new brick - feat:
mason initsets up bricks with sample - fix: support bricks without
vars - fix: support bricks with empty
vars - docs: revamp README to include
Quick Startsection
0.0.1-dev.14 #
- fix: mason init path resolution
0.0.1-dev.13 #
- feat: improve
mason initoutput - refactor: internal brick improvements
- refactor: internal configuration file renaming
0.0.1-dev.12 #
- feat: add
mason init - feat: improve CLI output and error messages
- docs: update README documentation
0.0.1-dev.11 #
- BREAKING: rename
templatestobricks- rename
__template__to__brick__ - rename
template.yamltobrick.yaml
- rename
- BREAKING: rename
mason buildtomason make
0.0.1-dev.10 #
- feat: support file resolution from path variable
0.0.1-dev.9 #
- fix: unhandled
jsonexception when--jsonomitted
0.0.1-dev.8 #
- feat: support for
--jsonoption inmason build - feat: support loops in templates
0.0.1-dev.7 #
- BREAKING
mason.yamlis required - BREAKING template yaml no longer has files
- BREAKING
mason.yamlformat changed- all template files and directories should be included inside
__template__
- all template files and directories should be included inside
- feat:
mason.yamlformat changed - feat: nearest
mason.yamlwill be used - fix: improved error handling
- docs:
READMEupdates
0.0.1-dev.6 #
- feat: support
mason.yaml - feat: support prompts for vars
- refactor: use
CommandRunner - docs:
READMEupdates
0.0.1-dev.5 #
- fix: stop progress on build error
0.0.1-dev.4 #
- fix: mason CLI version fix
0.0.1-dev.3 #
- feat: support for remote templates
- feat: CLI loading indicator
0.0.1-dev.2 #
- docs: inline documentation updates
0.0.1-dev.1 #
Dev Release
- feat:
mason buildcommand with custom template - feat: mustache template support
- feat: built-in recase lambdas