Socket
Socket
Sign inDemoInstall

@khanacademy/wonder-blocks-core

Package Overview
Dependencies
Maintainers
1
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@khanacademy/wonder-blocks-core - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

32

components/with-ssr-placeholder.js

@@ -132,2 +132,27 @@ // @flow

switch (renderState) {
// There are edge cases where for some reason, we get an unknown
// context value here. So far it seems to be when we're nested in a
// v1 WithSSRPlaceholder equivalent component, or in some older
// React v16 situations where we're nested in the provider of a
// different context.
//
// We ignore this from coverage. It's a maintenance case to help
// us catch code changes that affect the control flow unexpectedly,
// but it's not something we need to write a test case for.
//
/* istanbul ignore next */
default:
// Let's log this case so we can debug it easily.
// Then fall through to the root case.
/* eslint-disable-next-line no-console */
console.log(
`We got a render state we don't understand: "${JSON.stringify(
renderState,
)}"`,
);
// We "fallthrough" to the root case. This is more obvious
// and maintainable code than just ignoring the no-fallthrough
// lint rule.
return this._maybeRender("root");
case "root":

@@ -150,9 +175,2 @@ return this._renderAsRootComponent();

return children();
// We ignore this from coverage. It's a maintenance case to help
// us catch code changes that affect the control flow unexpectedly,
// but it's not something we need to write a test case for.
/* istanbul ignore next */
default:
throw new Error("We got a render state we don't understand");
}

@@ -159,0 +177,0 @@ }

@@ -1306,2 +1306,25 @@ import React__default, { createElement, Component, Fragment, createContext } from 'react';

switch (renderState) {
// There are edge cases where for some reason, we get an unknown
// context value here. So far it seems to be when we're nested in a
// v1 WithSSRPlaceholder equivalent component, or in some older
// React v16 situations where we're nested in the provider of a
// different context.
//
// We ignore this from coverage. It's a maintenance case to help
// us catch code changes that affect the control flow unexpectedly,
// but it's not something we need to write a test case for.
//
/* istanbul ignore next */
default:
// Let's log this case so we can debug it easily.
// Then fall through to the root case.
/* eslint-disable-next-line no-console */
console.log("We got a render state we don't understand: \"".concat(JSON.stringify(renderState), "\"")); // We "fallthrough" to the root case. This is more obvious
// and maintainable code than just ignoring the no-fallthrough
// lint rule.
return this._maybeRender("root");
case "root":

@@ -1325,10 +1348,2 @@ return this._renderAsRootComponent();

return children();
// We ignore this from coverage. It's a maintenance case to help
// us catch code changes that affect the control flow unexpectedly,
// but it's not something we need to write a test case for.
/* istanbul ignore next */
default:
throw new Error("We got a render state we don't understand");
}

@@ -1335,0 +1350,0 @@ }

{
"name": "@khanacademy/wonder-blocks-core",
"version": "2.0.0",
"version": "2.0.1",
"design": "v1",

@@ -16,3 +16,3 @@ "publishConfig": {

"dependencies": {
"@khanacademy/wonder-blocks-spacing": "^2.0.13"
"@khanacademy/wonder-blocks-spacing": "^2.0.14"
},

@@ -19,0 +19,0 @@ "peerDependencies": {

Sorry, the diff of this file is too big to display

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