Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jqkill

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jqkill - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

2

package.json
{
"name": "jqkill",
"version": "1.0.6",
"version": "1.0.7",
"description": "A linter to help locate and eliminate jQuery",

@@ -5,0 +5,0 @@ "keywords": [

@@ -1,8 +0,5 @@

import { stat, readFile } from 'fs';
import { promisify } from 'util';
const fileStatAsync = promisify(stat);
const readFileAsync = promisify(readFile);
import { promises as fs } from 'fs';
export async function readContents (path) {
if (!await fileStatAsync(path)) {
if (!await fs.stat(path)) {
throw Error(`${path} not found, is this a package?`);

@@ -12,3 +9,3 @@ }

try {
return await readFileAsync(path, 'utf-8');
return await fs.readFile(path, 'utf-8');
} catch {

@@ -15,0 +12,0 @@ throw Error(`Failed to read ${path}`);

@@ -1,8 +0,7 @@

import { stat, readFile } from 'fs';
import { promisify } from 'util';
const fileStatAsync = promisify(stat);
const readFileAsync = promisify(readFile);
import { promises as fs } from 'fs';
import { join } from 'path';
export async function readPkg (path) {
if (!await fileStatAsync(path)) {
export async function readPkg () {
const PKG_PATH = join(new URL(import.meta.url).pathname, '../../../package.json');
if (!await fs.stat(PKG_PATH)) {
throw Error('package.json not found, is this a package?');

@@ -12,3 +11,3 @@ }

try {
return JSON.parse(await readFileAsync(path, 'utf-8'));
return JSON.parse(await fs.readFile(PKG_PATH, 'utf-8'));
} catch {

@@ -15,0 +14,0 @@ throw Error('Failed to read package.json');

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