Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 12, 2024 via pnpm

postcss-import 8.1.3

PostCSS plugin to import CSS files
Package summary
Share
28
issues
1
critical severity
license
1
18
high severity
vulnerability
3
license
2
meta
13
5
moderate severity
vulnerability
5
4
low severity
vulnerability
2
license
2
12
licenses
292
MIT
31
ISC
12
Apache-2.0
17
other licenses
BSD-3-Clause
7
BSD-2-Clause
3
BSD-3-Clause OR MIT
1
(MIT OR Apache-2.0)
1
+ 5 more
Package created
10 Aug 2014
Version published
3 Nov 2016
Maintainers
2
Total deps
352
Direct deps
7
License
MIT

Issues

28

1 critical severity issue

critical
Recommendation: Check the package code and files for license information
via: pkg-resolve@0.1.14
Collapse
Expand

18 high severity issues

high
Recommendation: Upgrade to version 5.1.2 or later
via: pkg-resolve@0.1.14
Recommendation: Upgrade to version 2.1.1 or later
via: pkg-resolve@0.1.14
Recommendation: Upgrade to version 1.0.2 or later
via: pkg-resolve@0.1.14
Recommendation: Validate that the package complies with your license policy
via: pkg-resolve@0.1.14
Recommendation: Validate that the package complies with your license policy
via: pkg-resolve@0.1.14
via: pkg-resolve@0.1.14
via: pkg-resolve@0.1.14
via: pkg-resolve@0.1.14
via: pkg-resolve@0.1.14
via: pkg-resolve@0.1.14
via: pkg-resolve@0.1.14
via: pkg-resolve@0.1.14
via: pkg-resolve@0.1.14
via: pkg-resolve@0.1.14
via: pkg-resolve@0.1.14
via: pkg-resolve@0.1.14
via: pkg-resolve@0.1.14
via: pkg-resolve@0.1.14
Collapse
Expand

5 moderate severity issues

moderate
Recommendation: None
via: pkg-resolve@0.1.14
Recommendation: Upgrade to version 7.0.36 or later
via: postcss@5.2.18
Recommendation: Upgrade to version 8.4.31 or later
via: postcss@5.2.18
Recommendation: Upgrade to version 5.7.2 or later
via: pkg-resolve@0.1.14
Recommendation: Upgrade to version 4.1.3 or later
via: pkg-resolve@0.1.14
Collapse
Expand

4 low severity issues

low
Recommendation: Upgrade to version 2.3.1 or later
via: pkg-resolve@0.1.14
Recommendation: Upgrade to version 2.3.1 or later
via: pkg-resolve@0.1.14
Recommendation: Read and validate the license terms
via: pkg-resolve@0.1.14
Recommendation: Read and validate the license terms
via: pkg-resolve@0.1.14
Collapse
Expand

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
292 Packages, Including:
@types/estree@0.0.38
@types/node@20.11.26
ajv@6.12.6
align-text@0.1.4
ansi-regex@2.1.1
ansi-styles@2.2.1
any-promise@0.1.0
arr-diff@2.0.0
arr-diff@4.0.0
arr-flatten@1.1.0
arr-union@3.1.0
array-each@1.0.1
array-slice@1.1.0
array-unique@0.2.1
array-unique@0.3.2
asn1@0.2.6
assert-plus@1.0.0
assign-symbols@1.0.0
asynckit@0.4.0
aws4@1.12.0
babel-code-frame@6.26.0
babel-core@6.26.3
babel-generator@6.26.1
babel-helper-hoist-variables@6.24.1
babel-helpers@6.24.1
babel-messages@6.23.0
babel-plugin-syntax-dynamic-import@6.18.0
babel-plugin-transform-amd-system-wrapper@0.3.7
babel-plugin-transform-cjs-system-wrapper@0.6.2
babel-plugin-transform-es2015-modules-systemjs@6.24.1
babel-plugin-transform-global-system-wrapper@0.3.4
babel-plugin-transform-system-register@0.0.1
babel-register@6.26.0
babel-runtime@6.26.0
babel-template@6.26.0
babel-traverse@6.26.0
babel-types@6.26.0
babylon@6.18.0
balanced-match@1.0.2
base@0.11.2
bl@1.2.3
bluebird@3.7.2
brace-expansion@1.1.11
braces@1.8.5
braces@2.3.2
buffer-alloc-unsafe@1.1.0
buffer-alloc@1.2.0
buffer-fill@1.0.0
buffer-peek-stream@1.1.0
cache-base@1.0.1

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
31 Packages, Including:
anymatch@1.3.2
chownr@1.1.4
cliui@2.1.0
d@1.0.2
es5-ext@0.10.64
es6-symbol@3.1.4
esniff@1.1.3
esniff@2.0.1
ext@1.7.0
fs.realpath@1.0.0
glob-parent@2.0.0
glob@5.0.15
glob@6.0.4
glob@7.2.3
graceful-fs@4.2.11
har-schema@2.0.0
inflight@1.0.6
inherits@2.0.4
ini@1.3.8
isexe@2.0.0
json-stringify-safe@5.0.1
minimatch@3.1.2
next-tick@1.1.0
once@1.4.0
remove-trailing-separator@1.1.0
rimraf@2.7.1
semver@4.3.6
semver@5.7.2
type@2.7.2
which@1.3.1
wrappy@1.0.2

