Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch '4.x' into merge-4.x
  • Loading branch information
jaylinski committed Dec 29, 2021
2 parents 4da5882 + e2f63da commit 82c6132
Show file tree
Hide file tree
Showing 100 changed files with 425 additions and 280 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Expand Up @@ -5,3 +5,7 @@ indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.yml]
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
3 changes: 1 addition & 2 deletions .eslintignore
Expand Up @@ -4,7 +4,6 @@
*.sublime-project
*.sublime-workspace
npm-debug.log
sauce_connect.log*
.idea
yarn-error.log
node_modules
Expand All @@ -14,7 +13,7 @@ node_modules
# Generated files
/coverage/
/dist/
/integration-testing/*/dist/
/tests/integration/*/dist/

# Third-party or files that must remain unchanged
/spec/expected/
Expand Down
9 changes: 9 additions & 0 deletions .github/dependabot.yml
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
open-pull-requests-limit: 0
schedule:
interval: weekly
allow:
- dependency-type: production
89 changes: 89 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,89 @@
name: CI

on:
push:
branches:
- master
pull_request: {}

jobs:
lint:
name: Lint
runs-on: 'ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

test:
name: Test (Node)
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: ['ubuntu-latest', 'windows-latest']
# https://nodejs.org/en/about/releases/
node-version: ['10', '12', '14', '16', '17']

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci

- name: Test
run: npm run test

- name: Test (Integration)
# https://github.com/webpack/webpack/issues/14532
if: ${{ matrix.node-version != '17' }}
run: |
cd ./tests/integration/rollup-test && ./test.sh && cd -
cd ./tests/integration/webpack-babel-test && ./test.sh && cd -
cd ./tests/integration/webpack-test && ./test.sh && cd -
browser:
name: Test (Browser)
runs-on: 'ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install dependencies
run: npm ci

- name: Install Playwright
run: |
npx playwright install-deps
npx playwright install
- name: Build
run: npx grunt prepare

