mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Merge branch 'devel' into release-1.8.1
This commit is contained in:
@@ -1515,9 +1515,9 @@ function defaultValidateNewUserHook(user) {
|
||||
emailIsGood = user.emails.reduce(
|
||||
(prev, email) => prev || this._testEmailDomain(email.address), false
|
||||
);
|
||||
} else if (user.services && user.services.length > 0) {
|
||||
} else if (user.services && Object.values(user.services).length > 0) {
|
||||
// Find any email of any service and check it
|
||||
emailIsGood = user.services.reduce(
|
||||
emailIsGood = Object.values(user.services).reduce(
|
||||
(prev, service) => service.email && this._testEmailDomain(service.email),
|
||||
false,
|
||||
);
|
||||
|
||||
@@ -30,8 +30,8 @@ import { ClientVersions } from "./client_versions.js";
|
||||
const clientArch = Meteor.isCordova ? "web.cordova" :
|
||||
Meteor.isModern ? "web.browser" : "web.browser.legacy";
|
||||
|
||||
const autoupdateVersions =
|
||||
__meteor_runtime_config__.autoupdate.versions[clientArch] || {
|
||||
const autoupdateVersions =
|
||||
((__meteor_runtime_config__.autoupdate || {}).versions || {})[clientArch] || {
|
||||
version: "unknown",
|
||||
versionRefreshable: "unknown",
|
||||
versionNonRefreshable: "unknown",
|
||||
|
||||
1770
packages/minifier-css/.npm/package/npm-shrinkwrap.json
generated
1770
packages/minifier-css/.npm/package/npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load Diff
@@ -92,9 +92,15 @@ Tinytest.add(
|
||||
(test) => {
|
||||
const css1 = '@import "custom.css"; body { color: "red"; }';
|
||||
const css2 = 'body { color: "blue"; }';
|
||||
const cssAst1 = CssTools.parseCss(css1);
|
||||
const cssAst2 = CssTools.parseCss(css2);
|
||||
const cssAst1 = CssTools.parseCss(css1, {from: "test.css"});
|
||||
const cssAst2 = CssTools.parseCss(css2, {from: "test2.css"});
|
||||
const mergedAst = CssTools.mergeCssAsts([cssAst1, cssAst2]);
|
||||
const stringifiedAsts = CssTools.stringifyCss(mergedAst, {
|
||||
sourcemap: true,
|
||||
inputSourcemaps: false
|
||||
});
|
||||
test.equal(mergedAst.nodes.length, 3);
|
||||
test.equal(stringifiedAsts.map.sources.length, 2);
|
||||
test.equal(stringifiedAsts.map.sources[0], 'test.css');
|
||||
}
|
||||
);
|
||||
|
||||
@@ -21,7 +21,7 @@ const CssTools = {
|
||||
options.from = options.source;
|
||||
delete options.source;
|
||||
}
|
||||
return postcss().process(cssText, options).root;
|
||||
return postcss.parse(cssText, options);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -45,14 +45,13 @@ const CssTools = {
|
||||
};
|
||||
delete options.sourcemap;
|
||||
}
|
||||
// explicitly set from to undefined to prevent postcss warnings
|
||||
if (!options.from){
|
||||
options.from = void 0;
|
||||
}
|
||||
|
||||
transformResult = cssAst.toResult(options);
|
||||
|
||||
const f = new Future;
|
||||
postcss().process(cssAst, options).then(result => {
|
||||
f.return(result);
|
||||
}).catch(error => {
|
||||
f.throw(error);
|
||||
});
|
||||
transformResult = f.wait();
|
||||
return {
|
||||
code: transformResult.css,
|
||||
map: transformResult.map ? transformResult.map.toJSON() : null,
|
||||
@@ -67,7 +66,11 @@ const CssTools = {
|
||||
*/
|
||||
minifyCss(cssText) {
|
||||
const f = new Future;
|
||||
postcss([ cssnano({ safe: true }) ]).process(cssText).then(result => {
|
||||
postcss([
|
||||
cssnano({ safe: true }),
|
||||
]).process(cssText, {
|
||||
from: void 0,
|
||||
}).then(result => {
|
||||
f.return(result.css);
|
||||
}).catch(error => {
|
||||
f.throw(error);
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
Package.describe({
|
||||
summary: 'CSS minifier',
|
||||
version: '1.4.0'
|
||||
version: '1.4.1'
|
||||
});
|
||||
|
||||
Npm.depends({
|
||||
postcss: '6.0.13',
|
||||
cssnano: '3.10.0'
|
||||
postcss: '7.0.5',
|
||||
cssnano: '4.1.7'
|
||||
});
|
||||
|
||||
Package.onUse(function (api) {
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"@babel/runtime": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0.tgz",
|
||||
"integrity": "sha512-7hGhzlcmg01CvH1EHdSPVXYX1aJ8KCEyz6I9xYIi/asDtzBPMyMhVibhM/K6g/5qnKBwjZtp10bNZIEFTRW1MA=="
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.1.2.tgz",
|
||||
"integrity": "sha512-Y3SCjmhSupzFB6wcv1KmmFucH6gDVnI30WjOcicV10ju0cZjak3Jcs67YLIXBrmZYw1xCrVeJPbycFwrqNyxpg=="
|
||||
},
|
||||
"lru-cache": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.1.tgz",
|
||||
"integrity": "sha1-E0OVXtry432bnn7nJB4nxLn7cr4="
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz",
|
||||
"integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA=="
|
||||
},
|
||||
"pseudomap": {
|
||||
"version": "1.0.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
name: 'standard-minifier-css',
|
||||
version: '1.5.1',
|
||||
version: '1.5.2',
|
||||
summary: 'Standard css minifier used with Meteor apps by default.',
|
||||
documentation: 'README.md'
|
||||
});
|
||||
@@ -11,9 +11,9 @@ Package.registerBuildPlugin({
|
||||
'minifier-css'
|
||||
],
|
||||
npmDependencies: {
|
||||
"@babel/runtime": "7.0.0",
|
||||
"@babel/runtime": "7.1.2",
|
||||
"source-map": "0.5.6",
|
||||
"lru-cache": "4.0.1"
|
||||
"lru-cache": "4.1.3"
|
||||
},
|
||||
sources: [
|
||||
'plugin/minify-css.js'
|
||||
|
||||
Reference in New Issue
Block a user