New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@shopify/theme-language-server-common

Package Overview
Dependencies
Maintainers
0
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/theme-language-server-common - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

6

CHANGELOG.md
# @shopify/theme-language-server-common
## 2.3.2
### Patch Changes
- 2bd19d66: Fixed bug where filter completions wouldn't work on Liquid assignments
## 2.3.1

@@ -4,0 +10,0 @@

2

dist/completions/providers/FilterCompletionProvider.js

@@ -77,3 +77,3 @@ "use strict";

// ignore the pipe and any spaces for our starting position.
const pipeRegex = new RegExp(`(\\s*\\|\\s*)(?:${node.name}\\}\\})`);
const pipeRegex = new RegExp(`(\\s*\\|\\s*)(?:${node.name}(?:\\}|\\%)\\})`);
const matchFilterPipe = node.source.match(pipeRegex);

@@ -80,0 +80,0 @@ const startOffet = matchFilterPipe ? matchFilterPipe[1].length : 0;

{
"name": "@shopify/theme-language-server-common",
"version": "2.3.1",
"version": "2.3.2",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

@@ -175,2 +175,29 @@ import { FilterEntry, MetafieldDefinitionMap, ObjectEntry } from '@shopify/theme-check-common';

it('handles assignment the same way as output', async () => {
// char 31 ⌄ ⌄ char 33
const liquid = '{% assign imageUrl = product | de█ %}';
const textEdit: TextEdit = {
newText: 'default',
range: {
end: { line: 0, character: 33 },
start: { line: 0, character: 31 },
},
};
await expect(provider).to.complete(liquid, [
expect.objectContaining({
label: 'default',
insertTextFormat: InsertTextFormat.PlainText,
textEdit,
}),
]);
const textDocument = TextDocument.create('', 'liquid', 0, liquid.replace(CURSOR, ''));
expect(TextDocument.applyEdits(textDocument, [textEdit])).toBe(
'{% assign imageUrl = product | default %}',
);
});
describe('when there are no required parameters', () => {

@@ -177,0 +204,0 @@ it('should not include parameters in the insertText of the completion', async () => {

@@ -86,3 +86,3 @@ import { LiquidFilter, NodeTypes } from '@shopify/liquid-html-parser';

// ignore the pipe and any spaces for our starting position.
const pipeRegex = new RegExp(`(\\s*\\|\\s*)(?:${node.name}\\}\\})`);
const pipeRegex = new RegExp(`(\\s*\\|\\s*)(?:${node.name}(?:\\}|\\%)\\})`);
const matchFilterPipe = node.source.match(pipeRegex);

@@ -89,0 +89,0 @@ const startOffet = matchFilterPipe ? matchFilterPipe[1].length : 0;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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