Socket
Socket
Sign inDemoInstall

postcss-modules-local-by-default

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-modules-local-by-default - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

10

CHANGELOG.md

@@ -9,2 +9,9 @@ # Change Log

## [0.0.9] - 2015-06-12
### Changed
- Using global selectors outside of a global context no longer triggers warnings. Instead, this functionality will be provided by a CSS Modules linter.
### Fixed
- Keyframe rules.
## [0.0.8] - 2015-06-11

@@ -49,3 +56,3 @@ ### Added

[unreleased]: https://github.com/postcss-modules-local-by-default/compare/v0.0.8...HEAD
[unreleased]: https://github.com/postcss-modules-local-by-default/compare/v0.0.9...HEAD
[0.0.2]: https://github.com/postcss-modules-local-by-default/compare/v0.0.1...v0.0.2

@@ -58,1 +65,2 @@ [0.0.3]: https://github.com/postcss-modules-local-by-default/compare/v0.0.2...v0.0.3

[0.0.8]: https://github.com/postcss-modules-local-by-default/compare/v0.0.7...v0.0.8
[0.0.9]: https://github.com/postcss-modules-local-by-default/compare/v0.0.8...v0.0.9

28

index.js

@@ -34,3 +34,2 @@ var postcss = require('postcss');

context.hasPureGlobals = false;
context.hasPureImplicitGlobals = false;
newNodes = node.nodes.map(function(n) {

@@ -41,3 +40,2 @@ var nContext = {

hasLocals: false,
hasImplicitGlobals: false,
explicit: false

@@ -54,5 +52,2 @@ };

context.hasPureGlobals = true;
if(nContext.hasImplicitGlobals) {
context.hasPureImplicitGlobals = true;
}
}

@@ -107,3 +102,2 @@ return n;

hasLocals: false,
hasImplicitGlobals: false,
explicit: true

@@ -123,3 +117,2 @@ };

hasLocals: false,
hasImplicitGlobals: false,
explicit: context.explicit

@@ -136,14 +129,4 @@ };

}
if(subContext.hasImplicitGlobals) {
context.hasImplicitGlobals = true;
}
break;
case "attribute":
case "element":
if(!context.global && !context.explicit) {
context.hasImplicitGlobals = true;
}
break;
case "id":

@@ -240,2 +223,6 @@ case "class":

css.eachRule(function(rule) {
if(rule.parent.type === "atrule" && /keyframes$/.test(rule.parent.name)) {
// ignore keyframe rules
return;
}
var selector = Tokenizer.parse(rule.selector);

@@ -245,4 +232,3 @@ var context = {

global: globalMode,
hasPureGlobals: false,
hasPureImplicitGlobals: false
hasPureGlobals: false
};

@@ -259,6 +245,2 @@ var newSelector;

}
if(!globalMode && context.hasPureImplicitGlobals) {
throw rule.error("Selector '" + Tokenizer.stringify(selector) + "' must be explicit flagged :global " +
"(elsewise it would leak globally)");
}
rule.nodes.forEach(function(decl) {

@@ -265,0 +247,0 @@ localizeDecl(decl, context);

{
"name": "postcss-modules-local-by-default",
"version": "0.0.8",
"version": "0.0.9",
"description": "A CSS Modules transform to make local scope the default",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc