-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Move analytics services into extension directory and make dep check stricter. #3147
Conversation
2f4312a
to
b9f312e
Compare
@cramforce does this affect the build size? (can you run gulp size if so) |
@@ -34,6 +34,25 @@ exports.rules = [ | |||
{ | |||
filesMatching: 'extensions/**/*.js', | |||
mustNotDependOn: 'src/service/**/*.js', | |||
whitelist: 'extensions/**/amp-analytics.js', | |||
}, | |||
// Files under src must under depend on extensions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"must under depend", is that right?
b9f312e
to
1849c91
Compare
…stricter. The dep check now has a whitelist that allows fine grained whitelisting.
1849c91
to
e108a32
Compare
Should not affect build size, but can run. Slightly updated PR to do whitelisting in a way that is more directed. |
There are some size changes, but I don't think they come from this. It should only move files around unless you see anything. The dependency graph is unchanged. |
@@ -125,6 +118,18 @@ Rule.prototype.matchBadDeps = function(moduleName, deps) { | |||
deps.forEach(dep => { | |||
this.mustNotDependOn_.forEach(badDepPattern => { | |||
if (minimatch(dep, badDepPattern)) { | |||
var inWhitelist = this.whitelist_.some(entry => { | |||
var pair = entry.split('->'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice feature 👍
@cramforce LGTM. awesome feature addition. |
The dep check now has a whitelist that allows fine grained whitelisting.