Apache License 2.0

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
use-patent-claims
place-warranty
Cannot
hold-liable
use-trademark
Must
include-copyright
include-license
state-changes
include-notice
12 Packages, Including:
aws-sign2@0.7.0
bser@2.1.1
caseless@0.12.0
fb-watchman@2.0.2
forever-agent@0.6.1
jspm@0.17.0-beta.49
oauth-sign@0.9.0
pkg-resolve@0.1.14
request@2.88.2
traceur@0.0.105
tunnel-agent@0.6.0
walker@1.0.8

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
7 Packages, Including:
bcrypt-pbkdf@1.0.2
js-base64@2.6.4
makeerror@1.0.12
qs@6.5.3
source-map@0.5.7
tmpl@1.0.5
tough-cookie@2.5.0

BSD 2-Clause "Simplified" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
hold-liable
Must
include-copyright
include-license
3 Packages, Including:
esutils@2.0.3
uglify-js@2.8.29
uri-js@4.4.1

BSD-3-Clause OR MIT

Permissive
1 Packages, Including:
amdefine@1.0.1

(MIT OR Apache-2.0)

Permissive
1 Packages, Including:
atob@2.1.2

(AFL-2.1 OR BSD-3-Clause)

Permissive
1 Packages, Including:
json-schema@0.4.0

BSD

Invalid
Not OSI Approved
1 Packages, Including:
source-map@0.1.32

The Unlicense

Public Domain
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
private-use
modify
Cannot
include-copyright
hold-liable
Must
1 Packages, Including:
tweetnacl@0.14.5

N/A

N/A
1 Packages, Including:
watch@0.10.0

MIT/X11

Invalid
Not OSI Approved
1 Packages, Including:
wordwrap@0.0.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

7
All Dependencies CSV
β“˜ This is a list of postcss-import 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
object-assign4.1.12.61 kBMIT
prod
pkg-resolve0.1.1417.91 kBApache-2.0
prod
1
18
3
4
postcss-value-parser3.3.16.1 kBMIT
prod
postcss5.2.18170.69 kBMIT
prod
2
promise-each2.2.02.16 kBMIT
prod
read-cache1.0.01.88 kBMIT
prod
resolve1.22.826.69 kBMIT
prod

Visualizations

Frequently Asked Questions

What does postcss-import do?

Postcss-import is a plugin for PostCSS that transforms @import rules by inlining content. It has the functionality to consume local files, node modules, or web modules, and offers a scope of resolution for @import rules, including the root directory, web_modules, node_modules, or local modules. When importing a module, it will look for index.css or a file referenced in the style or main fields in package.json. Additionally, this plugin optimizes output by importing a file only once within a given scope, avoiding duplicates of the same file. It should be noted that the plugin needs to be used as the first plugin, so it precedes other plugins' actions to keep the Abstract Syntax Tree (AST) as a single file.

How do you use postcss-import?

Here is a guide for using postcss-import in JavaScript:

Step 1: Install the postcss-import using npm:

$ npm install -D postcss-import

Step 2: Import the required dependencies:

// dependencies
const fs = require("fs")
const postcss = require("postcss")
const atImport = require("postcss-import")

Step 3: Read the CSS to process:

// css to be processed
const css = fs.readFileSync("css/input.css", "utf8")

Step 4: Process the CSS:

// process css
postcss()
  .use(atImport())
  .process(css, {
    // `from` option is needed here
    from: "css/input.css"
  })
  .then((result) => {
    const output = result.css

    console.log(output)
  })

In the css/input.css file, you can specify which CSS files you want to import:

/* can consume `node_modules`, `web_modules` or local modules */
@import "cssrecipes-defaults"; /* == @import "../node_modules/cssrecipes-defaults/index.css"; */
@import "normalize.css"; /* == @import "../node_modules/normalize.css/normalize.css"; */

@import "foo.css"; /* relative to css/ according to `from` option above */

@import "bar.css" (min-width: 25em);

@import 'baz.css' layer(baz-layer);

body {
  background: black;
}

Where are the postcss-import docs?

The postcss-import documentation and usage examples are available on its GitHub page at https://github.com/postcss/postcss-import. The readme file there should provide you with a comprehensive guide on how to install, use, and understand the various options and configurations of postcss-import.