Socket
Socket
Sign inDemoInstall

@es-shims/api

Package Overview
Dependencies
107
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.1 to 2.4.0

19

api.js

@@ -12,2 +12,4 @@ #!/usr/bin/env node

var flatMap = require('array.prototype.flatmap');
var keys = require('object-keys');
var includes = require('array-includes');

@@ -166,2 +168,19 @@ var args = process.argv.slice(2); // remove node, and script name

}
t.test('`exports` field', { skip: !('exports' in pkg) }, function (st) {
var expectedKeys = ['.', './auto', './polyfill', './implementation', './shim', './package.json'];
var keysToCheck = keys(pkg.exports).filter(function (key) {
return includes(expectedKeys, key);
});
st.deepEqual(keysToCheck, expectedKeys, 'expected entrypoints are present in the proper order');
keysToCheck.forEach(function (key) {
st.ok(fs.existsSync(pkg.exports[key]), 'entrypoint "' + key + '" points to "' + pkg.exports[key] + '" which exists');
});
st.equal(pkg.exports['./package.json'], './package.json', 'package.json is exposed');
st.end();
});
if (isMulti) {

@@ -168,0 +187,0 @@ var subPackages = requireOrEvalError(name);

@@ -8,2 +8,8 @@ # Changelog

## [v2.4.0](https://github.com/es-shims/es-shim-api/compare/v2.3.1...v2.4.0) - 2023-05-02
### Commits
- [New] add check for `exports` field [`f6f7920`](https://github.com/es-shims/es-shim-api/commit/f6f79200d691b2902bcc62a8c331e5e336a0f4ca)
## [v2.3.1](https://github.com/es-shims/es-shim-api/compare/v2.3.0...v2.3.1) - 2023-02-17

@@ -10,0 +16,0 @@

4

package.json
{
"name": "@es-shims/api",
"version": "2.3.1",
"version": "2.4.0",
"author": "Jordan Harband",

@@ -43,3 +43,5 @@ "funding": {

"dependencies": {
"array-includes": "^3.1.6",
"array.prototype.flatmap": "^1.3.1",
"object-keys": "^1.1.1",
"tape": "^5.6.3"

@@ -46,0 +48,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc