Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@babel/plugin-syntax-import-attributes
Advanced tools
Allow parsing of the module attributes in the import statement
The @babel/plugin-syntax-import-attributes package allows Babel to parse import statements with attributes, which is a proposal for ECMAScript to allow additional metadata to be provided with import statements. This plugin only allows Babel to parse this syntax and does not transform it. It is useful for developers who want to use the proposed import attributes syntax in their codebase and ensure that Babel can correctly understand it.
Parsing import statements with attributes
This feature allows Babel to parse import statements that include an 'assert' clause with attributes. This is part of a stage 3 proposal to allow asserting certain conditions on imported modules.
import json from './data.json' assert { type: 'json' };
This package allows Babel to transform export * as ns from 'module' syntax, which is similar in that it extends the capabilities of module import/export syntax, but it focuses on export statements rather than import attributes.
This package enables Babel to parse and transform the dynamic import() syntax, which is another extension to the module system in JavaScript. While it deals with dynamic imports rather than static import attributes, it is similar in that it enhances the module system.
This package transforms ES6 modules to CommonJS, allowing for interoperability with module systems used in different environments. It does not handle import attributes but is related in terms of module system handling.
Allow parsing of the module attributes in the import statement
See our website @babel/plugin-syntax-import-attributes for more information.
Using npm:
npm install --save-dev @babel/plugin-syntax-import-attributes
or using yarn:
yarn add @babel/plugin-syntax-import-attributes --dev
v7.25.6 (2024-08-29)
babel-generator
babel-traverse
path.getAssignmentIdentifiers
may be undefined
(@liuxingbaoyu)babel-parser
babel-helpers
, babel-plugin-transform-optional-chaining
, babel-runtime-corejs3
superPropertyGet
helper (@nicolo-ribaudo)babel-generator
, babel-plugin-transform-async-to-generator
, babel-plugin-transform-block-scoping
, babel-plugin-transform-class-properties
, babel-plugin-transform-classes
, babel-plugin-transform-duplicate-named-capturing-groups-regex
, babel-plugin-transform-named-capturing-groups-regex
, babel-plugin-transform-react-jsx-development
, babel-plugin-transform-react-jsx
, babel-plugin-transform-react-pure-annotations
, babel-plugin-transform-regenerator
, babel-plugin-transform-runtime
, babel-preset-env
(
and comments (@nicolo-ribaudo)babel-plugin-syntax-import-assertions
, babel-plugin-syntax-import-attributes
babel-generator
babel-generator
parent
params in the generator (@nicolo-ribaudo)FAQs
Allow parsing of the module attributes in the import statement
The npm package @babel/plugin-syntax-import-attributes receives a total of 17,967,022 weekly downloads. As such, @babel/plugin-syntax-import-attributes popularity was classified as popular.
We found that @babel/plugin-syntax-import-attributes demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.