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

gas-entry-generator

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gas-entry-generator - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

test/fixtures/esm-expected-autoGlobalExports.js

6

index.js

@@ -114,2 +114,5 @@ 'use strict';

});
} else if (node.type === 'ExportNamedDeclaration') {
const functionNames = node.specifiers.map(specifier => specifier.local.name);
functionNames.forEach((functionName) => entryPointFunctions.add(functionName));
}

@@ -164,2 +167,5 @@ }

});
} else if (node.type === 'ExportNamedDeclaration') {
const functionNames = node.specifiers.map(specifier => specifier.local.name);
functionNames.forEach((functionName) => globalAssignments.add(functionName));
}

@@ -166,0 +172,0 @@ }

6

package.json
{
"name": "gas-entry-generator",
"version": "2.2.0",
"version": "2.3.0",
"description": "Generator of Google Apps Script entry point function",

@@ -24,6 +24,6 @@ "main": "index.js",

"devDependencies": {
"eslint": "8.13.0",
"eslint": "8.38.0",
"nyc": "15.1.0",
"tap": "16.2.0"
"tap": "16.3.4"
}
}
export const foo = () => 'foo';
export const bar = () => 'bar';
import { foo } from './esm-exports';
export { bar } from './esm-exports';
/**

@@ -4,0 +4,0 @@ * Leading Block Comment for foo.

@@ -24,3 +24,3 @@ const test = require('tap').test;

test('Can parse ES module syntax', function(t) {
test('generate function generate entry functions from global assignments in ESModule', function(t) {
const source = fs.readFileSync(__dirname + '/fixtures/esm-source.js', {encoding: 'utf8'});

@@ -33,1 +33,11 @@ const expected = fs.readFileSync(__dirname + '/fixtures/esm-expected.js', {encoding: 'utf8'});

});
test('generate function generate entry functions from export with autoGlobalExports', function(t) {
const source = fs.readFileSync(__dirname + '/fixtures/esm-source.js', {encoding: 'utf8'});
const expected = fs.readFileSync(__dirname + '/fixtures/esm-expected-autoGlobalExports.js', {encoding: 'utf8'});
const expectedGlobalAssignments = fs.readFileSync(__dirname + '/fixtures/esm-exports-generated-global-assignments-expected.js', {encoding: 'utf8'});
const output = generate(source, { comment: true, autoGlobalExports: true });
t.equal(output.entryPointFunctions, expected, 'actual output will match expected');
t.equal(output.globalAssignments, expectedGlobalAssignments, 'actual output will match expected');
t.end();
});

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