
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
@shopify/liquid-html-parser
Advanced tools
This module provides the Liquid HTML parser that powers the prettier plugin, linter and language server for Liquid-powered Shopify themes.
It turns a .liquid
file contents into an Abstract Syntax Tree (AST) that contains both Liquid and HTML nodes.
# with npm
npm install @shopify/liquid-html-parser
# with yarn
yarn add @shopify/liquid-html-parser
import { toLiquidHtmlAST, LiquidHtmlNode, NodeTypes } from '@shopify/prettier-plugin-liquid';
const ast: LiquidHtmlNode = toLiquidHtmlAST(`
<body>
{% for product in all_products %}
<img src="{{ product | image_url }}">
{% endfor %}
</body>
`);
Because Liquid is very permissive, things like the name
of an HTML tag may have a surprising type: an array of LiquidVariableOutput | TextNode
.
This is because the following use cases are supported by the parser:
{% # compound html tag names %}
<tag-{{ name }}>
</tag-{{ name }}>
{% # compound html attribute names %}
<img data-{{ attr_name }}="...">
MIT.
FAQs
Liquid HTML parser by Shopify
The npm package @shopify/liquid-html-parser receives a total of 60,906 weekly downloads. As such, @shopify/liquid-html-parser popularity was classified as popular.
We found that @shopify/liquid-html-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 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.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.