- name: Test
run: npm run test:browser
3 changes: 1 addition & 2 deletions .gitignore
Expand Up @@ -4,7 +4,6 @@
*.sublime-project
*.sublime-workspace
npm-debug.log
sauce_connect.log*
.idea
/yarn-error.log
/yarn.lock
Expand All @@ -15,5 +14,5 @@ node_modules
# Generated files
/coverage/
/dist/
/integration-testing/*/dist/
/tests/integration/*/dist/
/spec/tmp/*
2 changes: 1 addition & 1 deletion .prettierignore
Expand Up @@ -14,7 +14,7 @@ node_modules
# Generated files
/coverage/
/dist/
/integration-testing/*/dist/
/tests/integration/*/dist/

# Third-party or files that must remain unchanged
/spec/expected/
Expand Down
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

28 changes: 12 additions & 16 deletions CONTRIBUTING.md
Expand Up @@ -6,23 +6,22 @@ Please don't open issues for security issues. Instead, file a report at https://

## Reporting Issues

Please see our [FAQ](https://github.com/wycats/handlebars.js/blob/master/FAQ.md) for common issues that people run into.
Please see our [FAQ](https://github.com/handlebars-lang/handlebars.js/blob/master/FAQ.md) for common issues that people run into.

Should you run into other issues with the project, please don't hesitate to let us know by filing an [issue][issue]!

In general we are going to ask for an **example** of the problem failing, which can be as simple as a jsfiddle/jsbin/etc. We've put together a jsfiddle **[template][jsfiddle]** to ease this. (We will keep this link up to date as new releases occur, so feel free to check back here).

Pull requests containing only failing tests demonstrating the issue are welcomed and this also helps ensure that your issue won't regress in the future once it's fixed.

Documentation issues on the handlebarsjs.com site should be reported on [handlebars-site](https://github.com/wycats/handlebars-site).
Documentation issues on the [handlebarsjs.com](https://handlebarsjs.com) site should be reported on [handlebars-lang/docs](https://github.com/handlebars-lang/docs).

## Branches

- The branch `4.x` contains the currently released version. Bugfixes should be made in this branch.
- The branch `master` contains the next version. A release date is not yet specified. Maintainers
should merge the branch `4.x` into the master branch regularly.

* The branch `3.x` comtains the legacy version `3.x`. Bugfixes are applied seperately (if needed). The branch will not
- The branch `3.x` contains the legacy version `3.x`. Bugfixes are applied separately (if needed). The branch will not
be merged with any of the other branches.

## Pull Requests
Expand Down Expand Up @@ -56,7 +55,7 @@ You can also run our set of benchmarks with `grunt bench`.
The `grunt dev` implements watching for tests and allows for in browser testing at `http://localhost:9999/spec/`.

If you notice any problems, please report them to the GitHub issue tracker at
[http://github.com/wycats/handlebars.js/issues](http://github.com/wycats/handlebars.js/issues).
[http://github.com/handlebars-lang/handlebars.js/issues](http://github.com/handlebars-lang/handlebars.js/issues).

## Running Tests

Expand Down Expand Up @@ -87,38 +86,35 @@ We do linting and formatting in two phases:

- Committed files are linted and formatted in a pre-commit hook. In this stage eslint-errors are forbidden,
while warnings are allowed.
- The travis-ci job also lints all files and checks if they are formatted correctly. In this stage, warnings
- The GitHub CI job also lints all files and checks if they are formatted correctly. In this stage, warnings
are forbidden.

You can use the following scripts to make sure that the travis-job does not fail:
You can use the following scripts to make sure that the CI job does not fail:

- **npm run lint** will run `eslint` and fail on warnings
- **npm run format** will run `prettier` on all files
- **npm run check-before-pull-request** will perform all most checks that travis does in its build-job, excluding the "integration-test".
- **npm run check-before-pull-request** will perform all most checks that our CI job does in its build-job, excluding the "integration-test".
- **npm run integration-test** will run integration tests (using old NodeJS versions and integrations with webpack, babel and so on)
These tests only work on a Linux-machine with `nvm` installed (for running tests in multiple versions of NodeJS).

## Releasing the latest version

Before attempting the release Handlebars, please make sure that you have the following authorizations:

- Push-access to `wycats/handlebars.js`
- Push-access to `handlebars-lang/handlebars.js`
- Publishing rights on npmjs.com for the `handlebars` package
- Publishing rights on gemfury for the `handlebars-source` package
- Push-access to the repo for legacy package managers: `components/handlebars`
- Push-access to the production-repo of the handlebars site: `handlebars-lang/handlebarsjs.com-github-pages`

_When releasing a previous version of Handlebars, please look into the CONTRIBUNG.md in the corresponding branch._

Handlebars utilizes the [release yeoman generator][generator-release] to perform most release tasks.

A full release may be completed with the following:

```
npm ci
yo release
npx grunt
npm publish
yo release:publish components handlebars.js dist/components/
cd dist/components/
gem build handlebars-source.gemspec
Expand All @@ -135,13 +131,13 @@ in those places still point to the latest version

When everything is OK, the **handlebars site** needs to be updated.

Go to the master branch of the repo [handlebars-lang/handlebarsjs.com-github-pages](https://github.com/handlebars-lang/handlebarsjs.com-github-pages/tree/master)
Go to the master branch of the repo [handlebars-lang/docs](https://github.com/handlebars-lang/docs/tree/master)
and make a minimal change to the README. This will invoke a github-action that redeploys
the site, fetching the latest version-number from the npm-registry.
(note that the default-branch of this repo is not the master and regular changes are done
in the `handlebars-lang/docs`-repo).

[generator-release]: https://github.com/walmartlabs/generator-release
[pull-request]: https://github.com/wycats/handlebars.js/pull/new/master
[issue]: https://github.com/wycats/handlebars.js/issues/new
[pull-request]: https://github.com/handlebars-lang/handlebars.js/pull/new/master
[issue]: https://github.com/handlebars-lang/handlebars.js/issues/new
[jsfiddle]: https://jsfiddle.net/4nbwjaqz/4/
8 changes: 5 additions & 3 deletions FAQ.md
Expand Up @@ -2,11 +2,11 @@

## How can I file a bug report:

See our guidelines on [reporting issues](https://github.com/wycats/handlebars.js/blob/master/CONTRIBUTING.md#reporting-issues).
See our guidelines on [reporting issues](https://github.com/handlebars-lang/handlebars.js/blob/master/CONTRIBUTING.md#reporting-issues).

## Why isn't my Mustache template working?

Handlebars deviates from Mustache slightly on a few behaviors. These variations are documented in our [readme](https://github.com/wycats/handlebars.js#differences-between-handlebarsjs-and-mustache).
Handlebars deviates from Mustache slightly on a few behaviors. These variations are documented in our [readme](https://github.com/handlebars-lang/handlebars.js#differences-between-handlebarsjs-and-mustache).

## Why is it slower when compiling?

Expand Down Expand Up @@ -36,16 +36,18 @@
```sh
handlebars --version
```

If using the integrated precompiler and

```javascript
console.log(Handlebars.VERSION);
```

On the client side.

We include the built client libraries in the npm package for those who want to be certain that they are using the same client libraries as the compiler.

Should these match, please file an issue with us, per our [issue filing guidelines](https://github.com/wycats/handlebars.js/blob/master/CONTRIBUTING.md#reporting-issues).
Should these match, please file an issue with us, per our [issue filing guidelines](https://github.com/handlebars-lang/handlebars.js/blob/master/CONTRIBUTING.md#reporting-issues).

## How do I load the runtime library when using AMD?

Expand Down

0 comments on commit 82c6132

Please sign in to comment.