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

@financial-times/ads-moat-integration

Package Overview
Dependencies
Maintainers
18
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@financial-times/ads-moat-integration - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

dist/ads-moat-integration.es.js

15

babel.config.js
module.exports = {
presets: [
[
'@babel/preset-env',
"@babel/preset-env",
{
targets: {
node: 8
}
}
]
node: 12,
ie: "11",
},
},
],
],
plugins: []
}
plugins: ["@babel/plugin-proposal-optional-chaining"],
};
{
"name": "@financial-times/ads-moat-integration",
"version": "3.1.0",
"version": "3.2.0",
"description": "",
"main": "dist/client.js",
"module": "dist/ads-moat-integration.es.js",
"main": "dist/ads-moat-integration.umd.js",
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/plugin-transform-react-jsx": "^7.3.0",
"@babel/preset-env": "^7.4.5",
"jest": "^26.0.0",
"@babel/core": "7.15.0",
"@babel/plugin-proposal-optional-chaining": "7.14.5",
"@babel/plugin-transform-react-jsx": "7.14.9",
"@babel/preset-env": "7.15.0",
"@rollup/plugin-babel": "5.3.0",
"@rollup/plugin-node-resolve": "13.0.4",
"jest": "27.0.6",
"jest-fetch-mock": "^3.0.3",
"regenerator-runtime": "^0.13.7",
"rollup": "^2.0.0",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-serve": "^1.0.1"
"rollup": "2.56.3"
},

@@ -19,0 +20,0 @@ "scripts": {

@@ -0,10 +1,27 @@

import resolve from "@rollup/plugin-node-resolve";
import babel from "@rollup/plugin-babel";
import pkg from "./package.json";
const config = {
input: "src/index.js",
plugins: [resolve(), babel({ babelHelpers: "bundled" })],
};
export default [
{
input: {
client: 'src/client/index',
...config,
output: {
file: pkg.main,
format: "cjs",
exports: "named",
},
},
{
...config,
output: {
dir: 'dist'
file: pkg.module,
format: "es",
},
}
]
},
];

@@ -0,20 +1,26 @@

/**
* @jest-environment jsdom
*/
/* eslint-disable no-console */
import moatIntegration from '../src/client'
import moatIntegration from "../src";
describe('moatIntegration', () => {
afterEach(() => {
const script = document.getElementById('n-ads-moat');
script && script.remove();
})
describe("moatIntegration", () => {
afterEach(() => {
const script = document.getElementById("n-ads-moat");
script && script.remove();
});
test('default export should be a function', () => {
expect(typeof moatIntegration).toEqual('function')
});
test('should append a script to the HEAD', () => {
moatIntegration();
const script = document.getElementById('n-ads-moat');
expect(script).not.toBe(null);
expect(script.getAttribute('src')).toBe('https://z.moatads.com/financialtimesprebidheader859796398452/moatheader.js');
});
})
test("default export should be a function", () => {
expect(typeof moatIntegration).toEqual("function");
});
test("should append a script to the HEAD", () => {
moatIntegration();
const script = document.getElementById("n-ads-moat");
expect(script).not.toBe(null);
expect(script.getAttribute("src")).toBe(
"https://z.moatads.com/financialtimesprebidheader859796398452/moatheader.js"
);
});
});
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