Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
51b825d6
Commit
51b825d6
authored
11 years ago
by
Chris Rebert
Browse files
Options
Download
Email Patches
Plain Diff
fix
#12959
parent
30bbab06
4 merge requests
!28721
Hot test
,
!12972
Exclude `resolved` from npm shrinkwrap to avoid irrelevant changes
,
!22103
test
,
!25326
Adjust examples
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
grunt/shrinkwrap.js
+14
-1
grunt/shrinkwrap.js
with
14 additions
and
1 deletion
+14
-1
grunt/shrinkwrap.js
+
14
-
1
View file @
51b825d6
...
...
@@ -14,13 +14,26 @@ var NON_CANONICAL_FILE = 'npm-shrinkwrap.json';
var
DEST_FILE
=
'
test-infra/npm-shrinkwrap.canonical.json
'
;
function
cleanup
(
shrinkwrap
)
{
// Remove `resolved` property to avoid irrelevant changes
// See https://github.com/npm/npm/issues/3581
if
((
typeof
shrinkwrap
)
===
'
string
'
)
{
return
shrinkwrap
;
}
delete
shrinkwrap
.
resolved
;
for
(
var
key
in
shrinkwrap
)
{
shrinkwrap
[
key
]
=
cleanup
(
shrinkwrap
[
key
]);
}
return
shrinkwrap
;
}
function
updateShrinkwrap
(
grunt
)
{
// Assumption: Non-canonical shrinkwrap already generated by prerequisite Grunt task
var
shrinkwrapData
=
grunt
.
file
.
readJSON
(
NON_CANONICAL_FILE
);
grunt
.
log
.
writeln
(
'
Deleting
'
+
NON_CANONICAL_FILE
.
cyan
+
'
...
'
);
grunt
.
file
.
delete
(
NON_CANONICAL_FILE
);
// Output as Canonical JSON in correct location
grunt
.
file
.
write
(
DEST_FILE
,
canonicallyJsonStringify
(
shrinkwrapData
));
grunt
.
file
.
write
(
DEST_FILE
,
canonicallyJsonStringify
(
cleanup
(
shrinkwrapData
))
)
;
grunt
.
log
.
writeln
(
'
File
'
+
DEST_FILE
.
cyan
+
'
updated.
'
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets