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

json-react-layouts-data-loader

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-react-layouts-data-loader - npm Package Compare versions

Comparing version 4.0.0-beta.8 to 4.0.0

71

CHANGELOG.md
# json-react-layouts-data-loader
## 4.0.0
### Major Changes
- 53cc7ae: Restructured public API slightly to reduce bundle size and type complexity
### Minor Changes
- c3d964b: Switched typescript-log to use debug package, see readme for how to enable debug logging
- 9a6621d: Upgraded dependencies
- 9f335c8: Add ability for a composition to provide additional props to all components rendered inside it
This opens up the possibility of compositions to pass width ratio information down to children, enabling sorta container queries
### Patch Changes
- 5bda5b9: Each component and composition must be wrapped in a layout.component() or layout.composition()
This is because TypeScript does not yet support variadic types, meaning we can't accurately enforce the types on a ...rest style function.
Before:
```
{
type: 'test-composition',
contentAreas: {
main: [
{
type: 'test-with-data',
props: { dataDefinitionArgs: { dataArg: 'Foo' } },
},
],
},
props: {},
}
```
After:
```
layout.composition({
type: 'test-composition',
contentAreas: {
main: [
layout.component({
type: 'test-with-data',
props: { dataDefinitionArgs: { dataArg: 'Foo' } },
}),
],
},
props: {},
})
```
- 2d4f44c: Fixed crash when using hooks inside useRuntimeParams
- fac39be: Simplified types further
- 97beb57: Fixed issue where middleware is violating the rules of hooks
- cee52d7: Restore default generic param for DataDefinition type
- b16bdac: Allow checked composition to be used as a nested composition
- Updated dependencies [c3d964b]
- Updated dependencies [5bda5b9]
- Updated dependencies [2d4f44c]
- Updated dependencies [9a6621d]
- Updated dependencies [53cc7ae]
- Updated dependencies [9f335c8]
- Updated dependencies [fac39be]
- Updated dependencies [97beb57]
- Updated dependencies [cee52d7]
- Updated dependencies [b16bdac]
- json-react-layouts@3.0.0
## 4.0.0-beta.8

@@ -4,0 +75,0 @@

4

dist/cjs/data-loading.test.js

@@ -6,3 +6,3 @@ "use strict";

var test_utils_1 = require("react-dom/test-utils");
var enzyme_adapter_react_16_1 = tslib_1.__importDefault(require("enzyme-adapter-react-16"));
var enzyme_adapter_react_17_1 = tslib_1.__importDefault(require("@wojtekmaj/enzyme-adapter-react-17"));
var _1 = require(".");

@@ -12,3 +12,3 @@ var react_ssr_data_loader_1 = require("react-ssr-data-loader");

var enzyme_1 = require("enzyme");
enzyme_1.configure({ adapter: new enzyme_adapter_react_16_1.default() });
enzyme_1.configure({ adapter: new enzyme_adapter_react_17_1.default() });
it('can load data for component', function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {

@@ -15,0 +15,0 @@ var resources, _a, middleware, createRegisterableComponentWithData, testComponentWithDataRegistration, layout, renderers, wrapper, component;

import { __assign, __awaiter, __generator } from "tslib";
import React from 'react';
import { act } from 'react-dom/test-utils';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import { init } from '.';

@@ -6,0 +6,0 @@ import { DataLoaderResources, DataProvider } from 'react-ssr-data-loader';

{
"name": "json-react-layouts-data-loader",
"version": "4.0.0-beta.8",
"version": "4.0.0",
"repository": "github:sevenwestmedia-labs/json-react-layouts",

@@ -12,8 +12,7 @@ "author": "Seven West Media WA",

"dependencies": {
"json-react-layouts": "^3.0.0-beta.8"
"json-react-layouts": "^3.0.0"
},
"peerDependencies": {
"typescript-log": "^2.0.0",
"react-ssr-data-loader": "^2.0.0-next.3"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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