From d0fa61759110fc773cb63d79d04cac960ee329a0 Mon Sep 17 00:00:00 2001 From: Alessio Civitillo <@acivitillo@dyvenia.com> Date: Sun, 9 Jan 2022 10:34:10 +0100 Subject: [PATCH 01/14] docs for components sharing state --- .../_examples/filterable_list/app.py | 45 ++++++++++++++ .../_examples/filterable_list/data.json | 22 +++++++ .../components-sharing-state/index.rst | 59 +++++++++++++++++++ docs/source/adding-interactivity/index.rst | 20 ++++++- 4 files changed, 143 insertions(+), 3 deletions(-) create mode 100644 docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py create mode 100644 docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json create mode 100644 docs/source/adding-interactivity/components-sharing-state/index.rst diff --git a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py new file mode 100644 index 000000000..9907cc755 --- /dev/null +++ b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py @@ -0,0 +1,45 @@ +import json +from pathlib import Path + +from idom import component, hooks, html, run + + +HERE = Path(__file__) +DATA_PATH = HERE.parent / "data.json" +sculpture_data = json.loads(DATA_PATH.read_text()) + + +@component +def FilterableList(): + value, set_value = hooks.use_state("") + return html.p(Search(value, set_value), html.hr(), Table(value, set_value)) + + +@component +def Search(value, set_value): + def handle_change(event): + set_value(event["target"]["value"]) + + return html.label( + "Search by Food Name: ", html.input({"value": value, "onChange": handle_change}) + ) + + +@component +def Table(value, set_value): + rows = [] + for row in data: + name = html.td(row["name"]) + descr = html.td(row["description"]) + tr = html.tr(name, descr, value) + if value == "": + rows.append(tr) + else: + if value.lower() in row["name"].lower(): + rows.append(tr) + headers = html.tr(html.td(html.b("name")), html.td(html.b("description"))) + table = html.table(html.thead(headers), html.tbody(rows)) + return table + + +run(FilterableList) diff --git a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json new file mode 100644 index 000000000..f3a06fe04 --- /dev/null +++ b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json @@ -0,0 +1,22 @@ +[ + { + "name": "Sushi", + "description": "Sushi is a traditional Japanese dish of prepared vinegared rice", + }, + { + "name": "Dal", + "description": "The most common way of preparing dal is in the form of a soup to which onions, tomatoes and various spices may be added", + }, + { + "name": "Pierogi", + "description": "Pierogi are filled dumplings made by wrapping unleavened dough around a savoury or sweet filling and cooking in boiling water", + }, + { + "name": "Shish Kebab", + "description": "Shish kebab is a popular meal of skewered and grilled cubes of meat", + }, + { + "name": "Dim sum", + "description": "Dim sum is a large range of small dishes that Cantonese people traditionally enjoy in restaurants for breakfast and lunch", + } +] \ No newline at end of file diff --git a/docs/source/adding-interactivity/components-sharing-state/index.rst b/docs/source/adding-interactivity/components-sharing-state/index.rst new file mode 100644 index 000000000..9be4c41df --- /dev/null +++ b/docs/source/adding-interactivity/components-sharing-state/index.rst @@ -0,0 +1,59 @@ +Components Sharing State +======================== + +Sometimes you want the state of two components to always change together. To do it, you +need to be able to share state between those two components, to share state between +componets move state to the nearest parent. In React world this is known as "lifting +state up" and it is a very common thing to do. Let's look at 2 examples, also from +`React `__, +but translated to IDOM. + +Sycned Inputs +------------- + +In the code below the two input boxes are syncronized, this happens because they share +state. The state is shared via the parent component ``SyncedInputs``. Check the ``value`` +and ``set_value`` variables. + +.. code-block:: + :linenos: + :lineno-start: 14 + + from idom import component, html, run, hooks + + @component + def SyncedInputs(): + value, set_value = hooks.use_state("") + return html.p( + Input("First input", value, set_value), + Input("Second input", value, set_value), + ) + + + @component + def Input(label, value, set_value): + def handle_change(event): + set_value(event["target"]["value"]) + + return html.label( + label + " ", html.input({"value": value, "onChange": handle_change}) + ) + + run(SyncedInputs) + + +Filterable List +---------------- + +In the example below the search input and the list of elements below share the +same state, the state represents the food name. + +Note how the component ``Table`` gets called at each change of state. The +component is observing the state and reacting to state changes automatically, +just like it would do in React. + +.. idom:: _examples/filterable_list + +.. note:: + + Try typing a food name in the search bar. diff --git a/docs/source/adding-interactivity/index.rst b/docs/source/adding-interactivity/index.rst index a09db3f51..45d14d528 100644 --- a/docs/source/adding-interactivity/index.rst +++ b/docs/source/adding-interactivity/index.rst @@ -6,6 +6,7 @@ Adding Interactivity responding-to-events/index components-with-state/index + components-sharing-state/index state-as-a-snapshot/index multiple-state-updates/index dangers-of-mutability/index @@ -107,7 +108,20 @@ other :ref:`later `). Allow components to change what they display by saving and updating their state. -Section 3: State as a Snapshot +Section 3: Components Sharing State +----------------------------------- + +Sometimes you want the state of two components to always change together. To do it, you +need to be able to share state between those two components, to share state between +componets move state to the nearest parent. In React world this is known as "lifting +state up" and it is a very common thing to do. Let's look at 2 examples, also from +`React `__, +but translated to IDOM. + +.. idom:: components-sharing-state/_examples/filterable_list + + +Section 4: State as a Snapshot ------------------------------ As we :ref:`learned earlier `, state setters behave a little @@ -151,7 +165,7 @@ snapshot. Learn why state updates schedules a re-render, instead of being applied immediately. -Section 4: Multiple State Updates +Section 5: Multiple State Updates --------------------------------- As we saw in an earlier example, :ref:`setting state triggers renders`. In other words, @@ -184,7 +198,7 @@ To accomplish this, instead of passing the next state value directly (e.g. Learn how updates to a components state can be batched, or applied incrementally. -Section 5: Dangers of Mutability +Section 6: Dangers of Mutability -------------------------------- While state can hold any type of value, you should be careful to avoid directly From 58eb716292aadaafdfd6b5c9604462edf179cd08 Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Mon, 10 Jan 2022 20:53:36 -0800 Subject: [PATCH 02/14] Add new line to end of file --- .../_examples/filterable_list/data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json index f3a06fe04..019f0803b 100644 --- a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json +++ b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json @@ -19,4 +19,4 @@ "name": "Dim sum", "description": "Dim sum is a large range of small dishes that Cantonese people traditionally enjoy in restaurants for breakfast and lunch", } -] \ No newline at end of file +] From bc86bbd8c18ea3abb2bd5d4a60bbf8361a056af3 Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Mon, 10 Jan 2022 21:06:30 -0800 Subject: [PATCH 03/14] Update docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json --- .../_examples/filterable_list/data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json index 019f0803b..92c594e71 100644 --- a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json +++ b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json @@ -1,7 +1,7 @@ [ { "name": "Sushi", - "description": "Sushi is a traditional Japanese dish of prepared vinegared rice", + "description": "Sushi is a traditional Japanese dish of prepared vinegared rice" }, { "name": "Dal", From 40526005242addf7d45d603ebd721acf13102923 Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Mon, 10 Jan 2022 21:06:38 -0800 Subject: [PATCH 04/14] Update docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json --- .../_examples/filterable_list/data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json index 92c594e71..e9c15c2a4 100644 --- a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json +++ b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json @@ -5,7 +5,7 @@ }, { "name": "Dal", - "description": "The most common way of preparing dal is in the form of a soup to which onions, tomatoes and various spices may be added", + "description": "The most common way of preparing dal is in the form of a soup to which onions, tomatoes and various spices may be added" }, { "name": "Pierogi", From ecc40cf42d13a3136f531ee3598a6af523ac86e8 Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Mon, 10 Jan 2022 21:06:43 -0800 Subject: [PATCH 05/14] Update docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json --- .../_examples/filterable_list/data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json index e9c15c2a4..7420a2345 100644 --- a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json +++ b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json @@ -9,7 +9,7 @@ }, { "name": "Pierogi", - "description": "Pierogi are filled dumplings made by wrapping unleavened dough around a savoury or sweet filling and cooking in boiling water", + "description": "Pierogi are filled dumplings made by wrapping unleavened dough around a savoury or sweet filling and cooking in boiling water" }, { "name": "Shish Kebab", From 5a653ff7067ce2c9864962f221c9a79e3601b3d6 Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Mon, 10 Jan 2022 21:06:47 -0800 Subject: [PATCH 06/14] Update docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json --- .../_examples/filterable_list/data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json index 7420a2345..3f09a572c 100644 --- a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json +++ b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json @@ -17,6 +17,6 @@ }, { "name": "Dim sum", - "description": "Dim sum is a large range of small dishes that Cantonese people traditionally enjoy in restaurants for breakfast and lunch", + "description": "Dim sum is a large range of small dishes that Cantonese people traditionally enjoy in restaurants for breakfast and lunch" } ] From 48dfa10bd1af2268c73a35aec29232c739b6e7d2 Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Mon, 10 Jan 2022 21:06:54 -0800 Subject: [PATCH 07/14] Update docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py --- .../components-sharing-state/_examples/filterable_list/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py index 9907cc755..a2e0dd17d 100644 --- a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py +++ b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py @@ -6,7 +6,7 @@ HERE = Path(__file__) DATA_PATH = HERE.parent / "data.json" -sculpture_data = json.loads(DATA_PATH.read_text()) +food_data = json.loads(DATA_PATH.read_text()) @component From bbd573ca05ecce818b4585571f364c42405e53b6 Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Mon, 10 Jan 2022 21:06:58 -0800 Subject: [PATCH 08/14] Update docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py --- .../components-sharing-state/_examples/filterable_list/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py index a2e0dd17d..9b0658371 100644 --- a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py +++ b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py @@ -28,7 +28,7 @@ def handle_change(event): @component def Table(value, set_value): rows = [] - for row in data: + for row in food_data: name = html.td(row["name"]) descr = html.td(row["description"]) tr = html.tr(name, descr, value) From c17084f04651d1c8def8f04a5ba5820e48addbcb Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Mon, 10 Jan 2022 21:07:17 -0800 Subject: [PATCH 09/14] Update docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json --- .../_examples/filterable_list/data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json index 3f09a572c..f977fe9a7 100644 --- a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json +++ b/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json @@ -13,7 +13,7 @@ }, { "name": "Shish Kebab", - "description": "Shish kebab is a popular meal of skewered and grilled cubes of meat", + "description": "Shish kebab is a popular meal of skewered and grilled cubes of meat" }, { "name": "Dim sum", From c291e9c06fc292c414c46b22e9cc9a35a7528d08 Mon Sep 17 00:00:00 2001 From: Alessio Civitillo <@acivitillo@dyvenia.com> Date: Sun, 16 Jan 2022 09:56:01 +0100 Subject: [PATCH 10/14] making syncedinputs an example, moving to managing-state --- docs/source/adding-interactivity/index.rst | 20 ++--------- docs/source/managing-state/index.rst | 16 +++++++-- .../managing-state/shared-component-state.rst | 8 ----- .../_examples/filterable_list/app.py | 0 .../_examples/filterable_list/data.json | 0 .../_examples/synced_inputs/app.py | 23 +++++++++++++ .../shared-component-state}/index.rst | 34 +++---------------- 7 files changed, 45 insertions(+), 56 deletions(-) delete mode 100644 docs/source/managing-state/shared-component-state.rst rename docs/source/{adding-interactivity/components-sharing-state => managing-state/shared-component-state}/_examples/filterable_list/app.py (100%) rename docs/source/{adding-interactivity/components-sharing-state => managing-state/shared-component-state}/_examples/filterable_list/data.json (100%) create mode 100644 docs/source/managing-state/shared-component-state/_examples/synced_inputs/app.py rename docs/source/{adding-interactivity/components-sharing-state => managing-state/shared-component-state}/index.rst (62%) diff --git a/docs/source/adding-interactivity/index.rst b/docs/source/adding-interactivity/index.rst index 45d14d528..a09db3f51 100644 --- a/docs/source/adding-interactivity/index.rst +++ b/docs/source/adding-interactivity/index.rst @@ -6,7 +6,6 @@ Adding Interactivity responding-to-events/index components-with-state/index - components-sharing-state/index state-as-a-snapshot/index multiple-state-updates/index dangers-of-mutability/index @@ -108,20 +107,7 @@ other :ref:`later `). Allow components to change what they display by saving and updating their state. -Section 3: Components Sharing State ------------------------------------ - -Sometimes you want the state of two components to always change together. To do it, you -need to be able to share state between those two components, to share state between -componets move state to the nearest parent. In React world this is known as "lifting -state up" and it is a very common thing to do. Let's look at 2 examples, also from -`React `__, -but translated to IDOM. - -.. idom:: components-sharing-state/_examples/filterable_list - - -Section 4: State as a Snapshot +Section 3: State as a Snapshot ------------------------------ As we :ref:`learned earlier `, state setters behave a little @@ -165,7 +151,7 @@ snapshot. Learn why state updates schedules a re-render, instead of being applied immediately. -Section 5: Multiple State Updates +Section 4: Multiple State Updates --------------------------------- As we saw in an earlier example, :ref:`setting state triggers renders`. In other words, @@ -198,7 +184,7 @@ To accomplish this, instead of passing the next state value directly (e.g. Learn how updates to a components state can be batched, or applied incrementally. -Section 6: Dangers of Mutability +Section 5: Dangers of Mutability -------------------------------- While state can hold any type of value, you should be careful to avoid directly diff --git a/docs/source/managing-state/index.rst b/docs/source/managing-state/index.rst index 4ef9850ac..272b62afc 100644 --- a/docs/source/managing-state/index.rst +++ b/docs/source/managing-state/index.rst @@ -7,8 +7,20 @@ Managing State keeping-components-pure logical-flow-of-state structuring-your-state - shared-component-state + shared-component-state/index when-to-reset-state writing-tests -Under construction 🚧 + + +Section 4: Shared Component State +--------------------------------- + +Sometimes you want the state of two components to always change together. To do it, you +need to be able to share state between those two components, to share state between +componets move state to the nearest parent. In React world this is known as "lifting +state up" and it is a very common thing to do. Let's look at 2 examples, also from +`React `__, +but translated to IDOM. + +.. idom:: shared-component-state/_examples/filterable_list \ No newline at end of file diff --git a/docs/source/managing-state/shared-component-state.rst b/docs/source/managing-state/shared-component-state.rst deleted file mode 100644 index 3c9f66617..000000000 --- a/docs/source/managing-state/shared-component-state.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. _Shared Component State: - -Shared Component State 🚧 -========================= - -.. note:: - - Under construction 🚧 diff --git a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py b/docs/source/managing-state/shared-component-state/_examples/filterable_list/app.py similarity index 100% rename from docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py rename to docs/source/managing-state/shared-component-state/_examples/filterable_list/app.py diff --git a/docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json b/docs/source/managing-state/shared-component-state/_examples/filterable_list/data.json similarity index 100% rename from docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json rename to docs/source/managing-state/shared-component-state/_examples/filterable_list/data.json diff --git a/docs/source/managing-state/shared-component-state/_examples/synced_inputs/app.py b/docs/source/managing-state/shared-component-state/_examples/synced_inputs/app.py new file mode 100644 index 000000000..f9c824943 --- /dev/null +++ b/docs/source/managing-state/shared-component-state/_examples/synced_inputs/app.py @@ -0,0 +1,23 @@ +from idom import component, html, run, hooks + + +@component +def SyncedInputs(): + value, set_value = hooks.use_state("") + return html.p( + Input("First input", value, set_value), + Input("Second input", value, set_value), + ) + + +@component +def Input(label, value, set_value): + def handle_change(event): + set_value(event["target"]["value"]) + + return html.label( + label + " ", html.input({"value": value, "onChange": handle_change}) + ) + + +run(SyncedInputs) diff --git a/docs/source/adding-interactivity/components-sharing-state/index.rst b/docs/source/managing-state/shared-component-state/index.rst similarity index 62% rename from docs/source/adding-interactivity/components-sharing-state/index.rst rename to docs/source/managing-state/shared-component-state/index.rst index 9be4c41df..8d4f30b28 100644 --- a/docs/source/adding-interactivity/components-sharing-state/index.rst +++ b/docs/source/managing-state/shared-component-state/index.rst @@ -1,5 +1,6 @@ -Components Sharing State -======================== +Shared Component State +====================== + Sometimes you want the state of two components to always change together. To do it, you need to be able to share state between those two components, to share state between @@ -8,39 +9,14 @@ state up" and it is a very common thing to do. Let's look at 2 examples, also fr `React `__, but translated to IDOM. -Sycned Inputs +Synced Inputs ------------- In the code below the two input boxes are syncronized, this happens because they share state. The state is shared via the parent component ``SyncedInputs``. Check the ``value`` and ``set_value`` variables. -.. code-block:: - :linenos: - :lineno-start: 14 - - from idom import component, html, run, hooks - - @component - def SyncedInputs(): - value, set_value = hooks.use_state("") - return html.p( - Input("First input", value, set_value), - Input("Second input", value, set_value), - ) - - - @component - def Input(label, value, set_value): - def handle_change(event): - set_value(event["target"]["value"]) - - return html.label( - label + " ", html.input({"value": value, "onChange": handle_change}) - ) - - run(SyncedInputs) - +.. idom:: _examples/synced_inputs Filterable List ---------------- From 565e2b487994f337ec7b35bba07f81fde023b2ab Mon Sep 17 00:00:00 2001 From: Alessio Civitillo <@acivitillo@dyvenia.com> Date: Sun, 23 Jan 2022 09:54:44 +0100 Subject: [PATCH 11/14] fixing isort import issue in shared-component-state examples --- .../shared-component-state/_examples/synced_inputs/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/managing-state/shared-component-state/_examples/synced_inputs/app.py b/docs/source/managing-state/shared-component-state/_examples/synced_inputs/app.py index f9c824943..dcc3e1246 100644 --- a/docs/source/managing-state/shared-component-state/_examples/synced_inputs/app.py +++ b/docs/source/managing-state/shared-component-state/_examples/synced_inputs/app.py @@ -1,4 +1,4 @@ -from idom import component, html, run, hooks +from idom import component, hooks, html, run @component From e0fb5e0d48c012a7e16b39cfd48227b20aa6194c Mon Sep 17 00:00:00 2001 From: Alessio Civitillo <@acivitillo@dyvenia.com> Date: Fri, 28 Jan 2022 09:09:03 +0100 Subject: [PATCH 12/14] fixing link references --- docs/source/managing-state/index.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/source/managing-state/index.rst b/docs/source/managing-state/index.rst index 272b62afc..73c67e2c6 100644 --- a/docs/source/managing-state/index.rst +++ b/docs/source/managing-state/index.rst @@ -21,6 +21,4 @@ need to be able to share state between those two components, to share state betw componets move state to the nearest parent. In React world this is known as "lifting state up" and it is a very common thing to do. Let's look at 2 examples, also from `React `__, -but translated to IDOM. - -.. idom:: shared-component-state/_examples/filterable_list \ No newline at end of file +but translated to IDOM. \ No newline at end of file From c0fa43591c55735ba4e106210d62ec7e3a76a15c Mon Sep 17 00:00:00 2001 From: Alessio Civitillo <@acivitillo@dyvenia.com> Date: Thu, 17 Feb 2022 09:39:13 +0100 Subject: [PATCH 13/14] fixing docker build by upgrading npm and fast-json-path --- docs/Dockerfile | 2 +- docs/source/_custom_js/package-lock.json | 258 ++++++++++++++---- .../components-with-state/index.rst | 2 +- noxfile.py | 11 +- src/client/package-lock.json | 4 +- 5 files changed, 219 insertions(+), 58 deletions(-) diff --git a/docs/Dockerfile b/docs/Dockerfile index 0a6cc87f2..8ace7d671 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /app/ # -------------- RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - RUN apt-get install -yq nodejs build-essential -RUN npm install -g npm@7.13.0 +RUN npm install -g npm@8.5.0 # Create Python Venv # ------------------ diff --git a/docs/source/_custom_js/package-lock.json b/docs/source/_custom_js/package-lock.json index 49364d871..44264d0f2 100644 --- a/docs/source/_custom_js/package-lock.json +++ b/docs/source/_custom_js/package-lock.json @@ -19,10 +19,11 @@ } }, "../../../src/client/packages/idom-client-react": { - "version": "0.34.0", + "version": "0.36.0", + "integrity": "sha512-pIK5eNwFSHKXg7ClpASWFVKyZDYxz59MSFpVaX/OqJFkrJaAxBuhKGXNTMXmuyWOL5Iyvb/ErwwDRxQRzMNkfQ==", "license": "MIT", "dependencies": { - "fast-json-patch": "^3.0.0-1", + "fast-json-patch": "3.1.0", "htm": "^3.0.3" }, "devDependencies": { @@ -36,10 +37,21 @@ "react-dom": ">=16" } }, + "../../../src/client/packages/idom-client-react/node_modules/fast-json-patch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.0.tgz", + "integrity": "sha512-IhpytlsVTRndz0hU5t0/MGzS/etxLlfrpG5V5M9mVbuj9TrJLWaMfsox9REM5rkuGX0T+5qjpe8XA1o0gZ42nA==" + }, + "../../../src/client/packages/idom-client-react/node_modules/htm": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/htm/-/htm-3.1.0.tgz", + "integrity": "sha512-L0s3Sid5r6YwrEvkig14SK3Emmc+kIjlfLhEGn2Vy3bk21JyDEes4MoDsbJk6luaPp8bugErnxPz86ZuAw6e5Q==" + }, "node_modules/@rollup/plugin-commonjs": { "version": "21.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.1.tgz", + "integrity": "sha512-EA+g22lbNJ8p5kuZJUYyhhDK7WgJckW5g4pNN7n4mAFUM96VuwUnNT3xr2Db2iCZPI1pJPbGyfT5mS9T1dHfMg==", "dev": true, - "license": "MIT", "dependencies": { "@rollup/pluginutils": "^3.1.0", "commondir": "^1.0.1", @@ -58,13 +70,15 @@ }, "node_modules/@rollup/plugin-commonjs/node_modules/estree-walker": { "version": "2.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true }, "node_modules/@rollup/plugin-node-resolve": { "version": "13.1.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.1.tgz", + "integrity": "sha512-6QKtRevXLrmEig9UiMYt2fSvee9TyltGRfw+qSs6xjUnxwjOzTOqy+/Lpxsgjb8mJn1EQNbCDAvt89O4uzL5kw==", "dev": true, - "license": "MIT", "dependencies": { "@rollup/pluginutils": "^3.1.0", "@types/resolve": "1.17.1", @@ -82,16 +96,18 @@ }, "node_modules/@rollup/plugin-node-resolve/node_modules/@types/resolve": { "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@rollup/plugin-replace": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-3.0.0.tgz", + "integrity": "sha512-3c7JCbMuYXM4PbPWT4+m/4Y6U60SgsnDT/cCyAyUKwFHg7pTSfsSQzIpETha3a3ig6OdOKzZz87D9ZXIK3qsDg==", "dev": true, - "license": "MIT", "dependencies": { "@rollup/pluginutils": "^3.1.0", "magic-string": "^0.25.7" @@ -102,8 +118,9 @@ }, "node_modules/@rollup/pluginutils": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", "dev": true, - "license": "MIT", "dependencies": { "@types/estree": "0.0.39", "estree-walker": "^1.0.1", @@ -118,33 +135,39 @@ }, "node_modules/@rollup/pluginutils/node_modules/@types/estree": { "version": "0.0.39", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true }, "node_modules/@rollup/pluginutils/node_modules/estree-walker": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true }, "node_modules/@types/estree": { "version": "0.0.48", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.48.tgz", + "integrity": "sha512-LfZwXoGUDo0C3me81HXgkBg5CTQYb6xzEl+fNmbO4JdRiSKQ8A0GD1OBBvKAIsbCUgoyAty7m99GqqMQe784ew==", + "dev": true }, "node_modules/@types/node": { "version": "15.12.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.2.tgz", + "integrity": "sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww==", + "dev": true }, "node_modules/balanced-match": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -152,8 +175,9 @@ }, "node_modules/builtin-modules": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", + "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" }, @@ -163,36 +187,56 @@ }, "node_modules/commondir": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true }, "node_modules/concat-map": { "version": "0.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "node_modules/deepmerge": { "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/fs.realpath": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, - "license": "ISC" + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } }, "node_modules/function-bind": { "version": "1.1.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true }, "node_modules/glob": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -210,8 +254,9 @@ }, "node_modules/has": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, - "license": "MIT", "dependencies": { "function-bind": "^1.1.1" }, @@ -225,8 +270,9 @@ }, "node_modules/inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, - "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -234,13 +280,15 @@ }, "node_modules/inherits": { "version": "2.0.4", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/is-core-module": { "version": "2.4.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", + "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", "dev": true, - "license": "MIT", "dependencies": { "has": "^1.0.3" }, @@ -250,29 +298,33 @@ }, "node_modules/is-module": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true }, "node_modules/is-reference": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/estree": "*" } }, "node_modules/magic-string": { "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", "dev": true, - "license": "MIT", "dependencies": { "sourcemap-codec": "^1.4.4" } }, "node_modules/minimatch": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -282,29 +334,33 @@ }, "node_modules/once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, - "license": "ISC", "dependencies": { "wrappy": "1" } }, "node_modules/path-is-absolute": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-parse": { "version": "1.0.7", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true }, "node_modules/picomatch": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.6" }, @@ -314,8 +370,9 @@ }, "node_modules/prettier": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.1.tgz", + "integrity": "sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA==", "dev": true, - "license": "MIT", "bin": { "prettier": "bin-prettier.js" }, @@ -325,8 +382,9 @@ }, "node_modules/resolve": { "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", "dev": true, - "license": "MIT", "dependencies": { "is-core-module": "^2.2.0", "path-parse": "^1.0.6" @@ -337,8 +395,9 @@ }, "node_modules/rollup": { "version": "2.52.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.52.1.tgz", + "integrity": "sha512-/SPqz8UGnp4P1hq6wc9gdTqA2bXQXGx13TtoL03GBm6qGRI6Hm3p4Io7GeiHNLl0BsQAne1JNYY+q/apcY933w==", "dev": true, - "license": "MIT", "bin": { "rollup": "dist/bin/rollup" }, @@ -351,18 +410,22 @@ }, "node_modules/sourcemap-codec": { "version": "1.4.8", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true }, "node_modules/wrappy": { "version": "1.0.2", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true } }, "dependencies": { "@rollup/plugin-commonjs": { "version": "21.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.1.tgz", + "integrity": "sha512-EA+g22lbNJ8p5kuZJUYyhhDK7WgJckW5g4pNN7n4mAFUM96VuwUnNT3xr2Db2iCZPI1pJPbGyfT5mS9T1dHfMg==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -376,12 +439,16 @@ "dependencies": { "estree-walker": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "dev": true } } }, "@rollup/plugin-node-resolve": { "version": "13.1.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.1.tgz", + "integrity": "sha512-6QKtRevXLrmEig9UiMYt2fSvee9TyltGRfw+qSs6xjUnxwjOzTOqy+/Lpxsgjb8mJn1EQNbCDAvt89O4uzL5kw==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -394,6 +461,8 @@ "dependencies": { "@types/resolve": { "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", "dev": true, "requires": { "@types/node": "*" @@ -403,6 +472,8 @@ }, "@rollup/plugin-replace": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-3.0.0.tgz", + "integrity": "sha512-3c7JCbMuYXM4PbPWT4+m/4Y6U60SgsnDT/cCyAyUKwFHg7pTSfsSQzIpETha3a3ig6OdOKzZz87D9ZXIK3qsDg==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -411,6 +482,8 @@ }, "@rollup/pluginutils": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", "dev": true, "requires": { "@types/estree": "0.0.39", @@ -420,28 +493,40 @@ "dependencies": { "@types/estree": { "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", "dev": true }, "estree-walker": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", "dev": true } } }, "@types/estree": { "version": "0.0.48", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.48.tgz", + "integrity": "sha512-LfZwXoGUDo0C3me81HXgkBg5CTQYb6xzEl+fNmbO4JdRiSKQ8A0GD1OBBvKAIsbCUgoyAty7m99GqqMQe784ew==", "dev": true }, "@types/node": { "version": "15.12.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.2.tgz", + "integrity": "sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww==", "dev": true }, "balanced-match": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -450,30 +535,51 @@ }, "builtin-modules": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", + "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", "dev": true }, "commondir": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, "concat-map": { "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "deepmerge": { "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true }, "fs.realpath": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, "function-bind": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, "glob": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -486,6 +592,8 @@ }, "has": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { "function-bind": "^1.1.1" @@ -500,10 +608,24 @@ "lodash": "^4.17.21", "prettier": "^2.5.1", "uvu": "^0.5.1" + }, + "dependencies": { + "fast-json-patch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.0.tgz", + "integrity": "sha512-IhpytlsVTRndz0hU5t0/MGzS/etxLlfrpG5V5M9mVbuj9TrJLWaMfsox9REM5rkuGX0T+5qjpe8XA1o0gZ42nA==" + }, + "htm": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/htm/-/htm-3.1.0.tgz", + "integrity": "sha512-L0s3Sid5r6YwrEvkig14SK3Emmc+kIjlfLhEGn2Vy3bk21JyDEes4MoDsbJk6luaPp8bugErnxPz86ZuAw6e5Q==" + } } }, "inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { "once": "^1.3.0", @@ -512,10 +634,14 @@ }, "inherits": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "is-core-module": { "version": "2.4.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", + "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", "dev": true, "requires": { "has": "^1.0.3" @@ -523,10 +649,14 @@ }, "is-module": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", "dev": true }, "is-reference": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", "dev": true, "requires": { "@types/estree": "*" @@ -534,6 +664,8 @@ }, "magic-string": { "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", "dev": true, "requires": { "sourcemap-codec": "^1.4.4" @@ -541,6 +673,8 @@ }, "minimatch": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -548,6 +682,8 @@ }, "once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1" @@ -555,22 +691,32 @@ }, "path-is-absolute": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, "path-parse": { "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, "picomatch": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, "prettier": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.1.tgz", + "integrity": "sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA==", "dev": true }, "resolve": { "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", "dev": true, "requires": { "is-core-module": "^2.2.0", @@ -579,6 +725,8 @@ }, "rollup": { "version": "2.52.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.52.1.tgz", + "integrity": "sha512-/SPqz8UGnp4P1hq6wc9gdTqA2bXQXGx13TtoL03GBm6qGRI6Hm3p4Io7GeiHNLl0BsQAne1JNYY+q/apcY933w==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -586,11 +734,15 @@ }, "sourcemap-codec": { "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", "dev": true }, "wrappy": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true } } -} +} \ No newline at end of file diff --git a/docs/source/adding-interactivity/components-with-state/index.rst b/docs/source/adding-interactivity/components-with-state/index.rst index 2542d97bb..14d46302b 100644 --- a/docs/source/adding-interactivity/components-with-state/index.rst +++ b/docs/source/adding-interactivity/components-with-state/index.rst @@ -340,7 +340,7 @@ it. The parent component can’t change it. This lets you add state to any compo remove it without impacting the rest of the components. .. card:: - :link: /managing-state/shared-component-state + :link: /managing-state/shared-component-state/index :link-type: doc :octicon:`book` Read More diff --git a/noxfile.py b/noxfile.py index 77b66c3b7..da7812597 100644 --- a/noxfile.py +++ b/noxfile.py @@ -248,7 +248,16 @@ def test_docs(session: Session) -> None: ) session.run("sphinx-build", "-b", "doctest", "docs/source", "docs/build") # ensure docker image build works too - session.run("docker", "build", ".", "--file", "docs/Dockerfile", external=True) + # session.run( + # "docker", + # "build", + # ".", + # "--file", + # "docs/Dockerfile", + # "--tag", + # "idom-docs:latest", + # external=True, + # ) @do_first diff --git a/src/client/package-lock.json b/src/client/package-lock.json index d4b4eb225..8bc92f81e 100644 --- a/src/client/package-lock.json +++ b/src/client/package-lock.json @@ -701,7 +701,7 @@ "dev": true }, "node_modules/fast-json-patch": { - "version": "3.0.0-1", + "version": "3.1.0", "license": "MIT" }, "node_modules/fast-json-stable-stringify": { @@ -3217,7 +3217,7 @@ "dev": true }, "fast-json-patch": { - "version": "3.0.0-1" + "version": "3.1.0" }, "fast-json-stable-stringify": { "version": "2.1.0", From ea339c905891b440182865c25ecec65098eeae3d Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Fri, 18 Feb 2022 00:59:11 -0800 Subject: [PATCH 14/14] Update noxfile.py --- noxfile.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/noxfile.py b/noxfile.py index 707e6f8f1..c1d77d95c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -248,16 +248,7 @@ def test_docs(session: Session) -> None: ) session.run("sphinx-build", "-b", "doctest", "docs/source", "docs/build") # ensure docker image build works too - # session.run( - # "docker", - # "build", - # ".", - # "--file", - # "docs/Dockerfile", - # "--tag", - # "idom-docs:latest", - # external=True, - # ) + session.run("docker", "build", ".", "--file", "docs/Dockerfile", external=True) @do_first