Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-import

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-import - npm Package Compare versions

Comparing version 5.1.0 to 5.1.1

6

CHANGELOG.md

@@ -1,3 +0,7 @@

# 5.1.0 - 2015-02-17
# 5.1.1 - 2015-04-10
- Fixed: regression of 5.1.0: files which only contain same @import rules were skip ([#31](https://github.com/postcss/postcss-import/issues/31))
# 5.1.0 - 2015-03-27
- Added: files with the same content will only be imported once. Previously, only the full path was used to determine if a file has already been imported in a given scope.

@@ -4,0 +8,0 @@ Now, we also test create a hash with the content of the file to check if a file with the same content has not already been imported.

24

index.js

@@ -194,15 +194,19 @@ "use strict";

var fileContentHash = hash(fileContent)
// skip files wich only contain @import rules
var newFileContent = fileContent.replace(/@import (.*);/,"")
if (newFileContent.trim() !== "") {
var fileContentHash = hash(fileContent)
// skip files already imported at the same scope and same hash
if (hashFiles[fileContentHash] && hashFiles[fileContentHash][media]) {
detach(atRule)
return
}
// skip files already imported at the same scope and same hash
if (hashFiles[fileContentHash] && hashFiles[fileContentHash][media]) {
detach(atRule)
return
}
// save hash files to skip them next time
if (!hashFiles[fileContentHash]) {
hashFiles[fileContentHash] = {}
// save hash files to skip them next time
if (!hashFiles[fileContentHash]) {
hashFiles[fileContentHash] = {}
}
hashFiles[fileContentHash][media] = true
}
hashFiles[fileContentHash][media] = true

@@ -209,0 +213,0 @@ var newStyles = postcss.parse(fileContent, options)

{
"name": "postcss-import",
"version": "5.1.0",
"version": "5.1.1",
"description": "PostCSS plugin to import CSS files",

@@ -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