Skip to content

0.3.4-jse.8

Pre-release
Pre-release

Choose a tag to compare

@JanMiksovsky JanMiksovsky released this 07 Aug 22:48
· 1062 commits to main since this release

This test release is a candidate for being merged into #main.

Deprecation warnings for .ori files

Origami should be able to build existing .ori files, but to help migrate .ori files to the new syntax:

  • Origami generates warnings when you reference an unprefixed global like map. The warning should suggest the appropriate prefixed method like Tree.map.
  • Origami also generates warnings when you reference @text and @template, suggesting _body or _template respectively.

Each deprecation warning should appear a maximum of once per Origami source location. In VS Code, clicking on the file location indicated in the warning should open the file at the appropriate cursor position to fix the problem.

In some cases, a warning about one problem may take priority over other warnings. In these cases, fixing a problem may then reveal additional problems; keep cycling through rebuilding and fixing problems until all the problems have been addressed.

Dev and Protocol namespaces

A new namespace, Dev, has been created for builtins related to development, including: copy, serve, watch, and others.

In the CLI and npm build scripts, you can invoke these Dev commands without a prefix: copy works the same as Dev.copy.

Another new namespace, Protocol, collects all the builtin functions used by Origami to handle URLs that start with http:, https:, files:, etc. The Protocol namespace exists primarily to organize the documentation for those functions under a single umbrella.

Namespace prefixes now required in the CLI and build scripts

Aside from builtins in the Dev namespace, all other builtins must be prefixed (with Origami or Tree) when you invoke them from the CLI or a build script.

If you need help determining what namespace a builtin is in, use ori help/<command>. E.g., ori help/json will tell you that json is in the Tree namespace, so needs to be invoked as Tree.json.

Preview documentation

A preview documentation site shows the in-progress work on updating the docs to match the changes in this test release.

  • The Builtins area should list the correct set of namespaces and the commands in each namespace
  • All examples of invoking the ori CLI should work as shown
  • The JavaScript Comparison section of the Language area has been updated to reflect the new syntax, but other pages in the Languages area have yet to be updated or have only been partially updated