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

Update to latest version of eco #16

Merged
merged 6 commits into from
Sep 4, 2020
Merged

Update to latest version of eco #16

merged 6 commits into from
Sep 4, 2020

Conversation

cesine
Copy link
Collaborator

@cesine cesine commented Jul 22, 2020

Why?

We are unable to build our project with Node 12 dativebase/dative#324, we added a test to eco and found that the latest eco master does resolve this issue cesine/eco#9.

Is the -rc ready for use?

Before eco was archived, it had a few release candidates that were published https://www.npmjs.com/package/eco

Screen Shot 2020-07-22 at 12 09 13 PM

While these are -rc release candidates which we would normally not pull in, eco is now archived so there wont be any future releases from the official repo.

The new 1.1.0-rc release candidates, and eco master, has an important improvement for handling escaping and sanitizing input. I found several forks which have been using (and building upon) the new release candidates https://github.com/cesine/eco/pulls.

I found that the new -rc have a breaking change where compile is now returning a bare function sstephenson/eco@8ab3bec

We are able to take this -rc into grunt-eco without affecting grunt-eco's interface, which means consumers will be able to get the updates via a minor version on grunt-eco.

How this was tested

Screen Shot 2020-07-22 at 11 34 46 AM

  • Manually test the resulting templates using non-amd in a consuming project

Screen Shot 2020-07-22 at 11 24 25 AM

  • Update test fixtures, and reviewed the diff without whitespace to ensure the functionality is still there, is just been updated to use the new escape and sanitize inside the function:

Screen Shot 2020-07-22 at 11 36 23 AM

$ grunt
Running "jshint:gruntfile" (jshint) task
>> 1 file lint free.
Running "jshint:tasks" (jshint) task
>> 1 file lint free.
Running "jshint:tests" (jshint) task
>> 1 file lint free.
Running "clean:test" (clean) task
>> 0 paths cleaned.
Running "eco:filesTest" (eco) task
File tmp/filesTest/all.js created.
File tmp/filesTest/flatOnly.js created.
Running "eco:srcDestTest" (eco) task
File tmp/srcDestTest/all.js created.
Running "eco:expandTest" (eco) task
File tmp/expandTest/tests/fixtures/advanced-example.js created.
File tmp/expandTest/tests/fixtures/empty.js created.
File tmp/expandTest/tests/fixtures/example.js created.
File tmp/expandTest/tests/fixtures/nested/example.js created.
Running "eco:basePathStringTest" (eco) task
File tmp/basePathStringTest/all.js created.
Running "eco:basePathFunctionTest" (eco) task
File tmp/basePathFunctionTest/all.js created.
Running "eco:amdTest" (eco) task
File tmp/amdTest/tests/fixtures/advanced-example.js created.
File tmp/amdTest/tests/fixtures/empty.js created.
File tmp/amdTest/tests/fixtures/example.js created.
File tmp/amdTest/tests/fixtures/nested/example.js created.
Running "eco:noJstGlobalCheckTest" (eco) task
File tmp/noJstGlobalCheckTest/all.js created.
Running "nodeunit:tests" (nodeunit) task
Testing eco_test.js.......OK
>> 12 assertions passed (7ms)
Done.
The command "grunt" exited with 0.

Travis results https://travis-ci.com/github/cesine/grunt-eco/builds/176743879

Screen Shot 2020-07-22 at 12 07 57 PM

@cesine cesine merged commit f66f6a4 into tommcc:master Sep 4, 2020
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.

None yet

1 participant