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

@gasket/plugin-lifecycle

Package Overview
Dependencies
Maintainers
8
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gasket/plugin-lifecycle - npm Package Compare versions

Comparing version 6.43.2-canary-esm-port.0 to 6.45.0

19

lib/index.js

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

import { default as diagnostics } from 'diagnostics';
const debug = diagnostics('gasket:lifecycle');
import path from 'path';
import { readdir } from 'fs/promises';
import lodash from 'lodash';
const { camelcase: camelCase } = lodash;
import { default as pkg } from '../package.json' assert { type: 'json' };
const debug = require('diagnostics')('gasket:lifecycle');
const path = require('path');
const { readdir } = require('fs').promises;
const camelCase = require('lodash.camelcase');

@@ -32,7 +29,7 @@ /**

return files.filter(file => isJs.test(file) && !isTest.test(file))
.map(async function each(file) {
.map(function each(file) {
const extname = path.extname(file);
const event = camelCase(path.basename(file, extname));
let hook = await import(path.join(dir, file));
let hook = require(path.join(dir, file));
debug('found %s as lifecycle for %s', file, event);

@@ -77,4 +74,4 @@

*/
export const hooks = {
name: pkg.name,
module.exports = {
name: require('../package').name,
hooks: {

@@ -81,0 +78,0 @@ init,

{
"name": "@gasket/plugin-lifecycle",
"version": "6.43.2-canary-esm-port.0",
"version": "6.45.0",
"description": "Allows a gasket/ directory to be used for lifecycle hooks in applications.",
"main": "lib/index.js",
"main": "lib",
"files": [
"lib"
],
"type": "module",
"scripts": {

@@ -44,10 +43,10 @@ "lint": "eslint .",

"devDependencies": {
"@gasket/engine": "^6.43.2-canary-esm-port.0",
"@gasket/engine": "^6.45.0",
"cross-env": "^7.0.3",
"eslint": "^8.7.0",
"eslint-config-godaddy": "^7.0.0",
"eslint-plugin-jest": "^27.2.1",
"eslint": "^8.56.0",
"eslint-config-godaddy": "^7.0.2",
"eslint-plugin-jest": "^27.6.3",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-unicorn": "^44.0.0",
"jest": "^29.3.1"
"jest": "^29.7.0"
},

@@ -71,3 +70,3 @@ "eslintConfig": {

},
"gitHead": "f7e3283fa63e20f353587fe7f4653ebf684538c8"
"gitHead": "e567d11560a0d3721ffbd4649fa4ee8b6b739afb"
}
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