Skip to content

Fix logic for release-canary grunt task #1

@ryanzec

Description

@ryanzec

I think there is an issue with how the release-canary grunt task works. On https://github.com/dalekjs/dalek-build-tools/blob/master/tasks/releaseCanary.js#L9 there is a _.clone() call that is making a clone for the canary version of the dependencies however this is a shallow clone. Since this is a shallow clone, when the canaryPkg.dependencies get modified on lines https://github.com/dalekjs/dalek-build-tools/blob/master/tasks/releaseCanary.js#L15-20, it is also modifying the pkg.dependencies.

Then on line https://github.com/dalekjs/dalek-build-tools/blob/master/tasks/releaseCanary.js#L30 where it is making the changes to the file contents, I believe pack at that point will have -canary at the end so it will look for instances that have -canary and add another -canary (which I believe it why we are getting the -canary-canary issue in another place in the code).

If https://github.com/dalekjs/dalek-build-tools/blob/master/tasks/releaseCanary.js#L9 were changes to:

var canaryPkg = grunt.util._.clone(pkg, true);

That would create a deep clone and than modifying canaryPkg.dependencies should not effect pkg.dependencies.

You can also undo dalekjs/dalek-driver-native#9 which was to fix what the change I am recommend here should fix.

I would make this change myself however I don't have an environment to test this locally (for all I know, I am completely wrong) so I will assign this to @asciidisco since he does have a way to test this locally.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions