Skip to content

Commit

Permalink
Upgrading dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldenning committed Nov 28, 2020
1 parent 56abab7 commit 673d81b
Show file tree
Hide file tree
Showing 9 changed files with 6,883 additions and 4,661 deletions.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,11 @@ typings/
# next.js build output
.next

lib
lib

.yarn/*
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
lib
LICENSE
yarn.lock
.prettierignore
.prettierignore
.yarn
38 changes: 38 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions .yarn/releases/yarn-berry.cjs

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nodeLinker: pnp

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-berry.cjs
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"scripts": {
"build": "rimraf lib && babel src --out-dir lib --ignore '**/*.test.js' --source-maps",
"prepublishOnly": "yarn build",
"check-format": "prettier '**/*' --check",
"check-format": "prettier . --check",
"format": "prettier . --write",
"test": "jest"
},
"files": [
Expand All @@ -30,16 +31,16 @@
"author": "Joel Denning <joeldenning@gmail.com>",
"license": "MIT",
"devDependencies": {
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/plugin-transform-modules-umd": "^7.2.0",
"@babel/preset-env": "^7.5.5",
"@types/jest": "^24.0.15",
"babel-jest": "^24.8.0",
"husky": "^3.0.1",
"jest": "^24.8.0",
"prettier": "^1.18.2",
"pretty-quick": "^1.11.1",
"rimraf": "^2.6.3"
"@babel/cli": "^7.12.8",
"@babel/core": "^7.12.9",
"@babel/plugin-transform-modules-umd": "^7.12.1",
"@babel/preset-env": "^7.12.7",
"@types/jest": "^26.0.15",
"babel-jest": "^26.6.3",
"husky": "^4.3.0",
"jest": "^26.6.3",
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0",
"rimraf": "^3.0.2"
}
}
4 changes: 2 additions & 2 deletions src/single-spa-html.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const defaultOpts = {
template: "",
domElementGetter: null
domElementGetter: null,
};

export default function singleSpaHtml(opts) {
Expand Down Expand Up @@ -28,7 +28,7 @@ export default function singleSpaHtml(opts) {
return {
bootstrap: bootstrap.bind(null, opts),
mount: mount.bind(null, opts),
unmount: unmount.bind(null, opts)
unmount: unmount.bind(null, opts),
};
}

Expand Down
16 changes: 8 additions & 8 deletions src/single-spa-html.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import singleSpaHtml from "./single-spa-html";

describe("single-spa-html", () => {
const domElementGetter = props =>
const domElementGetter = (props) =>
document.getElementById((props && props.id) || "test-div");
let props;

Expand All @@ -20,7 +20,7 @@ describe("single-spa-html", () => {
it("adds html to a provided dom element", () => {
const lifecycles = singleSpaHtml({
template: "<some-web-component></some-web-component>",
domElementGetter
domElementGetter,
});

const domEl = domElementGetter();
Expand Down Expand Up @@ -52,12 +52,12 @@ describe("single-spa-html", () => {

const localProps = {
...props,
id: div.id
id: div.id,
};

const lifecycles = singleSpaHtml({
template: "<some-web-component></some-web-component>",
domElementGetter
domElementGetter,
});

const domEl = domElementGetter(localProps);
Expand Down Expand Up @@ -93,7 +93,7 @@ describe("single-spa-html", () => {
it(`throws if you provide a non-string template`, () => {
expect(() => {
singleSpaHtml({
template: 123
template: 123,
});
}).toThrow();
});
Expand All @@ -102,16 +102,16 @@ describe("single-spa-html", () => {
expect(() => {
singleSpaHtml({
template: "123",
domElementGetter: "foo"
domElementGetter: "foo",
});
}).toThrow();
});

it(`renders function template with custom props`, () => {
const lifecycles = singleSpaHtml({
template: props =>
template: (props) =>
`<some-web-component name=${props.name}></some-web-component>`,
domElementGetter
domElementGetter,
});

const domEl = domElementGetter();
Expand Down
Loading

0 comments on commit 673d81b

Please sign in to comment.