Skip to content

Commit

Permalink
Update to handlebars v4.7.6
Browse files Browse the repository at this point in the history
Currently using using my fork: https://github.com/jbboehr/handlebars.js/tree/remove-equals-4.x
Awaiting PR: handlebars-lang/handlebars.js#1683

* Rewrote everything in TypeScript
* Switched the license to `AGPL-3.0-or-later`. The specification data is still licensed under the `MIT` license, as it is extracted from `handlebars.js`
* `description` now includes all `describe($description, ...)` from the handlebars test suite
* `exception` can now be either `true`, a string, or a regex.
* `message` used to be the exception message, but will now be any extra message noted in the handlebars.js test suite
* `options` was renamed to `runtimeOptions` to differentiate from `compileOptions`
* Using a new version format `104.7.6` which is: `(myMajor * 100 + handlebarsMajor) + '.' + (myMinor * 100 + handlebarsMinor) + '.' + (myPatch * 100 + handlebarsPatch)`
* `number` is now included in tests (besides the first implied `00`) that have multiple cases
* `compat` is removed in favor of `compileOptions.compat`
* `globalPartials`, `globalDecorators`, and `globalHelpers` are now removed and merged into
  `partials`, `decorators`, and `helpers` instead

Closes #7
  • Loading branch information
jbboehr committed May 1, 2020
1 parent 36d52a2 commit d04fcb7
Show file tree
Hide file tree
Showing 55 changed files with 7,606 additions and 3,479 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Expand Up @@ -8,5 +8,13 @@ indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[Makefile]
indent_style = tab
indent_size = 4

[*.json]
indent_style = tab
indent_size = 4

[*.ts]
indent_size = 4
5 changes: 5 additions & 0 deletions .eslintignore
@@ -0,0 +1,5 @@
node_modules
/dist/
/handlebars.js/
/patch/
/spec/
65 changes: 65 additions & 0 deletions .eslintrc.json
@@ -0,0 +1,65 @@
{
"root": true,
"env": {
"node": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"modules": true
}
},
"plugins": [
"@typescript-eslint",
"import"
],
"rules": {
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],

"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"mjs": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
"@typescript-eslint/no-explicit-any": "off",
"no-prototype-builtins": "off",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "off"
}
}
6 changes: 6 additions & 0 deletions .gitattributes
@@ -0,0 +1,6 @@
* text=auto eol=lf
.gitattributes export-ignore
.gitignore export-ignore
.gitmodules export-ignore
.travis.yml export-ignore
dist linguist-generated=true
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
*~
/node_modules/
/tmp/
/vendor/
2 changes: 1 addition & 1 deletion .gitmodules
@@ -1,3 +1,3 @@
[submodule "handlebars.js"]
path = handlebars.js
url = https://github.com/wycats/handlebars.js.git
url = https://github.com/jbboehr/handlebars.js.git
22 changes: 0 additions & 22 deletions .jshintrc

This file was deleted.

25 changes: 14 additions & 11 deletions .travis.yml
Expand Up @@ -3,28 +3,31 @@ language: php

php:
- 7.2
- 7.3
- 7.4
- master

before_script:
before_install:
- export PATH="./node_modules/.bin:$PATH"

install:
- npm install
- make

script:
- make check_changes
- make test
- make test_changes
- make test_eslint
- make test_node
- make test_php

branches:
only:
- master
- travis

env:
global:
- secure: "ZjGYCdnJbnuXx+CTiIIr50cZxEaGXF8JIY3QMgfOJ2ll4X6wVZ5FsYaOyuaaDI86lb767/fKPZ4hgFqMVAYS50XHjjr23Smavd9HHsVRPQmOifrYIYVFSDkEiKVo6JIiJPBI0NM+5vrowuORMm3YFGZMv6RGOEAa5cvjSte1wVSwvgeIK6QKlXL65L/29/p7ynT6PPhZ3kuc+lY3v2N4WGxMj7eynjGajsymAEKCqKDjRu7RRGbhcw7KdPbeMo2l+qkQBS/aEikiUgTW2CBb7cirXHODnEru15OQOTWw29ntrI7uteA6vK5w9ygTtguTEVhVDDAySGU6VYK/5VO2nnye0VLkTRKPpzeEuQNjbw85MveFoxXDPgfpUUe0tiG1ho37p73aFbZM6im1M5oQCL8gcqi+rUCshRn5MpjscZ8vMN7GFF1Sva1RQ9f/ho93gmIP0+5TStVTYgd3QTri3F14lT79P0Ujbxk4ltWX15Zj52Kcan0ipWmcz9ENGH3kqMOH9q2KvWI+vPL3laL9sBQ5L5VUWeF8XrmrSYX9MOILaJWaCPQT31oBbGUlgJZGslGqpctLBHsF5K7t7LObADU5XheMWvC0iDO/0WqVDyG37D4UTfXoaFrXIlhNSX6ouZjq+WwJaOyxLm/498N0Wk/XUpMSJ4XFKiw/mSe/6XA="

matrix:
include:
- language: nix
before_script:
script: nix-build --argstr handlebarsSpecVersion $TRAVIS_BRANCH | tee result.txt
after_success: cat result.txt | cachix push jbboehr-ci

before_install:
install:
script: nix-build --argstr handlebarsSpecVersion $TRAVIS_BRANCH
26 changes: 26 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,26 @@
# Changelog

All Notable changes to `handlebars-spec` will be documented in this file.

Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## [Unreleased]

### Changed
- Rewrote everything in TypeScript
- Switched the license to `AGPL-3.0-or-later`. The specification data is still licensed under the `MIT` license, as it is extracted from `handlebars.js`
- `description` now includes all `describe($description, ...)` from the handlebars test suite
- `exception` can now be either `true`, a string, or a regex.
- `message` used to be the exception message, but will now be any extra message noted in the handlebars.js test suite
- `options` was renamed to `runtimeOptions` to differentiate from `compileOptions`
- Using a new version format `104.7.6` which is: `(myMajor * 100 + handlebarsMajor) + '.' + (myMinor * 100 + handlebarsMinor) + '.' + (myPatch * 100 + handlebarsPatch)`

### Added
- `number` is now included in tests (besides the first implied `00`) that have multiple cases

### Removed
- `compat` is removed in favor of `compileOptions.compat`
- `globalPartials`, `globalDecorators`, and `globalHelpers` are now removed and merged into
`partials`, `decorators`, and `helpers` instead

[Unreleased]: https://github.com/jbboehr/handlebars.c/compare/v4.0.5-p1...HEAD

0 comments on commit d04fcb7

Please sign in to comment.