Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer performs template substition on default, with option to override #97

Merged
merged 2 commits into from
Jan 15, 2018

Conversation

sjoblomj
Copy link
Contributor

If a binary file contains an unmatched number of '<%' and '%>, ejs.render will throw an exception. This prevents a user from copying a directory where e.g. one file out of many breaks. With this commit, ejs template substition will not be performed on binary files by default, although that can still be achieved by setting forceBinarySubstition: true.

Note that this commit changes the applications' behaviour. Users may depend on ejb template substition being performed on binary files, but that will no longer happen, unless they explicitly set forceBinarySubstition: true. I considered toggling the logic, i.e. naming it noBinarySubstition, which would allow the application to keep behaving the same way, but still allow the user to copy binary files without performing template substition on them. However, as this application is used by yeoman generators, I figured that this behaviour is what a user would expect and is the least intrusive.

@SBoudrias
Copy link
Owner

Thanks for the PR! Let's just remove the forceBinarySubstition option and just always skip binary files.

@SBoudrias
Copy link
Owner

Awesome thanks a lot!

@SBoudrias SBoudrias merged commit 4429bab into SBoudrias:master Jan 15, 2018
SBoudrias pushed a commit that referenced this pull request Apr 2, 2019
## The dependency [globby](https://github.com/sindresorhus/globby) was updated from `8.0.2` to `9.1.0`.
This version is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

---

<details>
<summary>Release Notes for v9.1.0</summary>

<ul>
<li>Add TypeScript definition (<a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="416512295" data-permission-text="Issue title is private" data-url="sindresorhus/globby#111" data-hovercard-type="pull_request" data-hovercard-url="/sindresorhus/globby/pull/111/hovercard" href="https://urls.greenkeeper.io/sindresorhus/globby/pull/111">#111</a>)  <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/sindresorhus/globby/commit/9a9cf1e53f3033f465d682487c3e23bd61696c37/hovercard" href="https://urls.greenkeeper.io/sindresorhus/globby/commit/9a9cf1e53f3033f465d682487c3e23bd61696c37"><tt>9a9cf1e</tt></a></li>
<li>Add check to ensure <code>cwd</code> is a directory (<a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="414218230" data-permission-text="Issue title is private" data-url="sindresorhus/globby#110" data-hovercard-type="pull_request" data-hovercard-url="/sindresorhus/globby/pull/110/hovercard" href="https://urls.greenkeeper.io/sindresorhus/globby/pull/110">#110</a>)  <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/sindresorhus/globby/commit/59f4b48e92445d530bbf43a39842314b3dd6e42e/hovercard" href="https://urls.greenkeeper.io/sindresorhus/globby/commit/59f4b48e92445d530bbf43a39842314b3dd6e42e"><tt>59f4b48</tt></a></li>
<li>Deduplicate identical file patterns (<a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="398284025" data-permission-text="Issue title is private" data-url="sindresorhus/globby#102" data-hovercard-type="pull_request" data-hovercard-url="/sindresorhus/globby/pull/102/hovercard" href="https://urls.greenkeeper.io/sindresorhus/globby/pull/102">#102</a>)  <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/sindresorhus/globby/commit/22946186ff2f0f89893382d6e13d7a6215231dc0/hovercard" href="https://urls.greenkeeper.io/sindresorhus/globby/commit/22946186ff2f0f89893382d6e13d7a6215231dc0"><tt>2294618</tt></a></li>
</ul>
<p><a class="commit-link" href="https://urls.greenkeeper.io/sindresorhus/globby/compare/v9.0.0...v9.1.0"><tt>v9.0.0...v9.1.0</tt></a></p>
</details>

<details>
<summary>Commits</summary>
<p>The new version differs by 19 commits ahead by 19, behind by 2.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/sindresorhus/globby/commit/89cee24d7dd225279549f59023f905a9062c96b5"><code>89cee24</code></a> <code>9.1.0</code></li>
<li><a href="https://urls.greenkeeper.io/sindresorhus/globby/commit/59f4b48e92445d530bbf43a39842314b3dd6e42e"><code>59f4b48</code></a> <code>Add check to ensure <code>cwd</code> is a directory (#110)</code></li>
<li><a href="https://urls.greenkeeper.io/sindresorhus/globby/commit/9a9cf1e53f3033f465d682487c3e23bd61696c37"><code>9a9cf1e</code></a> <code>Add TypeScript definition (#111)</code></li>
<li><a href="https://urls.greenkeeper.io/sindresorhus/globby/commit/eb26c7e906ef30f2981dfa6c437cd6e13650dfda"><code>eb26c7e</code></a> <code>Meta tweaks</code></li>
<li><a href="https://urls.greenkeeper.io/sindresorhus/globby/commit/d77a623a5d397260d952c84830c0240955ece808"><code>d77a623</code></a> <code>Add failing test for #105 (#108)</code></li>
<li><a href="https://urls.greenkeeper.io/sindresorhus/globby/commit/22946186ff2f0f89893382d6e13d7a6215231dc0"><code>2294618</code></a> <code>Deduplicate identical file patterns (#102)</code></li>
<li><a href="https://urls.greenkeeper.io/sindresorhus/globby/commit/ba9c267a2a0f85b440138f539def02f0c0220929"><code>ba9c267</code></a> <code>Add failing test for #97 (#100)</code></li>
<li><a href="https://urls.greenkeeper.io/sindresorhus/globby/commit/71b9c58f86b4625b58ae241360016f4418dac288"><code>71b9c58</code></a> <code>9.0.0</code></li>
<li><a href="https://urls.greenkeeper.io/sindresorhus/globby/commit/39ad0d9a72794a74c777a2656fa5edef70e1170d"><code>39ad0d9</code></a> <code>Update dependencies</code></li>
<li><a href="https://urls.greenkeeper.io/sindresorhus/globby/commit/d80422881de179c23726bbddd02c0402a797186b"><code>d804228</code></a> <code>Fix compatibility with latest <code>dir-glob</code> release (#99)</code></li>
<li><a href="https://urls.greenkeeper.io/sindresorhus/globby/commit/7f9f31b663dfe84769a4f42dd26bd315cac92169"><code>7f9f31b</code></a> <code>Fix Travis badge (#95)</code></li>
<li><a href="https://urls.greenkeeper.io/sindresorhus/globby/commit/94cef2f69bc58a9becb592f00b7b676155cdc0bb"><code>94cef2f</code></a> <code>CI updates (#96)</code></li>
<li><a href="https://urls.greenkeeper.io/sindresorhus/globby/commit/c1c744dd7848d15ea277db6b75cec7a1e4d7576e"><code>c1c744d</code></a> <code>Rename the <code>opts</code> property returned from <code>.generateGlobTasks</code> to <code>options</code></code></li>
<li><a href="https://urls.greenkeeper.io/sindresorhus/globby/commit/8815ee8ca3cd1a05e52a2a0c0cc15918aa63bce9"><code>8815ee8</code></a> <code>Require Node.js 6 and upgrade dependencies</code></li>
<li><a href="https://urls.greenkeeper.io/sindresorhus/globby/commit/84632f11de790c5b6abeb7aa0bdd35c77126dcfc"><code>84632f1</code></a> <code>Fix <code>expandDirectories</code> and <code>ignores</code> option working together (#88)</code></li>
</ul>
<p>There are 19 commits in total.</p>
<p>See the <a href="https://urls.greenkeeper.io/sindresorhus/globby/compare/946fcea913beb06817d91d8ffb5b4dfe09719a1c...89cee24d7dd225279549f59023f905a9062c96b5">full diff</a></p>
</details>

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants