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

@fullstackio/cq

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fullstackio/cq - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

8

dist/engines/typescript.js

@@ -129,2 +129,10 @@ 'use strict';

}
},
Constructor: function Constructor(node) {
// `constructor` is a special node in TypeScript (vs. babylon where
// it's an Identifier) If the query is looking for a constructor by
// identifier, then we will accept this Constructor node
if ('constructor' === query.matcher && 'IDENTIFIER' === query.type) {
paths = [].concat(_toConsumableArray(paths), [node]);
}
}

@@ -131,0 +139,0 @@ });

2

package.json
{
"name": "@fullstackio/cq",
"version": "2.0.1",
"version": "2.0.2",
"description": "query code with selectors",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -103,2 +103,10 @@ /**

}
},
Constructor: function (node) {
// `constructor` is a special node in TypeScript (vs. babylon where
// it's an Identifier) If the query is looking for a constructor by
// identifier, then we will accept this Constructor node
if('constructor' === query.matcher && 'IDENTIFIER' === query.type) {
paths = [...paths, node];
}
}

@@ -105,0 +113,0 @@ });

@@ -301,2 +301,8 @@ import 'babel-polyfill';

it('should get a constructor', () => {
let { code } = cq(es6Class, '.constructor');
const wanted = lines(es6Class, 8, 11);
assert.equal(code, wanted);
});
});

@@ -303,0 +309,0 @@

@@ -396,2 +396,25 @@ import 'babel-polyfill'

describe('special identifiers', () => {
const src = `
/*
* A Barn is where you keep animals
*/
class Barn {
color: string;
constructor() {
color = 'red';
}
}
`;
it('should get a constructor', () => {
let { code } = cq(src, ".Barn .constructor", {engine: 'typescript'});
const wanted = lines(src, 7, 9);
assert.equal(code, wanted);
})
});
});
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