Copier Org Copier Versions Save

Library and command-line utility for rendering projects templates.

v9.2.0

3 weeks ago

Feat

  • tasks: add support for skipping tasks (#1561)
  • add support for validating multi-select choice answers

Fix

  • ignore empty YAML documents in copier.yml
  • preserve choices order in answers to multi-select choice questions
  • exclude: apply exclude matcher to rendered path

Refactor

  • drop pyyaml-include dependency and reimplement relevant features

Perf

  • apply PERF lint rules fixes (#1556)

v9.1.1

3 months ago

Fix

  • don't fail in systems with windows 1252 encoding (probably)
  • skip excluded paths before rendering

v9.1.0

5 months ago

Feat

  • Conflicts on updates now appear as git merge conflicts, also on VSCode
  • choices: support questionary checkbox for multiple choices using multiselect: true.

Fix

  • mark package as typed
  • Normalize paths obtained from Git commands output
  • don't crash when update replaces file with symlink (or vice versa) (#1409)
  • keep git-ignored files on update (#1373)
  • address deprecation warning in shutil.rmtree(onerror=...) (#1401)

v9.0.1

5 months ago

Fix

  • don't produce output when imported with $FORCE_COLOR=1 env

v9.0.0

6 months ago

v9.0.0 (2023-10-22)

BREAKING CHANGE

  • Changes the return code for unsafe template error from 2 to 4 to avoid return code collision with Plumbum's SwitchError type errors which use return code 2.

Feat

  • allow overriding data file with CLI arguments (#1332)
  • cli: read answers from yaml file (#1325)

Fix

  • vcs: prevent local clone from being stuck by gpg prompts (#1360)
  • pydantic: compatible with 2.4+, solving FieldValidationInfo warning (#1342)
  • fix answer validation for type: str questions
  • version guess from tags that don't start with v, but are still PEP440 compliant (#1048)
  • cli: use return code 4 for unsafe template error
  • nix: detect build version appropriately

v8.3.0

7 months ago

Feat

  • add -A as an alias for --skip-answered, and support it in recopy too
  • add --skip-answered flag to avoid repeating recorded answers

Fix

  • recopy: never clone old template (even less if it's just for cleanup)

v8.2.0

7 months ago

Feat

  • release on FlakeHub.com too
  • add support for pre-update and post-update messages (#1288)
  • add support for pre-copy and post-copy messages

Fix

  • do not immediately fail if git is not available
  • provide more clarification in unsafe error message (#1280)
  • clean up tmp dir
  • don't lie about updated files
  • require default value for secret question
  • fix answer validation against conditional choices with duplicate values

Refactor

  • drop support for Python 3.7 (#1252)

v8.1.0

9 months ago

Feat

  • add support for computed values via skipped questions (#1220)
  • add --trust as a less scary alternative to --UNSAFE (#1179)
  • add OS identifier to render context

Fix

  • pydantic: add upper dependency bound to fix unlocked installations

Refactor

  • request answers imperatively instead of implicitly via impure property

v8.0.0

10 months ago

BREAKING CHANGE

  • Updates will overwrite existing files always. If you need to select only some files, just use git mergetool or git difftool after updating.
  • Flag --overwrite/-w disappeared from copier update. It is now implicit.
  • To update via API, overwrite=True is now required.
  • The default update conflict mode is now inline instead of rej.
  • By default, updates now consider 3 lines of context instead of just 1.
  • All CLI calls to Copier must now include the subcommand as the 1st argument. For example, copier must become now copier update; also copier ./tpl ./dst must become copier copy ./tpl ./dst.
  • All flags must go after the subcommand now. For example, copier -r HEAD update ./dst must now become copier update -r HEAD ./dst or copier update ./dst -r HEAD.
  • Automatic mode removed. Since now subcommands are required, the automatic mode is removed.
  • Deprecated copier.copy function is removed. Use copier.run_copy, copier.run_update or copier.run_recopy explicitly as needed.
  • default values must be of the same type than the question.

Feat

  • disable unsafe features by default and add --UNSAFE switch (#1171)
  • basic nixpkgs overlay
  • add recopy command and function
  • support conditional choices (#1010)
  • validate default values (#1075)

Fix

  • explain better why an answer casting fails
  • cli: display subcommand args meaning
  • preserver recursive symlinks
  • work around Pydantic bug when parsing choices
  • skip validating question and generating its default value when its skip condition is met

Refactor

  • overwrite always on updates
  • update: default to inline markers and 3 lines of context
  • remove unused local overrides to answers

v7.2.0

1 year ago

Feat

  • customizable update accuracy

Fix

  • fix using a branch name as VCS ref
  • answer validation for question with complex choices (#1110)