@braintree/iframer
Advanced tools
Comparing version 1.1.0 to 2.0.0
# CHANGELOG | ||
# 2.0.0 | ||
- Update to node v18 | ||
- Dev Dependency Updates | ||
- Update to TypeScript 5 | ||
- Update prettier to next major version | ||
- Update eslint-plugin-prettier to next major version | ||
- Other minor dependency updates | ||
# 1.1.0 | ||
@@ -4,0 +14,0 @@ |
@@ -8,8 +8,8 @@ "use strict"; | ||
var iframe = document.createElement("iframe"); | ||
var config = assign_1.assign({}, default_attributes_1.defaultAttributes, options); | ||
var config = (0, assign_1.assign)({}, default_attributes_1.defaultAttributes, options); | ||
if (config.style && typeof config.style !== "string") { | ||
assign_1.assign(iframe.style, config.style); | ||
(0, assign_1.assign)(iframe.style, config.style); | ||
delete config.style; | ||
} | ||
set_attributes_1.setAttributes(iframe, config); | ||
(0, set_attributes_1.setAttributes)(iframe, config); | ||
if (!iframe.getAttribute("id")) { | ||
@@ -16,0 +16,0 @@ iframe.id = iframe.name; |
{ | ||
"name": "@braintree/iframer", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"description": "A utility to consistently create iframes", | ||
@@ -21,13 +21,17 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@types/jest": "^26.0.4", | ||
"eslint": "^7.4.0", | ||
"eslint-config-braintree": "^5.0.0-typescript-prep-rc.17", | ||
"jest": "^26.1.0", | ||
"prettier": "^2.0.5", | ||
"ts-jest": "^26.1.2", | ||
"typescript": "^3.9.6" | ||
"@types/jest": "^29.5.4", | ||
"@typescript-eslint/eslint-plugin": "^5.54.1", | ||
"eslint": "^8.35.0", | ||
"eslint-config-braintree": "^6.0.0-typescript-prep-rc.2", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"jest": "^29.5.0", | ||
"jest-environment-jsdom": "^29.5.0", | ||
"prettier": "^3.0.2", | ||
"ts-jest": "^29.0.5", | ||
"typescript": "^5.1.6" | ||
}, | ||
"jest": { | ||
"testEnvironment": "jsdom", | ||
"preset": "ts-jest" | ||
} | ||
} |
@@ -56,3 +56,3 @@ import iframer = require("../index"); | ||
expect(result.getAttribute("style")).toBe( | ||
"background: tomato; transition: color 100ms;" | ||
"background: tomato; transition: color 100ms;", | ||
); | ||
@@ -59,0 +59,0 @@ }); |
import { setAttributes } from "../lib/set-attributes"; | ||
import { mocked } from "ts-jest/utils"; | ||
@@ -57,4 +56,4 @@ describe("setAttributes", () => { | ||
}); | ||
mocked(el.setAttribute).mockClear(); | ||
mocked(el.removeAttribute).mockClear(); | ||
jest.mocked(el.setAttribute).mockClear(); | ||
jest.mocked(el.removeAttribute).mockClear(); | ||
@@ -61,0 +60,0 @@ setAttributes(el, { bar: undefined }); // eslint-disable-line no-undefined |
@@ -6,3 +6,3 @@ import { setAttributes } from "./lib/set-attributes"; | ||
export = function createFrame( | ||
options: Record<string, unknown> = {} | ||
options: Record<string, unknown> = {}, | ||
): HTMLIFrameElement { | ||
@@ -9,0 +9,0 @@ const iframe = document.createElement("iframe"); |
export function setAttributes( | ||
element: HTMLElement, | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
attributes: Record<string, any> | ||
attributes: Record<string, any>, | ||
): void { | ||
@@ -6,0 +6,0 @@ for (const key in attributes) { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
11211
0
10
265