author
int64 4.98k
943k
| date
stringdate 2017-04-15 16:45:02
2022-02-25 15:32:15
| timezone
int64 -46,800
39.6k
| hash
stringlengths 40
40
| message
stringlengths 8
468
| mods
listlengths 1
16
| language
stringclasses 9
values | license
stringclasses 2
values | repo
stringclasses 119
values | original_message
stringlengths 12
491
| is_CCS
int64 1
1
| commit_type
stringclasses 129
values | commit_scope
stringlengths 1
44
⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
841,421
|
23.02.2022 05:34:31
| -32,400
|
8a651bc449e077ad0e9c9d87379775d734d11421
|
chore: Publish `v1.2.144`
|
[
{
"change_type": "MODIFY",
"diff": "@@ -4019,7 +4019,7 @@ checksum = \"fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6\"\n[[package]]\nname = \"wasm\"\n-version = \"1.2.143\"\n+version = \"1.2.144\"\ndependencies = [\n\"anyhow\",\n\"console_error_panic_hook\",\n",
"new_path": "Cargo.lock",
"old_path": "Cargo.lock"
},
{
"change_type": "MODIFY",
"diff": "@@ -6,7 +6,7 @@ license = \"Apache-2.0\"\nname = \"wasm\"\npublish = false\nrepository = \"https://github.com/swc-project/swc.git\"\n-version = \"1.2.143\"\n+version = \"1.2.144\"\n[lib]\ncrate-type = [\"cdylib\"]\n",
"new_path": "crates/wasm/Cargo.toml",
"old_path": "crates/wasm/Cargo.toml"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@swc/core\",\n- \"version\": \"1.2.143\",\n+ \"version\": \"1.2.144\",\n\"description\": \"Super-fast alternative for babel\",\n\"homepage\": \"https://swc.rs\",\n\"main\": \"./index.js\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
chore: Publish `v1.2.144`
| 1
|
chore
| null |
866,412
|
23.02.2022 06:26:47
| 25,200
|
757514b7bdf5a9706964b9cac98c2e2e85681b64
|
fix(browserstack): add axe-core npm dependencies
all of browserstack failed :// . Add axe-core npm dependency to save it
|
[
{
"change_type": "MODIFY",
"diff": "\"@percy/cypress\": \"^3.1.0\",\n\"@percy/dom\": \"^1.0.0-beta.55\",\n\"cypress-wait-until\": \"^1.7.2\",\n- \"ws\": \"^8.4.0\"\n+ \"ws\": \"^8.4.0\",\n+ \"axe-core\": \"^4.4.1\",\n+ \"cypress-axe\": \"^0.14.0\"\n},\n\"package_config_options\": {},\n\"headless\": true\n",
"new_path": "packages/react/tests/e2e-storybook/browserstack.json",
"old_path": "packages/react/tests/e2e-storybook/browserstack.json"
},
{
"change_type": "MODIFY",
"diff": "\"@percy/cypress\": \"^3.1.0\",\n\"@percy/dom\": \"^1.0.0-beta.55\",\n\"cypress-wait-until\": \"^1.7.2\",\n- \"ws\": \"^8.4.0\"\n+ \"ws\": \"^8.4.0\",\n+ \"axe-core\": \"^4.4.1\",\n+ \"cypress-axe\": \"^0.14.0\"\n},\n\"package_config_options\": {},\n\"headless\": true\n",
"new_path": "packages/web-components/tests/e2e-storybook/browserstack.json",
"old_path": "packages/web-components/tests/e2e-storybook/browserstack.json"
}
] |
TypeScript
|
Apache License 2.0
|
carbon-design-system/carbon-for-ibm-dotcom
|
fix(browserstack): add axe-core npm dependencies (#8354)
all of browserstack failed :// . Add axe-core npm dependency to save it
| 1
|
fix
|
browserstack
|
756,043
|
23.02.2022 06:39:48
| 28,800
|
6a25e989a99ff8403fee3eeba9d4b2b42d6247ec
|
chore(root): no-bail when testing/linting whole repo
|
[
{
"change_type": "MODIFY",
"diff": "\"create-agoric-cli\": \"node ./scripts/create-agoric-cli.cjs\",\n\"format\": \"yarn prettier --write .github golang packages\",\n\"lint:format\": \"yarn prettier --check .github golang packages\",\n- \"lint-fix\": \"yarn workspaces run lint-fix\",\n+ \"lint-fix\": \"yarn lerna run --no-bail lint-fix\",\n\"lint\": \"run-s --continue-on-error lint:*\",\n- \"lint:packages\": \"yarn workspaces run lint\",\n- \"test\": \"yarn workspaces run test\",\n+ \"lint:packages\": \"yarn lerna run --no-bail lint\",\n+ \"test\": \"yarn lerna run --no-bail test\",\n\"test:c8-all\": \"rm -rf coverage/tmp && C8_OPTIONS=\\\"--clean=false --temp-directory=$PWD/coverage/tmp\\\" lerna run test:c8\",\n\"test:xs\": \"yarn workspaces run test:xs\",\n\"build\": \"yarn workspaces run build\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
chore(root): no-bail when testing/linting whole repo
| 1
|
chore
|
root
|
841,509
|
23.02.2022 08:47:47
| 28,800
|
9cc094ab574940f87f78328e8e1c1a346e62e5bf
|
feat(node-swc): Expose the new `swc_cli` as a binary named `swcx`
|
[
{
"change_type": "MODIFY",
"diff": "@@ -64,3 +64,5 @@ deny.toml\n.mocharc.js\njest.config.js\ncliff.toml\n+.kodiak.toml\n+clippy.toml\n",
"new_path": ".npmignore",
"old_path": ".npmignore"
},
{
"change_type": "MODIFY",
"diff": "\"swc.android-arm-eabi.node\",\n\"swc\"\n],\n+ \"bin\": {\n+ \"swcx\": \"swc\"\n+ },\n\"description\": \"Super-fast alternative for babel\",\n\"keywords\": [\n\"swc\",\n",
"new_path": "scripts/npm/android-arm-eabi/package.json",
"old_path": "scripts/npm/android-arm-eabi/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"swc.android-arm64.node\",\n\"swc\"\n],\n+ \"bin\": {\n+ \"swcx\": \"swc\"\n+ },\n\"description\": \"Super-fast alternative for babel\",\n\"keywords\": [\n\"swc\",\n",
"new_path": "scripts/npm/android-arm64/package.json",
"old_path": "scripts/npm/android-arm64/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"swc.darwin-arm64.node\",\n\"swc\"\n],\n+ \"bin\": {\n+ \"swcx\": \"swc\"\n+ },\n\"description\": \"Super-fast alternative for babel\",\n\"keywords\": [\n\"swc\",\n",
"new_path": "scripts/npm/darwin-arm64/package.json",
"old_path": "scripts/npm/darwin-arm64/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"swc.darwin-x64.node\",\n\"swc\"\n],\n+ \"bin\": {\n+ \"swcx\": \"swc\"\n+ },\n\"description\": \"Super-fast alternative for babel\",\n\"keywords\": [\n\"swc\",\n",
"new_path": "scripts/npm/darwin-x64/package.json",
"old_path": "scripts/npm/darwin-x64/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"swc.freebsd-x64.node\",\n\"swc\"\n],\n+ \"bin\": {\n+ \"swcx\": \"swc\"\n+ },\n\"description\": \"Super-fast alternative for babel\",\n\"keywords\": [\n\"swc\",\n",
"new_path": "scripts/npm/freebsd-x64/package.json",
"old_path": "scripts/npm/freebsd-x64/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"swc.linux-arm-gnueabihf.node\",\n\"swc\"\n],\n+ \"bin\": {\n+ \"swcx\": \"swc\"\n+ },\n\"description\": \"Super-fast alternative for babel\",\n\"keywords\": [\n\"swc\",\n",
"new_path": "scripts/npm/linux-arm-gnueabihf/package.json",
"old_path": "scripts/npm/linux-arm-gnueabihf/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"swc.linux-arm64-gnu.node\",\n\"swc\"\n],\n+ \"bin\": {\n+ \"swcx\": \"swc\"\n+ },\n\"description\": \"Super-fast alternative for babel\",\n\"keywords\": [\n\"swc\",\n",
"new_path": "scripts/npm/linux-arm64-gnu/package.json",
"old_path": "scripts/npm/linux-arm64-gnu/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"swc.linux-arm64-musl.node\",\n\"swc\"\n],\n+ \"bin\": {\n+ \"swcx\": \"swc\"\n+ },\n\"description\": \"Super-fast alternative for babel\",\n\"keywords\": [\n\"swc\",\n",
"new_path": "scripts/npm/linux-arm64-musl/package.json",
"old_path": "scripts/npm/linux-arm64-musl/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"swc.linux-x64-gnu.node\",\n\"swc\"\n],\n+ \"bin\": {\n+ \"swcx\": \"swc\"\n+ },\n\"description\": \"Super-fast alternative for babel\",\n\"keywords\": [\n\"swc\",\n",
"new_path": "scripts/npm/linux-x64-gnu/package.json",
"old_path": "scripts/npm/linux-x64-gnu/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"swc.linux-x64-musl.node\",\n\"swc\"\n],\n+ \"bin\": {\n+ \"swcx\": \"swc\"\n+ },\n\"description\": \"Super-fast alternative for babel\",\n\"keywords\": [\n\"swc\",\n",
"new_path": "scripts/npm/linux-x64-musl/package.json",
"old_path": "scripts/npm/linux-x64-musl/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"swc.win32-arm64-msvc.node\",\n\"swc.exe\"\n],\n+ \"bin\": {\n+ \"swcx\": \"swc.exe\"\n+ },\n\"description\": \"Super-fast alternative for babel\",\n\"keywords\": [\n\"swc\",\n",
"new_path": "scripts/npm/win32-arm64-msvc/package.json",
"old_path": "scripts/npm/win32-arm64-msvc/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"swc.win32-ia32-msvc.node\",\n\"swc.exe\"\n],\n+ \"bin\": {\n+ \"swcx\": \"swc.exe\"\n+ },\n\"description\": \"Super-fast alternative for babel\",\n\"keywords\": [\n\"swc\",\n",
"new_path": "scripts/npm/win32-ia32-msvc/package.json",
"old_path": "scripts/npm/win32-ia32-msvc/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"swc.win32-x64-msvc.node\",\n\"swc.exe\"\n],\n+ \"bin\": {\n+ \"swcx\": \"swc.exe\"\n+ },\n\"description\": \"Super-fast alternative for babel\",\n\"keywords\": [\n\"swc\",\n",
"new_path": "scripts/npm/win32-x64-msvc/package.json",
"old_path": "scripts/npm/win32-x64-msvc/package.json"
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
feat(node-swc): Expose the new `swc_cli` as a binary named `swcx` (#3684)
| 1
|
feat
|
node-swc
|
277,286
|
23.02.2022 09:24:07
| -3,600
|
e5e9cc8a29b55451493f613f10aa06c780e4cea1
|
docs: Remove 'compound' wording in buttons as it may be confusing for some people.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -15,10 +15,10 @@ async def serve(q: Q):\nui.text(f'basic_disabled_button={q.args.basic_disabled_button}'),\nui.text(f'primary_disabled_button={q.args.primary_disabled_button}'),\nui.text(f'link_disabled_button={q.args.link_disabled_button}'),\n- ui.text(f'basic_compound_button={q.args.basic_compound_button}'),\n- ui.text(f'primary_compound_button={q.args.primary_compound_button}'),\n- ui.text(f'basic_compound_disabled_button={q.args.basic_compound_disabled_button}'),\n- ui.text(f'primary_compound_disabled_button={q.args.primary_compound_disabled_button}'),\n+ ui.text(f'basic_caption_button={q.args.basic_caption_button}'),\n+ ui.text(f'primary_caption_button={q.args.primary_caption_button}'),\n+ ui.text(f'basic_caption_disabled_button={q.args.basic_caption_disabled_button}'),\n+ ui.text(f'primary_caption_disabled_button={q.args.primary_caption_disabled_button}'),\nui.text(f'button_with_icon={q.args.button_with_icon}'),\nui.text(f'icon_button={q.args.icon_button}'),\nui.button(name='show_form', label='Back', primary=True),\n@@ -31,11 +31,11 @@ async def serve(q: Q):\nui.button(name='basic_disabled_button', label='Basic (Disabled)', disabled=True),\nui.button(name='primary_disabled_button', label='Primary (Disabled)', primary=True, disabled=True),\nui.button(name='link_disabled_button', label='Link (Disabled)', link=True, disabled=True),\n- ui.button(name='basic_compound_button', label='Basic', caption='Compound Button.'),\n- ui.button(name='primary_compound_button', label='Primary', caption='Compound Button', primary=True),\n- ui.button(name='basic_compound_disabled_button', label='Basic (Disabled)', caption='Compound Button',\n+ ui.button(name='basic_caption_button', label='Basic', caption='Caption Button.'),\n+ ui.button(name='primary_caption_button', label='Primary', caption='Caption Button', primary=True),\n+ ui.button(name='basic_caption_disabled_button', label='Basic (Disabled)', caption='Caption Button',\ndisabled=True),\n- ui.button(name='primary_compound_disabled_button', label='Primary (Disabled)', caption='Compound Button',\n+ ui.button(name='primary_caption_disabled_button', label='Primary (Disabled)', caption='Caption Button',\nprimary=True, disabled=True),\nui.button(name='button_with_icon', label='Button with an icon', icon='Search'),\nui.button(name='icon_button', icon='Heart', caption='Tooltip text'),\n",
"new_path": "py/examples/button.py",
"old_path": "py/examples/button.py"
},
{
"change_type": "MODIFY",
"diff": "@@ -2581,7 +2581,7 @@ class Button:\nself.label = label\n\"\"\"The text displayed on the button.\"\"\"\nself.caption = caption\n- \"\"\"The caption displayed below the label. Setting a caption renders a compound button.\"\"\"\n+ \"\"\"The caption displayed below the label.\"\"\"\nself.value = value\n\"\"\"A value for this button. If a value is set, it is used for the button's submitted instead of a boolean True.\"\"\"\nself.primary = primary\n",
"new_path": "py/h2o_wave/types.py",
"old_path": "py/h2o_wave/types.py"
},
{
"change_type": "MODIFY",
"diff": "@@ -1009,7 +1009,7 @@ def button(\nArgs:\nname: An identifying name for this component. If the name is prefixed with a '#', the button sets the location hash to the name when clicked.\nlabel: The text displayed on the button.\n- caption: The caption displayed below the label. Setting a caption renders a compound button.\n+ caption: The caption displayed below the label.\nvalue: A value for this button. If a value is set, it is used for the button's submitted instead of a boolean True.\nprimary: True if the button should be rendered as the primary button in the set.\ndisabled: True if the button should be disabled.\n",
"new_path": "py/h2o_wave/ui.py",
"old_path": "py/h2o_wave/ui.py"
},
{
"change_type": "MODIFY",
"diff": "@@ -1177,7 +1177,7 @@ ui_color_picker <- function(\n#'\n#' @param name An identifying name for this component. If the name is prefixed with a '#', the button sets the location hash to the name when clicked.\n#' @param label The text displayed on the button.\n-#' @param caption The caption displayed below the label. Setting a caption renders a compound button.\n+#' @param caption The caption displayed below the label.\n#' @param value A value for this button. If a value is set, it is used for the button's submitted instead of a boolean True.\n#' @param primary True if the button should be rendered as the primary button in the set.\n#' @param disabled True if the button should be disabled.\n",
"new_path": "r/R/ui.R",
"old_path": "r/R/ui.R"
},
{
"change_type": "MODIFY",
"diff": "@@ -44,7 +44,7 @@ export interface Button {\nname: Id\n/** The text displayed on the button. */\nlabel?: S\n- /** The caption displayed below the label. Setting a caption renders a compound button. */\n+ /** The caption displayed below the label. */\ncaption?: S\n/** A value for this button. If a value is set, it is used for the button's submitted instead of a boolean True. */\nvalue?: S\n",
"new_path": "ui/src/button.tsx",
"old_path": "ui/src/button.tsx"
}
] |
Python
|
Apache License 2.0
|
h2oai/wave
|
docs: Remove 'compound' wording in buttons as it may be confusing for some people.
| 1
|
docs
| null |
756,043
|
23.02.2022 09:25:02
| 28,800
|
f7bdb2a9c9217529ea0fd114389d68c821e25558
|
chore: remove unused dependencies resulting in package cycles
|
[
{
"change_type": "MODIFY",
"diff": "\"@endo/promise-kit\": \"^0.2.35\"\n},\n\"devDependencies\": {\n- \"@agoric/swingset-vat\": \"^0.25.0\",\n\"@endo/init\": \"^0.5.35\",\n\"@endo/ses-ava\": \"^0.2.19\",\n\"ava\": \"^3.12.1\",\n",
"new_path": "packages/notifier/package.json",
"old_path": "packages/notifier/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"homepage\": \"https://github.com/Agoric/agoric-sdk#readme\",\n\"dependencies\": {\n\"@agoric/assert\": \"^0.3.16\",\n- \"@agoric/deploy-script-support\": \"^0.6.2\",\n\"@agoric/ertp\": \"^0.13.2\",\n\"@agoric/eventual-send\": \"^0.14.1\",\n\"@agoric/nat\": \"^4.1.0\",\n",
"new_path": "packages/pegasus/package.json",
"old_path": "packages/pegasus/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"homepage\": \"https://github.com/Agoric/agoric-sdk#readme\",\n\"dependencies\": {\n\"@agoric/assert\": \"^0.3.16\",\n- \"@agoric/deploy-script-support\": \"^0.6.2\",\n\"@agoric/ertp\": \"^0.13.2\",\n\"@agoric/eventual-send\": \"^0.14.1\",\n\"@agoric/governance\": \"^0.4.2\",\n",
"new_path": "packages/run-protocol/package.json",
"old_path": "packages/run-protocol/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"tmp\": \"^0.2.1\"\n},\n\"devDependencies\": {\n- \"@agoric/swing-store\": \"^0.6.4\",\n\"@endo/init\": \"^0.5.35\",\n\"ava\": \"^3.12.1\",\n\"c8\": \"^7.7.2\"\n",
"new_path": "packages/swing-store/package.json",
"old_path": "packages/swing-store/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"@agoric/assert\": \"^0.3.16\",\n\"@agoric/ertp\": \"^0.13.2\",\n\"@agoric/eventual-send\": \"^0.14.1\",\n- \"@agoric/governance\": \"^0.4.2\",\n\"@agoric/nat\": \"^4.1.0\",\n\"@agoric/notifier\": \"^0.3.34\",\n\"@agoric/store\": \"^0.6.9\",\n",
"new_path": "packages/zoe/package.json",
"old_path": "packages/zoe/package.json"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
chore: remove unused dependencies resulting in package cycles (#4647)
| 1
|
chore
| null |
277,286
|
23.02.2022 09:27:16
| -3,600
|
3e6536c17194dfaaffa55292f9feb4ca1f984ca8
|
docs: Make image attr docstring in header/nav more clear.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -7712,7 +7712,7 @@ class HeaderCard:\nself.icon_color = icon_color\n\"\"\"The icon's color. *\"\"\"\nself.image = image\n- \"\"\"The logo displayed to the left. Mutually exclusive with icon. *\"\"\"\n+ \"\"\"The URL of an image (usually logo) displayed to the left. Mutually exclusive with icon. *\"\"\"\nself.nav = nav\n\"\"\"The navigation menu to display when the header's icon is clicked. Recommended for mobile screens only. *\"\"\"\nself.items = items\n@@ -9503,7 +9503,7 @@ class NavCard:\nself.icon_color = icon_color\n\"\"\"The icon's color. *\"\"\"\nself.image = image\n- \"\"\"The logo displayed at the top. *\"\"\"\n+ \"\"\"The URL of an image (usually logo) displayed at the top. *\"\"\"\nself.persona = persona\n\"\"\"The user avatar displayed at the top. Mutually exclusive with image, title and subtitle. *\"\"\"\nself.secondary_items = secondary_items\n",
"new_path": "py/h2o_wave/types.py",
"old_path": "py/h2o_wave/types.py"
},
{
"change_type": "MODIFY",
"diff": "@@ -2724,7 +2724,7 @@ def header_card(\nsubtitle: The subtitle, displayed below the title. *\nicon: The icon, displayed to the left. *\nicon_color: The icon's color. *\n- image: The logo displayed to the left. Mutually exclusive with icon. *\n+ image: The URL of an image (usually logo) displayed to the left. Mutually exclusive with icon. *\nnav: The navigation menu to display when the header's icon is clicked. Recommended for mobile screens only. *\nitems: Items that should be displayed on the right side of the header.\nsecondary_items: Items that should be displayed in the center of the header.\n@@ -3379,7 +3379,7 @@ def nav_card(\nsubtitle: The card's subtitle.\nicon: The icon, displayed to the left. *\nicon_color: The icon's color. *\n- image: The logo displayed at the top. *\n+ image: The URL of an image (usually logo) displayed at the top. *\npersona: The user avatar displayed at the top. Mutually exclusive with image, title and subtitle. *\nsecondary_items: Items that should be displayed at the bottom of the card if items are not empty, otherwise displayed under subtitle.\ncolor: Card background color. Defaults to 'card'. One of 'card', 'primary'. See enum h2o_wave.ui.NavCardColor.\n",
"new_path": "py/h2o_wave/ui.py",
"old_path": "py/h2o_wave/ui.py"
},
{
"change_type": "MODIFY",
"diff": "@@ -3141,7 +3141,7 @@ ui_nav_group <- function(\n#' @param subtitle The subtitle, displayed below the title. *\n#' @param icon The icon, displayed to the left. *\n#' @param icon_color The icon's color. *\n-#' @param image The logo displayed to the left. Mutually exclusive with icon. *\n+#' @param image The URL of an image (usually logo) displayed to the left. Mutually exclusive with icon. *\n#' @param nav The navigation menu to display when the header's icon is clicked. Recommended for mobile screens only. *\n#' @param items Items that should be displayed on the right side of the header.\n#' @param secondary_items Items that should be displayed in the center of the header.\n@@ -3905,7 +3905,7 @@ ui_meta_card <- function(\n#' @param subtitle The card's subtitle.\n#' @param icon The icon, displayed to the left. *\n#' @param icon_color The icon's color. *\n-#' @param image The logo displayed at the top. *\n+#' @param image The URL of an image (usually logo) displayed at the top. *\n#' @param persona The user avatar displayed at the top. Mutually exclusive with image, title and subtitle. *\n#' @param secondary_items Items that should be displayed at the bottom of the card if items are not empty, otherwise displayed under subtitle.\n#' @param color Card background color. Defaults to 'card'.\n",
"new_path": "r/R/ui.R",
"old_path": "r/R/ui.R"
},
{
"change_type": "MODIFY",
"diff": "@@ -88,7 +88,7 @@ interface State {\nicon?: S\n/** The icon's color. **/\nicon_color?: S\n- /** The logo displayed to the left. Mutually exclusive with icon. **/\n+ /** The URL of an image (usually logo) displayed to the left. Mutually exclusive with icon. **/\nimage?: S\n/** The navigation menu to display when the header's icon is clicked. Recommended for mobile screens only. **/\nnav?: NavGroup[]\n",
"new_path": "ui/src/header.tsx",
"old_path": "ui/src/header.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -60,7 +60,7 @@ export interface State {\nicon?: S\n/** The icon's color. **/\nicon_color?: S\n- /** The logo displayed at the top. **/\n+ /** The URL of an image (usually logo) displayed at the top. **/\nimage?: S\n/** The user avatar displayed at the top. Mutually exclusive with image, title and subtitle. **/\npersona?: Component\n",
"new_path": "ui/src/nav.tsx",
"old_path": "ui/src/nav.tsx"
}
] |
Python
|
Apache License 2.0
|
h2oai/wave
|
docs: Make image attr docstring in header/nav more clear.
| 1
|
docs
| null |
617,469
|
23.02.2022 09:51:50
| -3,600
|
368b8e3b070fa096fc06a41d17915cced84e9992
|
fix(tracking): fix url sent on route change when tracking outils' start event
|
[
{
"change_type": "MODIFY",
"diff": "@@ -8,13 +8,8 @@ import { stepReducer } from \"../../IndemniteLicenciement/stepReducer\";\nimport { Wizard } from \"../Wizard\";\njest.mock(\"../../../piwik\", () => {\n- let events = [];\nreturn {\n- events,\n- flushEvents() {\n- events = [];\n- },\n- matopush: jest.fn().mockImplementation((event) => events.push(event)),\n+ matopush: jest.fn().mockImplementation(),\n};\n});\n",
"new_path": "packages/code-du-travail-frontend/src/outils/common/__tests__/Wizard.test.js",
"old_path": "packages/code-du-travail-frontend/src/outils/common/__tests__/Wizard.test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -33,27 +33,31 @@ export function initPiwik({\nrefElement.parentNode.insertBefore(scriptElement, refElement);\npreviousPath = location.pathname;\n- Router.events.on(\"routeChangeComplete\", (path) => {\n+ Router.events.on(\"routeChangeStart\", (path) => {\n// We use only the part of the url without the querystring to ensure piwik is happy\n// It seems that piwik doesn't track well page with querystring\nconst [pathname] = path.split(\"?\");\n- // In order to ensure that the page title had been updated,\n- // we delayed pushing the tracking to the next tick.\n- setTimeout(() => {\n- const { q } = Router.query;\n+\nif (previousPath) {\nmatopush([\"setReferrerUrl\", `${previousPath}`]);\n}\nmatopush([\"setCustomUrl\", pathname]);\n- matopush([\"setDocumentTitle\", document.title]);\nmatopush([\"deleteCustomVariables\", \"page\"]);\n- if (/^\\/recherche/.test(pathname) && q) {\n+ previousPath = pathname;\n+ });\n+\n+ Router.events.on(\"routeChangeComplete\", () => {\n+ // In order to ensure that the page title had been updated,\n+ // we delayed pushing the tracking to the next tick.\n+ setTimeout(() => {\n+ const { q } = Router.query;\n+ matopush([\"setDocumentTitle\", document.title]);\n+ if (/^\\/recherche/.test(previousPath) && q) {\nmatopush([\"trackSiteSearch\", q]);\n} else {\nmatopush([\"trackPageView\"]);\n}\nmatopush([\"enableLinkTracking\"]);\n- previousPath = pathname;\n}, 0);\n});\n}\n",
"new_path": "packages/code-du-travail-frontend/src/piwik.js",
"old_path": "packages/code-du-travail-frontend/src/piwik.js"
}
] |
TypeScript
|
Apache License 2.0
|
socialgouv/code-du-travail-numerique
|
fix(tracking): fix url sent on route change when tracking outils' start event (#4254)
| 1
|
fix
|
tracking
|
126,276
|
23.02.2022 10:00:13
| 10,800
|
689da8a2fc7047ef2db308bdb06f67267d83fa1f
|
chore(embedded/tbtree): set initial offsets during initialization
|
[
{
"change_type": "MODIFY",
"diff": "@@ -447,13 +447,14 @@ func OpenWith(path string, nLog, hLog, cLog appendable.Appendable, opts *Options\nsnapshots: make(map[uint64]*Snapshot),\n}\n+ t.committedLogSize = cLogSize\ndiscardedRoots := 0\n- for cLogSize > 0 {\n+ for t.committedLogSize > 0 {\nvar b [cLogEntrySize]byte\n- n, err := cLog.ReadAt(b[:], cLogSize-cLogEntrySize)\n+ n, err := cLog.ReadAt(b[:], t.committedLogSize-cLogEntrySize)\nif err == io.EOF {\n- cLogSize -= int64(n)\n+ t.committedLogSize -= int64(n)\nbreak\n}\nif err != nil {\n@@ -462,7 +463,7 @@ func OpenWith(path string, nLog, hLog, cLog appendable.Appendable, opts *Options\nif b[0]&0x80 != 0 {\n// async entry\n- cLogSize -= cLogEntrySize\n+ t.committedLogSize -= int64(n)\ndiscardedRoots++\ncontinue\n}\n@@ -487,16 +488,15 @@ func OpenWith(path string, nLog, hLog, cLog appendable.Appendable, opts *Options\nerr = hLog.SetOffset(0)\nif err != nil {\n- return nil, err\n+ return nil, fmt.Errorf(\"%w: while setting initial offset of history log for index '%s'\", err, path)\n}\n}\n- t.committedLogSize = cLogSize\nt.committedHLogSize = hLog.Offset()\n- err = t.cLog.SetOffset(cLogSize)\n+ err = t.cLog.SetOffset(t.committedLogSize)\nif err != nil {\n- return nil, fmt.Errorf(\"%w: while loading index commit log\", err)\n+ return nil, fmt.Errorf(\"%w: while setting initial offset of commit log for index '%s'\", err, path)\n}\nopts.log.Infof(\"Index '%s' {ts=%d, discarded_snapshots=%d} successfully loaded\", path, t.Ts(), discardedRoots)\n",
"new_path": "embedded/tbtree/tbtree.go",
"old_path": "embedded/tbtree/tbtree.go"
}
] |
Go
|
Apache License 2.0
|
codenotary/immudb
|
chore(embedded/tbtree): set initial offsets during initialization
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
| 1
|
chore
|
embedded/tbtree
|
265,955
|
23.02.2022 10:19:22
| 28,800
|
e9cce0d0f98b27edd6a8f588347241be0e8823eb
|
docs: Document `DownscopedClient` usage
|
[
{
"change_type": "MODIFY",
"diff": "@@ -536,7 +536,7 @@ export class Storage extends Service {\n* retry a conditionally idempotent operation.\n* @property {string} [userAgent] The value to be prepended to the User-Agent\n* header in API requests.\n- * @property {object} [authClient] GoogleAuth client to reuse instead of creating a new one.\n+ * @property {object} [authClient] `AuthClient` or `GoogleAuth` client to reuse instead of creating a new one.\n* @property {number} [timeout] The amount of time in milliseconds to wait per http request before timing out.\n* @property {object[]} [interceptors_] Array of custom request interceptors to be returned in the order they were assigned.\n* @property {string} [apiEndpoint = storage.google.com] The API endpoint of the service used to make requests.\n@@ -561,7 +561,20 @@ export class Storage extends Service {\n* keyFilename: '/path/to/keyfile.json'\n* });\n* ```\n-\n+ *\n+ * @example\n+ * Create a client with an `AuthClient` (e.g. `DownscopedClient`)\n+ * ```\n+ * const {DownscopedClient} = require('google-auth-library');\n+ * const authClient = new DownscopedClient({...});\n+ *\n+ * const storage = new Storage({authClient});\n+ * ```\n+ *\n+ * Additional samples:\n+ * - https://github.com/googleapis/google-auth-library-nodejs#sample-usage-1\n+ * - https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/downscopedclient.js\n+ *\n* @param {StorageOptions} [options] Configuration options.\n*/\nconstructor(options: StorageOptions = {}) {\n",
"new_path": "src/storage.ts",
"old_path": "src/storage.ts"
}
] |
TypeScript
|
Apache License 2.0
|
googleapis/nodejs-storage
|
docs: Document `DownscopedClient` usage (#1797)
| 1
|
docs
| null |
401,106
|
23.02.2022 11:04:14
| -19,080
|
d75ed5da84dd19cd2beaf7246c953cefba14779c
|
fix: onSearch method not getting called on enter keypress
* fix: ref for keypress on search
affects:
ISSUES CLOSED:
* fix: option not being selected on enter key
affects:
* test: update snapshots
affects:
|
[
{
"change_type": "MODIFY",
"diff": "@@ -31,14 +31,13 @@ const Component: FC<SearchBoxProps> = memo(\nconst wrapperRef = useRef<any>(null),\ninputRef = useCombinedRefs<HTMLInputElement>(ref, useRef(null)),\nisFocused = useRef(false),\n- enterPress = useKeyPress('Enter'),\noptionsRef = useRef<HTMLUListElement>(null),\n[isTyping, updateIsTyping] = useState(false),\n[areOptionsVisible, setOptionsVisibilityState] = useState(false),\n[options, setOptions] = useState<Option[]>(defaultOptions || []),\n[isCustomSearchActive, setIsCustomSearchActive] = useState(false),\n[showCloseIcon, setShowCloseIcon] = useState(false),\n- isEnterKeyPress = useKeyPress('Enter', true, wrapperRef);\n+ isEnterKeyPress = useKeyPress('Enter', true, optionsRef);\nuseEffect(() => {\nif (props.options) {\n@@ -112,17 +111,15 @@ const Component: FC<SearchBoxProps> = memo(\nhideOptions();\n}, wrapperRef);\n- useEffect(() => {\n- enterPress && isFocused.current && !areOptionsVisible && onSearch && onSearch(inputRef.current?.value || '');\n- }, [enterPress, areOptionsVisible]);\n-\nuseEffect(() => {\nif (isEnterKeyPress && isFocused.current) {\n- onSearch && onSearch(inputRef.current?.value || '');\n- if (inputRef.current) {\n- inputRef.current.value = '';\n+ const currentSelectedOption = options.find(option => option.hovered === true);\n+ if (inputRef.current && currentSelectedOption) {\n+ inputRef.current.value = currentSelectedOption.label;\n+ onOptionSelected && onOptionSelected(currentSelectedOption);\ninputRef.current.blur();\n}\n+ onSearch && onSearch(inputRef.current?.value || '');\nsetOptionsVisibilityState(false);\nsetShowCloseIcon(false);\nupdateIsTyping(false);\n",
"new_path": "packages/core/src/components/SearchBox/SearchBox.tsx",
"old_path": "packages/core/src/components/SearchBox/SearchBox.tsx"
}
] |
TypeScript
|
MIT License
|
medly/medly-components
|
fix: onSearch method not getting called on enter keypress (#592)
* fix: ref for keypress on search
affects: @medly-components/core
ISSUES CLOSED: #591
* fix: option not being selected on enter key
affects: @medly-components/core, @medly-components/forms, @medly-components/layout
* test: update snapshots
affects: @medly-components/forms, @medly-components/layout
| 1
|
fix
| null |
71,651
|
23.02.2022 11:16:34
| 28,800
|
f203845d26ae8333f467f1cb91ad965697087d85
|
feat(apigatewayv2): Import existing WebSocketApi from attributes
Closes:
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
[
{
"change_type": "MODIFY",
"diff": "@@ -404,6 +404,12 @@ webSocketApi.addRoute('sendmessage', {\n});\n```\n+To import an existing WebSocketApi:\n+\n+```ts\n+const webSocketApi = apigwv2.WebSocketApi.fromWebSocketApiAttributes(this, 'mywsapi', { webSocketId: 'api-1234' });\n+```\n+\n### Manage Connections Permission\nGrant permission to use API Gateway Management API of a WebSocket API by calling the `grantManageConnections` API.\n",
"new_path": "packages/@aws-cdk/aws-apigatewayv2/README.md",
"old_path": "packages/@aws-cdk/aws-apigatewayv2/README.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -85,11 +85,47 @@ export interface WebSocketApiProps {\nreadonly defaultRouteOptions?: WebSocketRouteOptions;\n}\n+/**\n+ * Attributes for importing a WebSocketApi into the CDK\n+ */\n+export interface WebSocketApiAttributes {\n+ /**\n+ * The identifier of the WebSocketApi\n+ */\n+ readonly webSocketId: string;\n+\n+ /**\n+ * The endpoint URL of the WebSocketApi\n+ * @default - throw san error if apiEndpoint is accessed.\n+ */\n+ readonly apiEndpoint?: string;\n+}\n+\n+\n/**\n* Create a new API Gateway WebSocket API endpoint.\n* @resource AWS::ApiGatewayV2::Api\n*/\nexport class WebSocketApi extends ApiBase implements IWebSocketApi {\n+ /**\n+ * Import an existing WebSocket API into this CDK app.\n+ */\n+ public static fromWebSocketApiAttributes(scope: Construct, id: string, attrs: WebSocketApiAttributes): IWebSocketApi {\n+ class Import extends ApiBase {\n+ public readonly apiId = attrs.webSocketId;\n+ public readonly websocketApiId = attrs.webSocketId;\n+ private readonly _apiEndpoint = attrs.apiEndpoint;\n+\n+ public get apiEndpoint(): string {\n+ if (!this._apiEndpoint) {\n+ throw new Error('apiEndpoint is not configured on the imported WebSocketApi.');\n+ }\n+ return this._apiEndpoint;\n+ }\n+ }\n+ return new Import(scope, id);\n+ }\n+\npublic readonly apiId: string;\npublic readonly apiEndpoint: string;\n",
"new_path": "packages/@aws-cdk/aws-apigatewayv2/lib/websocket/api.ts",
"old_path": "packages/@aws-cdk/aws-apigatewayv2/lib/websocket/api.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -107,6 +107,25 @@ describe('WebSocketApi', () => {\n});\n});\n+ test('import', () => {\n+ // GIVEN\n+ const stack = new Stack();\n+ const imported = WebSocketApi.fromWebSocketApiAttributes(stack, 'imported', { webSocketId: 'ws-1234', apiEndpoint: 'api-endpoint' });\n+\n+ // THEN\n+ expect(imported.apiId).toEqual('ws-1234');\n+ expect(imported.apiEndpoint).toEqual('api-endpoint');\n+ });\n+\n+ test('apiEndpoint for imported', () => {\n+ // GIVEN\n+ const stack = new Stack();\n+ const api = WebSocketApi.fromWebSocketApiAttributes(stack, 'imported', { webSocketId: 'api-1234' });\n+\n+ // THEN\n+ expect(() => api.apiEndpoint).toThrow(/apiEndpoint is not configured/);\n+ });\n+\ndescribe('grantManageConnections', () => {\ntest('adds an IAM policy to the principal', () => {\n// GIVEN\n",
"new_path": "packages/@aws-cdk/aws-apigatewayv2/test/websocket/api.test.ts",
"old_path": "packages/@aws-cdk/aws-apigatewayv2/test/websocket/api.test.ts"
}
] |
TypeScript
|
Apache License 2.0
|
aws/aws-cdk
|
feat(apigatewayv2): Import existing WebSocketApi from attributes (#18958)
Closes: https://github.com/aws/aws-cdk/issues/18755
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
| 1
|
feat
|
apigatewayv2
|
277,286
|
23.02.2022 11:22:42
| -3,600
|
8fd4e20712a71b29f524d4eb953ffea35612b0f4
|
fix(not in latest release): Fix message_bar regressions caused by adding notification_bar.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -87,7 +87,7 @@ def make_snippet_screenshot(code: List[str], img_name: str, page, groups: List[s\nraise ValueError(f'Could not generate {img_name}\\n{err.decode()}')\npage.goto(f'http://localhost:10101/{pool_idx}', wait_until='networkidle')\n- if not is_test:\n+ # Wait for all the resources to be loaded.\ntime.sleep(1)\ngroups = os.path.join(*groups)\n",
"new_path": "tools/showcase/showcase.py",
"old_path": "tools/showcase/showcase.py"
},
{
"change_type": "MODIFY",
"diff": "@@ -68,6 +68,7 @@ type MessagebarProps = {\nname?: S\nextraStyles?: Fluent.IRawStyle\nonDismiss?: () => void\n+ isMultiline?: B\n}\nconst\n@@ -112,18 +113,12 @@ const\ncase 'blocked': return Fluent.MessageBarType.blocked\ndefault: return Fluent.MessageBarType.info\n}\n- },\n- isMessagebarMultiline = (text?: S, buttons?: Component[]) => {\n- const textLength = text?.length || 0\n- const buttonTextLength = buttons?.reduce((prev, curr) => prev + (curr.button?.label?.length || 0) + 15, 0) || 0\n- return textLength + buttonTextLength > 54\n}\nexport const\n- MessageBar = ({ type, text, buttons, name, extraStyles = {}, onDismiss }: MessagebarProps) => {\n+ MessageBar = ({ type, text, buttons, name, extraStyles = {}, onDismiss, isMultiline = false }: MessagebarProps) => {\nconst { iconName, color, background } = notificationTypes[type || 'info']\nconst btns = buttons?.filter(({ button }) => button)\n- const isMultiline = isMessagebarMultiline(text, btns)\nreturn (\ntext?.length\n? (\n@@ -134,9 +129,7 @@ export const\nbackground,\ncolor,\nborderRadius: 4,\n- maxWidth: 500,\nwidth: pc(100),\n- animationFillMode: 'forwards',\n'.ms-Link': { color, fontWeight: 600 },\n'.ms-Link:hover': { textDecoration: 'none', color },\n...extraStyles\n",
"new_path": "ui/src/message_bar.tsx",
"old_path": "ui/src/message_bar.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -41,7 +41,13 @@ export interface NotificationBar {\nevents?: S[]\n}\n-const gap = grid.gap\n+const\n+ gap = grid.gap,\n+ isMessagebarMultiline = (text?: S, buttons?: Component[]) => {\n+ const textLength = text?.length || 0\n+ const buttonTextLength = buttons?.reduce((prev, curr) => prev + (curr.button?.label?.length || 0) + 15, 0) || 0\n+ return textLength + buttonTextLength > 54\n+ }\nexport const\nnotificationBarB: Box<NotificationBar | null> = box(null),\n@@ -81,13 +87,15 @@ export const\nposition: 'fixed',\nanimationDuration: '0.5s',\nanimationFillMode: 'forwards',\n+ maxWidth: 500,\n...getPosition(currentModel?.position, shouldBeOpen)\n},\n- buttons = currentModel?.buttons?.filter(({ button }) => button)\n+ buttons = currentModel?.buttons?.filter(({ button }) => button),\n+ isMultiline = isMessagebarMultiline(currentModel?.text, buttons)\nif (!buttons?.length && shouldBeOpen) timeout = window.setTimeout(onDismiss, model?.timeout || 5000)\n- return <MessageBar type={currentModel?.type} text={currentModel?.text} buttons={buttons} extraStyles={extraStyles} onDismiss={onDismiss} />\n+ return <MessageBar type={currentModel?.type} text={currentModel?.text} buttons={buttons} extraStyles={extraStyles} onDismiss={onDismiss} isMultiline={isMultiline} />\n},\ndispose = () => window.clearTimeout(timeout)\n",
"new_path": "ui/src/notification_bar.tsx",
"old_path": "ui/src/notification_bar.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -13,7 +13,7 @@ Check the full API at [ui.message_bar](/docs/api/ui#message_bar).\n```py\nq.page['form'] = ui.form_card(\n- box='1 1 4 6',\n+ box='1 1 4 7',\nitems=[\nui.message_bar(type='blocked', text='This action is blocked.'),\nui.message_bar(type='error', text='This is an error message'),\n",
"new_path": "website/widgets/form/message_bar.md",
"old_path": "website/widgets/form/message_bar.md"
}
] |
Python
|
Apache License 2.0
|
h2oai/wave
|
fix(not in latest release): Fix message_bar regressions caused by adding notification_bar.
| 1
|
fix
|
not in latest release
|
756,043
|
23.02.2022 11:34:22
| 28,800
|
632abbbbed3ce899b15cc7d432fbb46ae8b79b3e
|
chore(sdk): update yarn
|
[
{
"change_type": "MODIFY",
"diff": "# yarn lockfile v1\n-yarn-path \".yarn/releases/yarn-1.22.15.cjs\"\n+yarn-path \".yarn/releases/yarn-1.22.17.cjs\"\n",
"new_path": ".yarnrc",
"old_path": ".yarnrc"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
chore(sdk): update yarn
| 1
|
chore
|
sdk
|
401,106
|
23.02.2022 11:40:22
| -19,080
|
18e42c69051afbe2bcdd82cbcf9e4e8f966cfaef
|
fix: search component breaks after right arrow key press
* fix: search component breaks after right arrow key press
affects:
ISSUES CLOSED:
* test: update snapshots
affects:
|
[
{
"change_type": "MODIFY",
"diff": "@@ -54,7 +54,7 @@ export const useKeyboardNavigation = (props: Props) => {\n? hoveredOption\n: options.find(op => op.hovered) || options.find(op => op.selected) || { value: '', label: '' },\nnextValueGetter = downPress ? getNextOption : getPrevOption;\n- areOptionsVisible ? hoverOption(nextValueGetter(hovered, nested || options)) : showOptions();\n+ options.length && areOptionsVisible ? hoverOption(nextValueGetter(hovered, nested || options)) : showOptions();\n}\n}, [downPress, upPress, areOptionsVisible]);\n",
"new_path": "packages/core/src/components/SingleSelect/useKeyboardNavigation.tsx",
"old_path": "packages/core/src/components/SingleSelect/useKeyboardNavigation.tsx"
}
] |
TypeScript
|
MIT License
|
medly/medly-components
|
fix: search component breaks after right arrow key press (#593)
* fix: search component breaks after right arrow key press
affects: @medly-components/core, @medly-components/forms, @medly-components/layout
ISSUES CLOSED: #590
* test: update snapshots
affects: @medly-components/forms, @medly-components/layout
Co-authored-by: Mukul Bansal <mukulbansal01@gmail.com>
| 1
|
fix
| null |
160,177
|
23.02.2022 11:44:36
| -28,800
|
9f57894034c9b6d86323e93d22a1185fe433843c
|
fix: change node state to default when create edge success
|
[
{
"change_type": "MODIFY",
"diff": "@@ -11,6 +11,9 @@ class CustomDiamondModel extends DiamondNodeModel {\nif (this.isHovered) {\nstyle.stroke = 'red'\n}\n+ if (this.state === 5) {\n+ style.fill = 'red'\n+ }\nreturn style\n}\n}\n",
"new_path": "packages/core/examples/customNode/customDiamond.mjs",
"old_path": "packages/core/examples/customNode/customDiamond.mjs"
},
{
"change_type": "MODIFY",
"diff": "<meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n<title>LOGIC FLOW</title>\n<link rel=\"stylesheet\" href=\"/src/style/index.css\" />\n+ <style>\n+ /* .lf-node-not-allow .lf-basic-shape {\n+ fill: #f9dee5;\n+ }\n+ .lf-node-allow .lf-basic-shape {\n+ fill: #67C23A;\n+ } */\n+ </style>\n</head>\n<body>\n<button id=\"select_js\">select</button>\n",
"new_path": "packages/core/examples/customNode/index.html",
"old_path": "packages/core/examples/customNode/index.html"
},
{
"change_type": "MODIFY",
"diff": ".lf-node-not-allow {\ncursor: not-allowed;\n}\n-.lf-node-not-allow .lf-basic-shape {\n- fill: #f9dee5;\n-}\n+\n.lf-polyline-append-ns-resize {\ncursor: ns-resize;\n}\n",
"new_path": "packages/core/src/style/index.css",
"old_path": "packages/core/src/style/index.css"
},
{
"change_type": "MODIFY",
"diff": "@@ -184,7 +184,7 @@ class Anchor extends Component<IProps, IState> {\nmsg: targetMsg,\n} = this.targetRuleResults.get(targetInfoId) || {};\nif (isSourcePass && isTargetPass) {\n- targetNode.setElementState(ElementState.ALLOW_CONNECT);\n+ targetNode.setElementState(ElementState.DEFAULT);\ngraphModel.addEdge({\ntype: edgeType,\nsourceNodeId: nodeModel.id,\n",
"new_path": "packages/core/src/view/Anchor.tsx",
"old_path": "packages/core/src/view/Anchor.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -5,8 +5,9 @@ export default function Circle(props) {\nx = 0,\ny = 0,\nr = 4,\n+ className,\n} = props;\n- const attrs = {\n+ const attrs: Record<string, any> = {\ncx: x,\ncy: y,\nr,\n@@ -15,7 +16,6 @@ export default function Circle(props) {\nstrokeWidth: '1',\nstroke: '#000',\nstrokeOpacity: 1,\n- className: 'lf-basic-shape',\n};\nObject.entries(props).forEach(([k, v]) => {\nconst valueType = typeof v;\n@@ -23,6 +23,11 @@ export default function Circle(props) {\nattrs[k] = v;\n}\n});\n+ if (className) {\n+ attrs.className = `lf-basic-shape ${className}`;\n+ } else {\n+ attrs.className = 'lf-basic-shape';\n+ }\nreturn (\n<circle {...attrs} />\n);\n",
"new_path": "packages/core/src/view/basic-shape/Circle.tsx",
"old_path": "packages/core/src/view/basic-shape/Circle.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -6,8 +6,9 @@ export default function Ellipse(props) {\ny = 0,\nrx = 4,\nry = 4,\n+ className,\n} = props;\n- const attrs = {\n+ const attrs: Record<string, any> = {\ncx: x,\ncy: y,\nrx,\n@@ -17,7 +18,6 @@ export default function Ellipse(props) {\nstrokeWidth: '1',\nstroke: '#000',\nstrokeOpacity: 1,\n- // ...props,\n};\nObject.entries(props).forEach(([k, v]) => {\nconst valueType = typeof v;\n@@ -25,6 +25,11 @@ export default function Ellipse(props) {\nattrs[k] = v;\n}\n});\n+ if (className) {\n+ attrs.className = `lf-basic-shape ${className}`;\n+ } else {\n+ attrs.className = 'lf-basic-shape';\n+ }\nreturn (\n<ellipse {...attrs} />\n);\n",
"new_path": "packages/core/src/view/basic-shape/Ellipse.tsx",
"old_path": "packages/core/src/view/basic-shape/Ellipse.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -2,14 +2,13 @@ import { h } from 'preact';\nexport default function Polygon(props) {\nconst { points, className } = props;\n- const attrs = {\n+ const attrs: Record<string, any> = {\nfill: 'transparent',\nfillOpacity: 1,\nstrokeWidth: 1,\nstroke: '#000',\nstrokeOpacity: 1,\npoints: '',\n- className: 'lf-basic-shape',\n};\nObject.entries(props).forEach(([k, v]) => {\nconst valueType = typeof v;\n@@ -19,6 +18,8 @@ export default function Polygon(props) {\n});\nif (className) {\nattrs.className = `lf-basic-shape ${className}`;\n+ } else {\n+ attrs.className = 'lf-basic-shape';\n}\nattrs.points = points.map(point => point.join(',')).join(' ');\n",
"new_path": "packages/core/src/view/basic-shape/Polygon.tsx",
"old_path": "packages/core/src/view/basic-shape/Polygon.tsx"
}
] |
TypeScript
|
Apache License 2.0
|
didi/logicflow
|
fix: change node state to default when create edge success
| 1
|
fix
| null |
841,385
|
23.02.2022 11:45:25
| -10,800
|
b1476d2ac6b7ff37653192fe7f46de9ae282b8cd
|
feat(css/minifier): Compress urange
|
[
{
"change_type": "MODIFY",
"diff": "@@ -15,8 +15,6 @@ struct CompressAngle {\nin_keyframe_block: bool,\n}\n-impl CompressAngle {}\n-\nimpl VisitMut for CompressAngle {\nfn visit_mut_keyframe_block(&mut self, keyframe_block: &mut KeyframeBlock) {\nlet old_in_block = self.in_keyframe_block;\n",
"new_path": "crates/swc_css_minifier/src/compress/angle.rs",
"old_path": "crates/swc_css_minifier/src/compress/angle.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -7,4 +7,5 @@ pub mod keyframes;\npub mod selector;\npub mod time;\npub mod transform_function;\n+pub mod urange;\npub mod url;\n",
"new_path": "crates/swc_css_minifier/src/compress/mod.rs",
"old_path": "crates/swc_css_minifier/src/compress/mod.rs"
},
{
"change_type": "ADD",
"diff": "+use swc_css_ast::*;\n+use swc_css_visit::{VisitMut, VisitMutWith};\n+\n+pub fn compress_urange() -> impl VisitMut {\n+ CompressUrange {}\n+}\n+\n+struct CompressUrange {}\n+\n+impl CompressUrange {\n+ fn remove_leading_zeros(&mut self, value: &str) -> String {\n+ let mut result = String::new();\n+ let mut is_leading = true;\n+\n+ for c in value.chars() {\n+ if c == '0' && is_leading {\n+ continue;\n+ }\n+\n+ is_leading = false;\n+\n+ result.push(c);\n+ }\n+\n+ result\n+ }\n+\n+ fn merge_start_and_end(&mut self, start: &str, end: &str) -> Option<String> {\n+ let mut minified = String::new();\n+ let mut question_counter = 0;\n+\n+ for (idx, start_c) in start.chars().enumerate() {\n+ if let Some(end_c) = &end.chars().nth(idx) {\n+ if start_c.eq_ignore_ascii_case(end_c) && question_counter == 0 {\n+ minified.push(start_c);\n+ } else if start_c == '0' && end_c.eq_ignore_ascii_case(&'f') {\n+ question_counter += 1;\n+\n+ minified.push('?')\n+ } else {\n+ return None;\n+ }\n+ } else {\n+ return None;\n+ }\n+ }\n+\n+ Some(minified)\n+ }\n+}\n+\n+// IE and Edge before 16 version ignore the unicode-range if the 'U' is\n+// lowercase\n+\n+impl VisitMut for CompressUrange {\n+ fn visit_mut_urange(&mut self, urange: &mut Urange) {\n+ urange.visit_mut_children_with(self);\n+\n+ let str_value = &urange.value[2..];\n+\n+ if !urange.value.contains('-') {\n+ let mut value = String::new();\n+\n+ value.push_str(\"U+\");\n+ value.push_str(&self.remove_leading_zeros(str_value));\n+\n+ urange.value = value.into();\n+\n+ return;\n+ }\n+\n+ let parts: Vec<&str> = str_value.split('-').collect();\n+\n+ if parts.len() != 2 {\n+ return;\n+ }\n+\n+ let start = parts[0];\n+ let end = parts[1];\n+ let merged = self.merge_start_and_end(start, end);\n+\n+ if let Some(merged) = &merged {\n+ let mut value = String::new();\n+\n+ value.push_str(\"U+\");\n+ value.push_str(&self.remove_leading_zeros(merged));\n+\n+ urange.value = value.into();\n+ } else {\n+ let mut value = String::new();\n+\n+ value.push_str(\"U+\");\n+ value.push_str(&self.remove_leading_zeros(start));\n+ value.push('-');\n+ value.push_str(&self.remove_leading_zeros(end));\n+\n+ urange.value = value.into();\n+ }\n+ }\n+}\n",
"new_path": "crates/swc_css_minifier/src/compress/urange.rs",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -7,7 +7,8 @@ use self::compress::{\nangle::compress_angle, declaration::compress_declaration,\neasing_function::compress_easing_function, empty::compress_empty,\nfrequency::compress_frequency, keyframes::compress_keyframes, selector::compress_selector,\n- time::compress_time, transform_function::compress_transform_function, url::compress_url,\n+ time::compress_time, transform_function::compress_transform_function, urange::compress_urange,\n+ url::compress_url,\n};\nmod compress;\n@@ -18,10 +19,11 @@ pub fn minify(stylesheet: &mut Stylesheet) {\nstylesheet.visit_mut_with(&mut compress_time());\nstylesheet.visit_mut_with(&mut compress_frequency());\nstylesheet.visit_mut_with(&mut compress_url());\n+ stylesheet.visit_mut_with(&mut compress_urange());\nstylesheet.visit_mut_with(&mut compress_easing_function());\nstylesheet.visit_mut_with(&mut compress_transform_function());\n+ stylesheet.visit_mut_with(&mut compress_declaration());\nstylesheet.visit_mut_with(&mut compress_selector());\nstylesheet.visit_mut_with(&mut compress_keyframes());\n- stylesheet.visit_mut_with(&mut compress_declaration());\nstylesheet.visit_mut_with(&mut compress_selector());\n}\n",
"new_path": "crates/swc_css_minifier/src/lib.rs",
"old_path": "crates/swc_css_minifier/src/lib.rs"
},
{
"change_type": "ADD",
"diff": "+@font-face {\n+ unicode-range: U+26;\n+}\n+\n+@font-face {\n+ unicode-range: U+0-7F;\n+}\n+\n+@font-face {\n+ unicode-range: U+0025-00FF;\n+}\n+\n+@font-face {\n+ unicode-range: U+0025-00FF, U+4??;\n+}\n+\n+@font-face {\n+ unicode-range: U+100000-10FFFF;\n+}\n+\n+@font-face {\n+ unicode-range: U+2b00-2bff;\n+}\n+\n+@font-face {\n+ unicode-range: u+2b00-2bff;\n+}\n+\n+@font-face {\n+ unicode-range: U+1e00-1eff;\n+}\n+\n+@font-face {\n+ unicode-range: U+2125-2128;\n+}\n+\n+@font-face {\n+ unicode-range: U+400-4FF;\n+}\n+\n+@font-face {\n+ unicode-range: U+0025-00FF, U+4??;\n+}\n+\n+@font-face {\n+ unicode-range: U+450-4FF;\n+}\n+\n+@font-face {\n+ unicode-range: U+A5, U+4E00-9FFF, U+30??, U+FF00-FF9F;\n+}\n+\n+@font-face {\n+ unicode-range: U+????;\n+}\n+\n+@font-face {\n+ unicode-range: U+0000-FFFF;\n+}\n+\n+@font-face {\n+ unicode-range: U+10????;\n+}\n+\n+@font-face {\n+ unicode-range: U+100000-10FFFF;\n+}\n+\n+@font-face {\n+ unicode-range: U+1e1e?;\n+}\n+\n+@font-face {\n+ unicode-range: u+????, U+1????, U+10????;\n+}\n+\n+@font-face {\n+ unicode-range: U+0025-0025;\n+}\n+\n+@font-face {\n+ unicode-range: U+1e1e0-1E1EF;\n+}\n+\n+@font-face {\n+ unicode-range: U+0025;\n+}\n+\n+@font-face {\n+ unicode-range: U+0125;\n+}\n+\n+@font-face {\n+ unicode-range: U+0100-FFFF;\n+}\n+\n+@font-face {\n+ unicode-range: U+10125;\n+}\n+\n+@font-face {\n+ unicode-range: U+450-0004FF;\n+}\n+\n+@font-face {\n+ unicode-range: U+000450-4FF;\n+}\n+\n+@font-face {\n+ unicode-range: U+000450-0004FF;\n+}\n",
"new_path": "crates/swc_css_minifier/tests/fixture/compress-urange/input.css",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+@font-face{unicode-range:U+26}@font-face{unicode-range:U+-7F}@font-face{unicode-range:U+25-FF}@font-face{unicode-range:U+25-FF,U+4??}@font-face{unicode-range:U+10????}@font-face{unicode-range:U+2b??}@font-face{unicode-range:U+2b??}@font-face{unicode-range:U+1e??}@font-face{unicode-range:U+2125-2128}@font-face{unicode-range:U+4??}@font-face{unicode-range:U+25-FF,U+4??}@font-face{unicode-range:U+450-4FF}@font-face{unicode-range:U+A5,U+4E00-9FFF,U+30??,U+FF00-FF9F}@font-face{unicode-range:U+????}@font-face{unicode-range:U+????}@font-face{unicode-range:U+10????}@font-face{unicode-range:U+10????}@font-face{unicode-range:U+1e1e?}@font-face{unicode-range:U+????,U+1????,U+10????}@font-face{unicode-range:U+25}@font-face{unicode-range:U+1e1e?}@font-face{unicode-range:U+25}@font-face{unicode-range:U+125}@font-face{unicode-range:U+100-FFFF}@font-face{unicode-range:U+10125}@font-face{unicode-range:U+450-4FF}@font-face{unicode-range:U+450-4FF}@font-face{unicode-range:U+450-4FF}\n",
"new_path": "crates/swc_css_minifier/tests/fixture/compress-urange/output.min.css",
"old_path": null
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
feat(css/minifier): Compress urange (#3668)
| 1
|
feat
|
css/minifier
|
777,374
|
23.02.2022 12:02:33
| 28,800
|
a57fde2c3c922a1aa517820ae294af761974130b
|
fix: regression in det deploy gcp down.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -49,7 +49,9 @@ def deploy_gcp(command: str, args: argparse.Namespace) -> None:\nos.makedirs(args.local_state_path)\nos.chdir(args.local_state_path)\n- if args.tf_state_gcs_bucket_name:\n+ # tf_state_gcs_bucket_name argument is not necessary for `down` operation, because TF reads it\n+ # from local tf files.\n+ if hasattr(args, \"tf_state_gcs_bucket_name\") and args.tf_state_gcs_bucket_name:\nprint(\"Using GCS bucket for state:\", args.tf_state_gcs_bucket_name)\nelse:\nprint(\"Using local state path:\", args.local_state_path)\n",
"new_path": "harness/determined/deploy/gcp/cli.py",
"old_path": "harness/determined/deploy/gcp/cli.py"
}
] |
Python
|
Apache License 2.0
|
determined-ai/determined
|
fix: regression in det deploy gcp down. (#3654)
| 1
|
fix
| null |
841,488
|
23.02.2022 12:08:46
| -28,800
|
6a9d77808b8513246592129e8c9e154f686fa8a9
|
fix(es/parser): Emit an error for non-last rest element in an object pattern
|
[
{
"change_type": "MODIFY",
"diff": "@@ -510,11 +510,7 @@ impl<'a, I: Tokens> Parser<I> {\nself.reparse_expr_as_pat_inner(pat_ty, expr)\n}\n- pub(super) fn reparse_expr_as_pat_inner(\n- &mut self,\n- pat_ty: PatType,\n- expr: Box<Expr>,\n- ) -> PResult<Pat> {\n+ fn reparse_expr_as_pat_inner(&mut self, pat_ty: PatType, expr: Box<Expr>) -> PResult<Pat> {\n// In dts, we do not reparse.\ndebug_assert!(!self.input.syntax().dts());\n@@ -608,11 +604,13 @@ impl<'a, I: Tokens> Parser<I> {\n}\nExpr::Object(ObjectLit { span, props }) => {\n// {}\n+ let len = props.len();\nOk(Pat::Object(ObjectPat {\nspan,\nprops: props\n.into_iter()\n- .map(|prop| {\n+ .enumerate()\n+ .map(|(idx, prop)| {\nlet span = prop.span();\nmatch prop {\nPropOrSpread::Prop(prop) => match *prop {\n@@ -643,6 +641,9 @@ impl<'a, I: Tokens> Parser<I> {\n},\nPropOrSpread::Spread(SpreadElement { dot3_token, expr }) => {\n+ if idx != len - 1 {\n+ self.emit_err(span, SyntaxError::NonLastRestParam)\n+ };\nOk(ObjectPatProp::Rest(RestPat {\nspan,\ndot3_token,\n",
"new_path": "crates/swc_ecma_parser/src/parser/pat.rs",
"old_path": "crates/swc_ecma_parser/src/parser/pat.rs"
},
{
"change_type": "ADD",
"diff": "+var rest, b;\n+\n+for ({...rest, b} of [{}\n+]) ;\n\\ No newline at end of file\n",
"new_path": "crates/swc_ecma_parser/tests/jsx/errors/issue-3523/input.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+error: Rest element must be final element\n+ --> $DIR/tests/jsx/errors/issue-3523/input.js:3:7\n+ |\n+3 | for ({...rest, b} of [{}\n+ | ^^^^^^^\n+\n",
"new_path": "crates/swc_ecma_parser/tests/jsx/errors/issue-3523/input.js.stderr",
"old_path": null
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
fix(es/parser): Emit an error for non-last rest element in an object pattern (#3675)
| 1
|
fix
|
es/parser
|
756,043
|
23.02.2022 12:11:57
| 28,800
|
6f9e9a54aa4b5b262753cbcd71c795df9631acfc
|
build: show changes in git diff check
|
[
{
"change_type": "MODIFY",
"diff": "@@ -25,8 +25,11 @@ runs:\n- name: yarn install\nrun: yarn install\nshell: bash\n- - name: check if git is dirty\n- run: git diff --stat --exit-code\n+ # We do a diff instead of using --frozen-lockfile because\n+ # - it doesn't detect deletions from yarn.lock (see https://github.com/Agoric/agoric-sdk/pull/4646#discussion_r814034842)\n+ # - the diff provides diagnostic info of what changed\n+ - name: fail if git checkout differs\n+ run: git diff --exit-code\nshell: bash\n- name: check dependencies\nrun: yarn check-dependencies\n",
"new_path": ".github/actions/build-node/action.yml",
"old_path": ".github/actions/build-node/action.yml"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
build: show changes in git diff check
| 1
|
build
| null |
730,445
|
23.02.2022 12:15:06
| 28,800
|
243598f2aab7b536d984e6ce4dcfe081fb018334
|
docs(plugin-meetings): add reference to LAYOUT_TYPES
|
[
{
"change_type": "MODIFY",
"diff": "import {hydraTypes} from '@webex/common';\n-/** *****\n- *\n- *\n- * Hey there. Glad you found your way here. Please be sure to alphabetize your constants.\n- *\n- *\n- ****** */\n-\n// *********** LOWERCASE / CAMELCASE STRINGS ************\n-// Please alphabetize\n+\nexport const AUDIO = 'audio';\nexport const AUDIO_INPUT = 'audioinput';\nexport const AUDIO_STATUS = 'audioStatus';\n@@ -174,10 +166,11 @@ export const CONVERSATION_SERVICE = 'identityLookup';\n// Please alphabetize\nexport const DEFAULT_EXCLUDED_STATS = ['timestamp', 'ssrc', 'priority'];\n-/*\n-* layout types for sending control request to locus for selecting the accepted layoutTypes\n+/**\n+ * @description @description Layout type for remote video participants. Allowed values are: Single, Equal, ActivePresence, Prominent, OnePlusN\n+ * @type {array}\n+ * @constant\n*/\n-\nexport const LAYOUT_TYPES = ['Single', 'Equal', 'ActivePresence', 'Prominent', 'OnePlusN'];\n// ******************* BOOLEANS *******************\n",
"new_path": "packages/node_modules/@webex/plugin-meetings/src/constants.js",
"old_path": "packages/node_modules/@webex/plugin-meetings/src/constants.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -5090,7 +5090,7 @@ export default class Meeting extends StatelessWebexPlugin {\n/**\n* Sends request to change layout type for the current meeting for the specific participant/device only\n- * @param {String} layoutType a layout type that should be available in meeting constants LAYOUT_TYPES\n+ * @param {String} layoutType a layout type that should be available in meeting constants {@link #layout_types}\n* @param {Object} renderInfo preferred dimensions for the remote main and content streams (server can ignore it)\n* @param {Object} renderInfo.main preferred dimensions for the remote main video stream\n* @param {Number} renderInfo.main.width preferred width of main video stream\n",
"new_path": "packages/node_modules/@webex/plugin-meetings/src/meeting/index.js",
"old_path": "packages/node_modules/@webex/plugin-meetings/src/meeting/index.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -598,7 +598,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {\n* @param {Object} options\n* @param {String} options.locusUrl\n* @param {String} options.deviceUrl\n- * @param {String} options.layoutType a layout type that should be available in meeting constants LAYOUT_TYPES\n+ * @param {String} options.layoutType a layout type that should be available in meeting constants {@link #layout_types}\n* @param {Object} options.main preferred dimensions for the remote main video stream\n* @param {Number} options.main.width preferred width of main video stream\n* @param {Number} options.main.height preferred height of main video stream\n",
"new_path": "packages/node_modules/@webex/plugin-meetings/src/meeting/request.js",
"old_path": "packages/node_modules/@webex/plugin-meetings/src/meeting/request.js"
}
] |
JavaScript
|
MIT License
|
webex/webex-js-sdk
|
docs(plugin-meetings): add reference to LAYOUT_TYPES
| 1
|
docs
|
plugin-meetings
|
815,598
|
23.02.2022 12:22:09
| -28,800
|
6faa563eee3cd0c30f018378472ab02ab85f5df0
|
chore: CHANGELOG for v0.101.5
|
[
{
"change_type": "MODIFY",
"diff": "+# [v0.101.5](https://github.com/nervosnetwork/ckb/compare/v0.101.4...v0.101.5) (2022-02-23)\n+\n+### Features\n+\n+* #3281: Case-insensitive hex (@zhangsoledad)\n+\n+ Previously, uppercase hex format have been unintentionally forbiden.\n+\n+* #3303: Update default mainnet bootnodes (@doitian)\n+\n+ Add bootnodes from different areas and different cloud providers to make the list more diverse.\n+\n# [v0.101.4](https://github.com/nervosnetwork/ckb/compare/v0.101.3...v0.101.4) (2022-01-18)\n### Features\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
}
] |
Rust
|
MIT License
|
nervosnetwork/ckb
|
chore: CHANGELOG for v0.101.5
| 1
|
chore
| null |
756,043
|
23.02.2022 12:36:46
| 28,800
|
6456af25e154f01820efbdc1afb343902e385384
|
chore(run-protocol)!: remove liquidated flag from vault notifications
|
[
{
"change_type": "MODIFY",
"diff": "* @typedef {Object} LiquidationUIMixin\n* @property {Ratio} interestRate Annual interest rate charge\n* @property {Ratio} liquidationRatio\n- * @property {boolean} liquidated boolean showing whether liquidation occurred\n* @property {'active' | 'liquidating' | 'liquidated' | 'closed' | 'transfer'} vaultState\n*/\n",
"new_path": "packages/run-protocol/src/vaultFactory/types.js",
"old_path": "packages/run-protocol/src/vaultFactory/types.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -263,8 +263,6 @@ export const makeInnerVault = (\ndebtSnapshot,\nlocked: getCollateralAmount(),\ndebt: getDebtAmount(),\n- // XXX uses closure value instead of argument\n- liquidated: phase === VaultPhase.LIQUIDATED,\nvaultState: newPhase,\n});\n};\n",
"new_path": "packages/run-protocol/src/vaultFactory/vault.js",
"old_path": "packages/run-protocol/src/vaultFactory/vault.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -25,7 +25,6 @@ import {\nimport { makeTracer } from '../../src/makeTracer.js';\nimport { SECONDS_PER_YEAR } from '../../src/vaultFactory/interest.js';\n-import { VaultPhase } from '../../src/vaultFactory/vault.js';\nimport {\nCHARGING_PERIOD_KEY,\nRECORDING_PERIOD_KEY,\n@@ -44,6 +43,15 @@ const trace = makeTracer('TestST');\nconst BASIS_POINTS = 10000n;\n+// Define locally to test that vaultFactory uses these values\n+export const Phase = /** @type {const} */ ({\n+ ACTIVE: 'active',\n+ LIQUIDATING: 'liquidating',\n+ CLOSED: 'closed',\n+ LIQUIDATED: 'liquidated',\n+ TRANSFER: 'transfer',\n+});\n+\nasync function makeBundle(sourceRoot) {\nconst url = await importMetaResolve(sourceRoot, import.meta.url);\nconst path = new URL(url).pathname;\n@@ -508,7 +516,7 @@ test('price drop', async t => {\nlet notification = await E(uiNotifier).getUpdateSince();\ntrace('got notificaation', notification);\n- t.falsy(notification.value.liquidated);\n+ t.is(notification.value.vaultState, Phase.ACTIVE);\nt.deepEqual(await notification.value.debt, AmountMath.add(loanAmount, fee));\nconst { RUN: lentAmount } = await E(loanSeat).getCurrentAllocation();\nt.truthy(AmountMath.isEqual(lentAmount, loanAmount), 'received 470 RUN');\n@@ -519,22 +527,21 @@ test('price drop', async t => {\n);\nawait manualTimer.tick();\nnotification = await E(uiNotifier).getUpdateSince();\n- t.falsy(notification.value.liquidated);\n+ t.is(notification.value.vaultState, Phase.ACTIVE);\nawait manualTimer.tick();\nnotification = await E(uiNotifier).getUpdateSince(notification.updateCount);\ntrace('price changed to liquidate', notification.value.vaultState);\n- t.falsy(notification.value.liquidated);\n- t.is(notification.value.vaultState, VaultPhase.LIQUIDATING);\n+ t.is(notification.value.vaultState, Phase.LIQUIDATING);\nawait manualTimer.tick();\nnotification = await E(uiNotifier).getUpdateSince(notification.updateCount);\nt.falsy(notification.updateCount);\n- t.truthy(notification.value.liquidated);\n+ t.is(notification.value.vaultState, Phase.LIQUIDATED);\nconst debtAmountAfter = await E(vault).getDebtAmount();\nconst finalNotification = await E(uiNotifier).getUpdateSince();\n- t.truthy(finalNotification.value.liquidated);\n+ t.is(finalNotification.value.vaultState, Phase.LIQUIDATED);\nt.truthy(AmountMath.isEmpty(debtAmountAfter));\nt.deepEqual(await E(vaultFactory).getRewardAllocation(), {\n@@ -1270,14 +1277,14 @@ test('transfer vault', async t => {\nconst aliceFinish = await E(aliceNotifier).getUpdateSince();\nt.deepEqual(\naliceFinish.value.vaultState,\n- VaultPhase.TRANSFER,\n+ Phase.TRANSFER,\n'transfer closed old notifier',\n);\nconst transferStatus = await E(transferNotifier).getUpdateSince();\nt.deepEqual(\ntransferStatus.value.vaultState,\n- VaultPhase.ACTIVE,\n+ Phase.ACTIVE,\n'new notifier is active',\n);\n@@ -1322,14 +1329,14 @@ test('transfer vault', async t => {\nconst transferFinish = await E(transferNotifier).getUpdateSince();\nt.deepEqual(\ntransferFinish.value.vaultState,\n- VaultPhase.TRANSFER,\n+ Phase.TRANSFER,\n't2 closed old notifier',\n);\nconst t2Status = await E(t2Notifier).getUpdateSince();\nt.deepEqual(\nt2Status.value.vaultState,\n- VaultPhase.ACTIVE,\n+ Phase.ACTIVE,\n'new notifier is active',\n);\n});\n@@ -1657,7 +1664,7 @@ test('mutable liquidity triggers and interest', async t => {\nawait waitForPromisesToSettle();\naliceUpdate = await E(aliceNotifier).getUpdateSince(aliceUpdate.updateCount);\nbobUpdate = await E(bobNotifier).getUpdateSince();\n- t.truthy(aliceUpdate.value.liquidated);\n+ t.is(aliceUpdate.value.vaultState, Phase.LIQUIDATED);\nfor (let i = 0; i < 5; i += 1) {\nmanualTimer.tick();\n@@ -1665,7 +1672,7 @@ test('mutable liquidity triggers and interest', async t => {\nawait waitForPromisesToSettle();\nbobUpdate = await E(bobNotifier).getUpdateSince();\n- t.truthy(bobUpdate.value.liquidated);\n+ t.is(bobUpdate.value.vaultState, Phase.LIQUIDATED);\n});\ntest('bad chargingPeriod', async t => {\n@@ -2159,7 +2166,7 @@ test('mutable liquidity triggers and interest sensitivity', async t => {\nawait waitForPromisesToSettle();\naliceUpdate = await E(aliceNotifier).getUpdateSince(aliceUpdate.updateCount);\nbobUpdate = await E(bobNotifier).getUpdateSince();\n- t.falsy(aliceUpdate.value.liquidated);\n+ t.is(aliceUpdate.value.vaultState, Phase.ACTIVE);\nfor (let i = 0; i < 5; i += 1) {\nmanualTimer.tick();\n@@ -2167,5 +2174,5 @@ test('mutable liquidity triggers and interest sensitivity', async t => {\nawait waitForPromisesToSettle();\nbobUpdate = await E(bobNotifier).getUpdateSince();\n- t.truthy(bobUpdate.value.liquidated);\n+ t.is(bobUpdate.value.vaultState, Phase.LIQUIDATED);\n});\n",
"new_path": "packages/run-protocol/test/vaultFactory/test-vaultFactory.js",
"old_path": "packages/run-protocol/test/vaultFactory/test-vaultFactory.js"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
chore(run-protocol)!: remove liquidated flag from vault notifications
| 1
|
chore
|
run-protocol
|
127,946
|
23.02.2022 13:24:04
| -10,800
|
85336205ff45326ec5ff2b5ac5bd2dea07bdab12
|
feat: closeMenuOnSelect for MultiSelect
|
[
{
"change_type": "MODIFY",
"diff": "@@ -203,6 +203,13 @@ export default function PageSelect() {\ndefault: '_',\ndescription: 'Whether to enable search functionality',\n},\n+ {\n+ name: 'closeMenuOnSelect',\n+ type: 'boolean',\n+ required: false,\n+ default: 'false',\n+ description: 'Close the select menu when the user selects an option',\n+ },\n]}\n/>\n</section>\n",
"new_path": "next-docs/pages/components/select/multiSelect.tsx",
"old_path": "next-docs/pages/components/select/multiSelect.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -200,6 +200,13 @@ export default function PageSelect() {\ndefault: '_',\ndescription: 'Whether to enable search functionality',\n},\n+ {\n+ name: 'closeMenuOnSelect',\n+ type: 'boolean',\n+ required: false,\n+ default: 'true',\n+ description: 'Close the select menu when the user selects an option',\n+ },\n]}\n/>\n</section>\n",
"new_path": "next-docs/pages/components/select/singleSelect.tsx",
"old_path": "next-docs/pages/components/select/singleSelect.tsx"
},
{
"change_type": "ADD",
"diff": "+import React from 'react';\n+import { Select } from '@heathmont/moon-select';\n+\n+const options = [\n+ {\n+ value: 'Option 1',\n+ label: 'Option 1',\n+ },\n+ {\n+ value: 'Option 2',\n+ label: 'Option 2',\n+ },\n+ {\n+ value: 'Option 3',\n+ label: 'Option 3',\n+ },\n+];\n+\n+export const Example = () => (\n+ <div className=\"pb-40 flex items-end flex-wrap\" data-test=\"yo\">\n+ <Select\n+ id=\"test-moon-select\"\n+ options={options}\n+ label=\"Large\"\n+ placeholderSlot=\"Choose an option\"\n+ isMulti\n+ />\n+ </div>\n+);\n+\n+export default Example;\n",
"new_path": "next-docs/public/examples/select/multiReactSelect/Default.tsx",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "import React from 'react';\nimport renderer from 'react-test-renderer';\nimport { moonDesignLight, ThemeProvider } from '@heathmont/moon-themes';\n+import Default from '../Default';\nimport Disabled from '../Disabled';\nimport Error from '../Error';\nimport Hint from '../Hint';\n@@ -51,4 +52,12 @@ describe('Multi Select', () => {\nconst testRenderer = renderer.create(renderWithTheme(<OptionsContent />));\nexpect(testRenderer.toJSON()).toMatchSnapshot();\n});\n+ it('closeMenuOnSelect is false by default', () => {\n+ const testRenderer = renderer.create(renderWithTheme(<Default />));\n+ const instance = testRenderer.root.findAllByProps({\n+ id: 'test-moon-select',\n+ });\n+\n+ expect(instance[1].props.closeMenuOnSelect).toBe(false);\n+ });\n});\n",
"new_path": "next-docs/public/examples/select/multiReactSelect/__tests__/index.test.tsx",
"old_path": "next-docs/public/examples/select/multiReactSelect/__tests__/index.test.tsx"
},
{
"change_type": "ADD",
"diff": "+import React from 'react';\n+import { Select } from '@heathmont/moon-select';\n+\n+const options = [\n+ {\n+ value: 'Option 1',\n+ label: 'Option 1',\n+ },\n+ {\n+ value: 'Option 2',\n+ label: 'Option 2',\n+ },\n+ {\n+ value: 'Option 3',\n+ label: 'Option 3',\n+ },\n+];\n+\n+export const Example = () => (\n+ <div className=\"pb-40 flex items-end flex-wrap\" data-test=\"yo\">\n+ <Select\n+ id=\"test-moon-select\"\n+ options={options}\n+ label=\"Large\"\n+ placeholderSlot=\"Choose an option\"\n+ />\n+ </div>\n+);\n+\n+export default Example;\n",
"new_path": "next-docs/public/examples/select/singleReactSelect/Default.tsx",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "import React from 'react';\nimport renderer from 'react-test-renderer';\nimport { moonDesignLight, ThemeProvider } from '@heathmont/moon-themes';\n+import Default from '../Default';\nimport Disabled from '../Disabled';\nimport Error from '../Error';\nimport Hint from '../Hint';\n@@ -51,4 +52,12 @@ describe('Multi Select', () => {\nconst testRenderer = renderer.create(renderWithTheme(<OptionsContent />));\nexpect(testRenderer.toJSON()).toMatchSnapshot();\n});\n+ it('closeMenuOnSelect is true by default', () => {\n+ const testRenderer = renderer.create(renderWithTheme(<Default />));\n+ const instance = testRenderer.root.findAllByProps({\n+ id: 'test-moon-select',\n+ });\n+\n+ expect(instance[1].props.closeMenuOnSelect).toBe(true);\n+ });\n});\n",
"new_path": "next-docs/public/examples/select/singleReactSelect/__tests__/index.test.tsx",
"old_path": "next-docs/public/examples/select/singleReactSelect/__tests__/index.test.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -51,6 +51,8 @@ const Select = <T extends BaseOptionType>({\nisError = false,\nisSearchable = false,\nsize = 'large',\n+ isMulti,\n+ closeMenuOnSelect,\n...rest\n}: SelectProps<T>) => {\nconst menuRef = useRef(null);\n@@ -67,6 +69,8 @@ const Select = <T extends BaseOptionType>({\nstyles={CustomStyles as StylesConfig<T>}\nisSearchable={isSearchable}\nmenuIsOpen={menuIsOpen}\n+ closeMenuOnSelect={closeMenuOnSelect || (isMulti ? false : true)}\n+ isMulti={isMulti}\ncomponents={{\nMenu,\nValueContainer,\n",
"new_path": "packages/select/src/Select.tsx",
"old_path": "packages/select/src/Select.tsx"
}
] |
TypeScript
|
MIT License
|
coingaming/moon-design
|
feat: closeMenuOnSelect for MultiSelect [B1M2-5339] (#1640)
| 1
|
feat
| null |
135,492
|
23.02.2022 13:34:54
| -28,800
|
595a0c793da3c09fad0737651fb92e5a31d7ad6f
|
docs: fix typo in 'reference-configuration.md'
|
[
{
"change_type": "MODIFY",
"diff": "@@ -177,7 +177,7 @@ module.exports = {\n## Parser presets\nThe parser preset used to parse commit messages can be configured.\n-Use ids resolveable by the node resolve algorithm.\n+Use ids resolvable by the node resolve algorithm.\nThis means installed npm packages and local files can be used.\n",
"new_path": "docs/reference-configuration.md",
"old_path": "docs/reference-configuration.md"
}
] |
TypeScript
|
MIT License
|
conventional-changelog/commitlint
|
docs: fix typo in 'reference-configuration.md' (#3042)
| 1
|
docs
| null |
317,646
|
23.02.2022 13:37:44
| -3,600
|
917bb8e7c5a2438e767823bb60b0a3fd979caff0
|
docs: add --config consistency
|
[
{
"change_type": "MODIFY",
"diff": "@@ -41,7 +41,7 @@ Import-Module oh-my-posh\n:::\n```powershell\n-oh-my-posh --init --shell pwsh --config $env:POSH_THEMES_PATH/jandedobbeleer.omp.json | Invoke-Expression\n+oh-my-posh --init --shell pwsh --config ~/jandedobbeleer.omp.json | Invoke-Expression\n```\nOnce added, reload your profile for the changes to take effect.\n",
"new_path": "docs/docs/install-shells.mdx",
"old_path": "docs/docs/install-shells.mdx"
},
{
"change_type": "MODIFY",
"diff": "@@ -78,7 +78,7 @@ This installs a couple of things:\n- `oh-my-posh.exe` - Windows executable\n- `themes` - The latest Oh My Posh [themes][themes]\n-For the `$PATH` to reload, a restart of your shell session is advised.\n+For the `$PATH` to reload, a restart of your terminal is advised.\n## Update\n@@ -136,8 +136,8 @@ choco upgrade oh-my-posh\n}>\n<TabItem value=\"winget\">\n-You can find the themes winget installs inside the `~\\AppData\\Local\\Programs\\oh-my-posh\\themes\\` folder.\n-To use `jandedobbeleer.omp.json` for example, you can refer to it using `~\\AppData\\Local\\Programs\\oh-my-posh\\themes\\jandedobbeleer.omp.json`\n+You can find the themes winget installs inside the `$env:POSH_THEMES_PATH` folder.\n+To use `jandedobbeleer.omp.json` for example, you can refer to it using `$env:POSH_THEMES_PATH\\jandedobbeleer.omp.json`\nwhen setting the prompt using the `--config` flag.\n</TabItem>\n@@ -167,7 +167,7 @@ when setting the prompt using the `--config` flag.\nThe guides below assume you copied the theme called `jandedobbeleer.omp.json` to your user's `$HOME` folder.\n:::caution\n-When using oh-my-posh inside the WSL, make sure to follow the [linux](linux) installation guide.\n+When using oh-my-posh inside the WSL, make sure to follow the [linux][linux] installation guide.\n:::\n<Shells />\n",
"new_path": "docs/docs/install-windows.mdx",
"old_path": "docs/docs/install-windows.mdx"
}
] |
Go
|
MIT License
|
jandedobbeleer/oh-my-posh
|
docs: add --config consistency
| 1
|
docs
| null |
277,286
|
23.02.2022 13:48:13
| -3,600
|
6fdbbc2668225c55c64d5521f669751fd5ab1633
|
fix(dev): Proxy dev server for file uploads as well.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -35,6 +35,9 @@ export default defineConfig({\n'/_s': {\ntarget: 'http://localhost:10101/_s/',\nws: true\n+ },\n+ '/_f': {\n+ target: 'http://localhost:10101/_f/',\n}\n}\n}\n",
"new_path": "ui/vite.config.js",
"old_path": "ui/vite.config.js"
}
] |
Python
|
Apache License 2.0
|
h2oai/wave
|
fix(dev): Proxy dev server for file uploads as well.
| 1
|
fix
|
dev
|
471,470
|
23.02.2022 14:11:42
| -3,600
|
b762707dadf968ebc2bba170de2d8fb90822da91
|
feat(testing-helpers): Allow configuring of render function
|
[
{
"change_type": "ADD",
"diff": "+---\n+\"@open-wc/testing-helpers\": minor\n+\"@open-wc/testing\": minor\n+---\n+\n+Feat/customize render\n",
"new_path": ".changeset/selfish-wombats-chew.md",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -127,6 +127,16 @@ const el = await fixture(html` <my-el></my-el> `, { parentNode });\n<div style=\"position:absolute;\"><my-el></my-el></div>\n```\n+## Customize the render function\n+\n+It could be the case that you need to customize the render function for compatibility reasons, for example if you have multiple versions of lit-html throughout your project. You can achieve this like so:\n+\n+```js\n+import { render } from 'custom-lit-html-version';\n+\n+const el = await fixture(html`<my-el></my-el>`, { render });\n+```\n+\n## Timings\nBy default fixture awaits the elements \"update complete\" Promise.\n",
"new_path": "docs/docs/testing/helpers.md",
"old_path": "docs/docs/testing/helpers.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -4,6 +4,7 @@ import { isValidRenderArg } from './lib.js';\n/**\n* @typedef {object} FixtureOptions\n+ * @property {*} [render] optional render function to use\n* @property {Element} [parentNode] optional parent node to render the fixture's template to\n* @property {import('@open-wc/scoped-elements').ScopedElementsMap} [scopedElements] optional scoped-elements\n* definition map\n@@ -24,7 +25,7 @@ export function fixtureSync(template, options) {\nif (typeof template === 'string') {\nreturn stringFixtureSync(template, options);\n}\n- if (isValidRenderArg(template)) {\n+ if (!!options?.render || isValidRenderArg(template)) {\nreturn litFixtureSync(template, options);\n}\nthrow new Error(\n@@ -57,7 +58,7 @@ export async function fixture(template, options) {\nif (typeof template === 'string') {\nreturn stringFixture(template, options);\n}\n- if (isValidRenderArg(template)) {\n+ if (!!options?.render || isValidRenderArg(template)) {\nreturn litFixture(template, options);\n}\nthrow new Error('Invalid template provided - string or lit-html TemplateResult is supported');\n",
"new_path": "packages/testing-helpers/src/fixture-no-side-effect.js",
"old_path": "packages/testing-helpers/src/fixture-no-side-effect.js"
},
{
"change_type": "MODIFY",
"diff": "-import { render } from 'lit/html.js';\n+import { render as defaultRender } from 'lit/html.js';\nimport { isTemplateResult } from 'lit/directive-helpers.js';\nimport { fixtureWrapper } from './fixtureWrapper.js';\nimport { elementUpdated } from './elementUpdated.js';\n@@ -26,6 +26,7 @@ const isUsefulNode = ({ nodeType, textContent }) => {\n*/\nexport function litFixtureSync(template, options = {}, getScopedElementsTemplate) {\nconst wrapper = /** @type {HTMLElement} */ (fixtureWrapper(options.parentNode));\n+ const render = options.render ?? defaultRender;\nrender(\noptions.scopedElements ? getScopedElementsTemplate(template, options.scopedElements) : template,\n",
"new_path": "packages/testing-helpers/src/litFixture.js",
"old_path": "packages/testing-helpers/src/litFixture.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -63,6 +63,12 @@ describe('fixtureSync & fixture', () => {\ntestElement(elementAsync);\n});\n+ it('supports customized render functions', async () => {\n+ const render = sinon.stub();\n+ await fixture(html`<div></div>`, { render });\n+ expect(render.called).to.equal(true);\n+ });\n+\nit('supports lit-html TemplateResult with whitespace', async () => {\n/**\n* @param {Element} element\n",
"new_path": "packages/testing-helpers/test-web/fixture.test.js",
"old_path": "packages/testing-helpers/test-web/fixture.test.js"
}
] |
JavaScript
|
MIT License
|
open-wc/open-wc
|
feat(testing-helpers): Allow configuring of render function (#2412)
| 1
|
feat
|
testing-helpers
|
306,644
|
23.02.2022 14:16:48
| -19,080
|
9f826bcc6620a9277a56c3fdb7cbb12c5eb967f2
|
fix(docs): fix description in container
|
[
{
"change_type": "MODIFY",
"diff": "@@ -92,13 +92,13 @@ const Container = ({\nDownload all\n</Button>\n)}\n+ <Paragraph className='mb-6'>{isSiblingTab ? frontmatter?.description : pageDescription}</Paragraph>\n{tabsList && tabsList.length && (\n<>\n- <Paragraph>{isSiblingTab ? frontmatter?.description : pageDescription}</Paragraph>\n<Tabs\nactiveIndex={activeIndex}\nonTabChange={onTabChangeHandler}\n- className='mb-6 mt-4'\n+ className='mb-6 '\n>\n{tabsList.map((tab) => (\n<Tab label={tab}></Tab>\n",
"new_path": "docs/src/components/Container/Container.js",
"old_path": "docs/src/components/Container/Container.js"
}
] |
TypeScript
|
MIT License
|
innovaccer/design-system
|
fix(docs): fix description in container
| 1
|
fix
|
docs
|
277,286
|
23.02.2022 14:26:25
| -3,600
|
170bd1ef774d72be9362a396ea01886dcd67deab
|
fix(VSCode ext): Handle autocomplete edge-case.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -80,8 +80,13 @@ def get_files_to_parse(root: str, py_files: List[str]) -> List[str]:\npy_files.append(f.path)\nreturn py_files\n+\ndef is_in_ui_obj(node: Any) -> bool:\n+ try:\nreturn parso.tree.search_ancestor(node, 'atom_expr').children[0].value == 'ui'\n+ except Exception:\n+ return False\n+\ndef fill_deps(tree: Any, file_metadata: FileMetadata) -> None:\nfor imp in list(tree.iter_imports()):\n",
"new_path": "tools/vscode-extension/server/parser.py",
"old_path": "tools/vscode-extension/server/parser.py"
}
] |
Python
|
Apache License 2.0
|
h2oai/wave
|
fix(VSCode ext): Handle autocomplete edge-case.
| 1
|
fix
|
VSCode ext
|
667,635
|
23.02.2022 14:30:10
| -28,800
|
5165ff9aaa73f9e468c930930d3fb29dfae6b79a
|
fix(ios): fix touch handler conflict
when a HippyRootView contains another HippyRootView, two touch handlers will work simultaneously
|
[
{
"change_type": "MODIFY",
"diff": "@@ -593,6 +593,11 @@ typedef void (^ViewBlock)(UIView *view, BOOL *stop);\nreturn YES;\n}\n}\n+ if ([preventedGestureRecognizer isKindOfClass:[self class]]) {\n+ UIView *currentHandlerView = [self view];\n+ BOOL canPreventGestureRecognizer = [currentHandlerView isDescendantOfView:gestureView];\n+ return canPreventGestureRecognizer;\n+ }\nreturn NO;\n}\n@@ -601,7 +606,14 @@ typedef void (^ViewBlock)(UIView *view, BOOL *stop);\n// iOS will ask `delegate`'s opinion about this gesture recognizer little bit later.\nif (![preventingGestureRecognizer.view isDescendantOfView:_rootView]) {\nreturn NO;\n- } else {\n+ }\n+ else if ([preventingGestureRecognizer isKindOfClass:[self class]]) {\n+ UIView *currentHandlerView = [self view];\n+ UIView *gestureView = [preventingGestureRecognizer view];\n+ BOOL canPreventGestureRecognizer = [currentHandlerView isDescendantOfView:gestureView];\n+ return !canPreventGestureRecognizer;\n+ }\n+ else {\nreturn ![preventingGestureRecognizer.view isDescendantOfView:self.view];\n}\n}\n",
"new_path": "ios/sdk/base/HippyTouchHandler.m",
"old_path": "ios/sdk/base/HippyTouchHandler.m"
}
] |
C++
|
Apache License 2.0
|
tencent/hippy
|
fix(ios): fix touch handler conflict
when a HippyRootView contains another HippyRootView, two touch handlers will work simultaneously
| 1
|
fix
|
ios
|
841,474
|
23.02.2022 14:35:04
| -28,800
|
e252265a3f21a4c0dcef2e9c13aa7365f683b235
|
feat(es/lints): Implement `default-param-last` rule
|
[
{
"change_type": "ADD",
"diff": "+{\n+ \"jsc\": {\n+ \"lints\": {\n+ \"defaultParamLast\": [\"error\"]\n+ }\n+ }\n+}\n",
"new_path": "crates/swc/tests/errors/lints/default-param-last/js/.swcrc",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+function f1(a = 5, b = 6, c) {}\n+\n+function f2(a = 5, b, c = 5) {}\n+\n+const f3 = (a = 5, b, ...c) => {};\n+\n+const f4 = function f(a, b = 5, c) {};\n+\n+const f5 = (a = 5, { b }) => {};\n+\n+class C {\n+ constructor({ a } = {}, b) {}\n+\n+ f([a, b] = [1, 2], c) {}\n+}\n",
"new_path": "crates/swc/tests/errors/lints/default-param-last/js/input.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+error: Default parameters should be last.\n+\n+ |\n+1 | function f1(a = 5, b = 6, c) {}\n+ | ^\n+\n+error: Default parameters should be last.\n+\n+ |\n+3 | function f2(a = 5, b, c = 5) {}\n+ | ^\n+\n+error: Default parameters should be last.\n+\n+ |\n+5 | const f3 = (a = 5, b, ...c) => {};\n+ | ^\n+\n+error: Default parameters should be last.\n+\n+ |\n+7 | const f4 = function f(a, b = 5, c) {};\n+ | ^\n+\n+error: Default parameters should be last.\n+\n+ |\n+9 | const f5 = (a = 5, { b }) => {};\n+ | ^^^^^\n+\n+error: Default parameters should be last.\n+\n+ |\n+12 | constructor({ a } = {}, b) {}\n+ | ^\n+\n+error: Default parameters should be last.\n+\n+ |\n+14 | f([a, b] = [1, 2], c) {}\n+ | ^\n+\n",
"new_path": "crates/swc/tests/errors/lints/default-param-last/js/output.swc-stderr",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"jsc\": {\n+ \"parser\": {\n+ \"syntax\": \"typescript\"\n+ },\n+ \"lints\": {\n+ \"defaultParamLast\": [\"error\"]\n+ }\n+ }\n+}\n",
"new_path": "crates/swc/tests/errors/lints/default-param-last/ts/.swcrc",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+class C1 {\n+ constructor({ a } = {}, public b) {}\n+}\n",
"new_path": "crates/swc/tests/errors/lints/default-param-last/ts/input.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+error: Default parameters should be last.\n+\n+ |\n+2 | constructor({ a } = {}, public b) {}\n+ | ^^^^^^^^\n+\n",
"new_path": "crates/swc/tests/errors/lints/default-param-last/ts/output.swc-stderr",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -125,4 +125,8 @@ pub struct LintConfig {\n#[cfg(feature = \"non_critical_lints\")]\n#[serde(default, alias = \"noBitwise\")]\npub no_bitwise: RuleConfig<NoBitwiseConfig>,\n+\n+ #[cfg(feature = \"non_critical_lints\")]\n+ #[serde(default, alias = \"defaultParamLast\")]\n+ pub default_param_last: RuleConfig<()>,\n}\n",
"new_path": "crates/swc_ecma_lints/src/config.rs",
"old_path": "crates/swc_ecma_lints/src/config.rs"
},
{
"change_type": "ADD",
"diff": "+use swc_common::{errors::HANDLER, Span, Spanned};\n+use swc_ecma_ast::*;\n+use swc_ecma_visit::{noop_visit_type, Visit, VisitWith};\n+\n+use crate::{\n+ config::{LintRuleReaction, RuleConfig},\n+ rule::{visitor_rule, Rule},\n+};\n+\n+static MESSAGE: &str = \"Default parameters should be last.\";\n+\n+pub fn default_param_last(config: &RuleConfig<()>) -> Option<Box<dyn Rule>> {\n+ match config.get_rule_reaction() {\n+ LintRuleReaction::Off => None,\n+ _ => Some(visitor_rule(DefaultParamLast::new(config))),\n+ }\n+}\n+\n+#[derive(Default, Debug)]\n+struct DefaultParamLast {\n+ expected_reaction: LintRuleReaction,\n+}\n+\n+impl DefaultParamLast {\n+ pub fn new(config: &RuleConfig<()>) -> Self {\n+ Self {\n+ expected_reaction: config.get_rule_reaction(),\n+ }\n+ }\n+\n+ fn check<'a, I>(&self, patterns: I)\n+ where\n+ I: IntoIterator<Item = (&'a Pat, Span)>,\n+ {\n+ patterns.into_iter().fold(false, |seen, (pat, span)| {\n+ if matches!(pat, Pat::Assign(..) | Pat::Rest(..)) {\n+ true\n+ } else {\n+ if seen {\n+ self.emit_report(span);\n+ }\n+ seen\n+ }\n+ });\n+ }\n+\n+ fn emit_report(&self, span: Span) {\n+ HANDLER.with(|handler| match self.expected_reaction {\n+ LintRuleReaction::Error => handler.struct_span_err(span, MESSAGE).emit(),\n+ LintRuleReaction::Warning => handler.struct_span_warn(span, MESSAGE).emit(),\n+ _ => {}\n+ })\n+ }\n+}\n+\n+impl Visit for DefaultParamLast {\n+ noop_visit_type!();\n+\n+ fn visit_function(&mut self, function: &Function) {\n+ self.check(function.params.iter().map(|param| (¶m.pat, param.span)));\n+\n+ function.visit_children_with(self);\n+ }\n+\n+ fn visit_arrow_expr(&mut self, arrow_expr: &ArrowExpr) {\n+ self.check(arrow_expr.params.iter().map(|pat| (pat, pat.span())));\n+\n+ arrow_expr.visit_children_with(self);\n+ }\n+\n+ fn visit_constructor(&mut self, constructor: &Constructor) {\n+ constructor\n+ .params\n+ .iter()\n+ .fold(false, |seen, param| match param {\n+ ParamOrTsParamProp::Param(Param { pat, span, .. }) => match pat {\n+ Pat::Assign(..) | Pat::Rest(..) => true,\n+ _ => {\n+ if seen {\n+ self.emit_report(*span);\n+ }\n+ seen\n+ }\n+ },\n+ ParamOrTsParamProp::TsParamProp(TsParamProp { param, span, .. }) => match param {\n+ TsParamPropParam::Assign(..) => true,\n+ _ => {\n+ if seen {\n+ self.emit_report(*span);\n+ }\n+ seen\n+ }\n+ },\n+ });\n+\n+ constructor.visit_children_with(self);\n+ }\n+\n+ fn visit_class_method(&mut self, class_method: &ClassMethod) {\n+ self.check(\n+ class_method\n+ .function\n+ .params\n+ .iter()\n+ .map(|param| (¶m.pat, param.span)),\n+ );\n+\n+ class_method.visit_children_with(self);\n+ }\n+}\n",
"new_path": "crates/swc_ecma_lints/src/rules/default_param_last.rs",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -15,6 +15,7 @@ mod utils;\n#[cfg(feature = \"non_critical_lints\")]\n#[path = \"\"]\npub(crate) mod non_critical_lints {\n+ pub mod default_param_last;\npub mod dot_notation;\npub mod eqeqeq;\npub mod no_alert;\n@@ -113,6 +114,10 @@ pub fn all(lint_params: LintParams) -> Vec<Box<dyn Rule>> {\n));\nrules.extend(no_bitwise::no_bitwise(&lint_config.no_bitwise));\n+\n+ rules.extend(default_param_last::default_param_last(\n+ &lint_config.default_param_last,\n+ ));\n}\nrules\n",
"new_path": "crates/swc_ecma_lints/src/rules/mod.rs",
"old_path": "crates/swc_ecma_lints/src/rules/mod.rs"
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
feat(es/lints): Implement `default-param-last` rule (#3681)
| 1
|
feat
|
es/lints
|
667,664
|
23.02.2022 14:48:50
| -28,800
|
66f7af82411381d55ad3d756374c8c4a7091b4a6
|
fix(android): fix leaf node can't show css
|
[
{
"change_type": "MODIFY",
"diff": "@@ -82,7 +82,11 @@ public class DomModel {\n}\nJSONObject result = new JSONObject();\ntry {\n- result.put(\"nodeId\", domainData.id);\n+ int nodeId = domainData.id;\n+ if (nodeType == NodeType.TEXT_NODE) { // TextNode node Id is the negative id for the ELEMENT_NODE id\n+ nodeId = -nodeId;\n+ }\n+ result.put(\"nodeId\", nodeId);\nresult.put(\"backendNodeId\", domainData.id);\nresult.put(\"nodeType\", nodeType);\nresult.put(\"localName\", domainData.tagName);\n",
"new_path": "android/sdk/src/main/java/com/tencent/mtt/hippy/devsupport/inspector/model/DomModel.java",
"old_path": "android/sdk/src/main/java/com/tencent/mtt/hippy/devsupport/inspector/model/DomModel.java"
}
] |
C++
|
Apache License 2.0
|
tencent/hippy
|
fix(android): fix leaf node can't show css
| 1
|
fix
|
android
|
791,370
|
23.02.2022 14:49:15
| 25,200
|
088a3eeec01ac506a4b365c6e83fb4aa8fd45dff
|
chore(internal/gapicgen): bump generator to v0.26.0
|
[
{
"change_type": "MODIFY",
"diff": "@@ -27,7 +27,7 @@ RUN go install github.com/golang/protobuf/protoc-gen-go@v1.5.2 && \\\ngo install golang.org/x/lint/golint@latest && \\\ngo install golang.org/x/tools/cmd/goimports@latest && \\\ngo install honnef.co/go/tools/cmd/staticcheck@latest && \\\n- go install github.com/googleapis/gapic-generator-go/cmd/protoc-gen-go_gapic@v0.25.0\n+ go install github.com/googleapis/gapic-generator-go/cmd/protoc-gen-go_gapic@v0.26.0\nENV PATH=\"${PATH}:/root/go/bin\"\n# Source: http://debuggable.com/posts/disable-strict-host-checking-for-git-clone:49896ff3-0ac0-4263-9703-1eae4834cda3\n",
"new_path": "internal/gapicgen/cmd/genbot/Dockerfile",
"old_path": "internal/gapicgen/cmd/genbot/Dockerfile"
}
] |
Go
|
Apache License 2.0
|
googleapis/google-cloud-go
|
chore(internal/gapicgen): bump generator to v0.26.0 (#5689)
| 1
|
chore
|
internal/gapicgen
|
756,043
|
23.02.2022 14:57:09
| 28,800
|
59ee9b03f4c40810d91d5a691c83d5d1c59d8918
|
refactor(run-protocol): validate vault phase transitions
|
[
{
"change_type": "MODIFY",
"diff": "@@ -33,19 +33,10 @@ const trace = makeTracer('Vault');\n* ACTIVE - vault is in use and can be changed\n* LIQUIDATING - vault is being liquidated by the vault manager, and cannot be changed by the user\n* TRANSFER - vault is released from the manager and able to be transferred\n+ * TRANSFER - vault is able to be transferred (payments and debits frozen until it has a new owner)\n* CLOSED - vault was closed by the user and all assets have been paid out\n* LIQUIDATED - vault was closed by the manager, with remaining assets paid to owner\n*\n- * These are the valid state transitions:\n- * Active -> Liquidating\n- * Active -> Transferrable\n- * Active -> Closed\n- * Liquidating -> Liquidated\n- * Transferrable -> Active\n- * Transferrable -> Liquidating\n- *\n- * (Liquidated and Closed cannot be changed)\n- *\n* @typedef {VaultPhase[keyof typeof VaultPhase]} VAULT_PHASE\n*/\nexport const VaultPhase = /** @type {const} */ ({\n@@ -56,6 +47,21 @@ export const VaultPhase = /** @type {const} */ ({\nTRANSFER: 'transfer',\n});\n+/**\n+ * @type {{[K in VAULT_PHASE]: Array<VAULT_PHASE>}}\n+ */\n+const validTransitions = {\n+ [VaultPhase.ACTIVE]: [\n+ VaultPhase.LIQUIDATING,\n+ VaultPhase.TRANSFER,\n+ VaultPhase.CLOSED,\n+ ],\n+ [VaultPhase.LIQUIDATING]: [VaultPhase.LIQUIDATED],\n+ [VaultPhase.TRANSFER]: [VaultPhase.ACTIVE, VaultPhase.LIQUIDATING],\n+ [VaultPhase.LIQUIDATED]: [],\n+ [VaultPhase.CLOSED]: [],\n+};\n+\nconst makeOuterKit = inner => {\nconst { updater: uiUpdater, notifier } = makeNotifierKit();\n@@ -117,12 +123,31 @@ export const makeInnerVault = (\nconst { zcfSeat: liquidationZcfSeat, userSeat: liquidationSeat } =\nzcf.makeEmptySeatKit(undefined);\n+ // #region Phase state\n/** @type {VAULT_PHASE} */\nlet phase = VaultPhase.ACTIVE;\n+ /**\n+ * @param {VAULT_PHASE} newPhase\n+ */\n+ const assignPhase = newPhase => {\n+ const validNewPhases = validTransitions[phase];\n+ if (!validNewPhases.includes(newPhase))\n+ throw new Error(`Vault cannot transition from ${phase} to ${newPhase}`);\n+ phase = newPhase;\n+ };\n+\n+ const assertPhase = allegedPhase => {\n+ assert(\n+ phase === allegedPhase,\n+ X`vault must be ${allegedPhase}, not ${phase}`,\n+ );\n+ };\n+\nconst assertVaultIsOpen = () => {\n- assert(phase === VaultPhase.ACTIVE, X`vault must still be active`);\n+ assertPhase(VaultPhase.ACTIVE);\n};\n+ // #endregion\nlet outerUpdater;\n@@ -263,6 +288,8 @@ export const makeInnerVault = (\ndebtSnapshot,\nlocked: getCollateralAmount(),\ndebt: getDebtAmount(),\n+ // newPhase param is so that makeTransferInvitation can finish without setting the vault's phase\n+ // TODO refactor https://github.com/Agoric/agoric-sdk/issues/4415\nvaultState: newPhase,\n});\n};\n@@ -287,8 +314,11 @@ export const makeInnerVault = (\nouterUpdater.finish(uiState);\nouterUpdater = null;\nbreak;\n+ case VaultPhase.TRANSFER:\n+ // Transfer handles finish()/null itself\n+ throw Error('no UI updates from transfer state');\ndefault:\n- throw Error(`unreachable vaultState: ${phase}`);\n+ throw Error(`unreachable vault phase: ${phase}`);\n}\n};\n// XXX Echo notifications from the manager through all vaults\n@@ -309,15 +339,12 @@ export const makeInnerVault = (\nconst liquidated = newDebt => {\nupdateDebtSnapshot(newDebt);\n- phase = VaultPhase.LIQUIDATED;\n+ assignPhase(VaultPhase.LIQUIDATED);\nupdateUiState();\n};\nconst liquidating = () => {\n- if (phase === VaultPhase.LIQUIDATING) {\n- throw new Error('Vault already liquidating');\n- }\n- phase = VaultPhase.LIQUIDATING;\n+ assignPhase(VaultPhase.LIQUIDATING);\nupdateUiState();\n};\n@@ -358,7 +385,7 @@ export const makeInnerVault = (\nrunMint.burnLosses(harden({ RUN: currentDebt }), burnSeat);\nseat.exit();\nburnSeat.exit();\n- phase = VaultPhase.CLOSED;\n+ assignPhase(VaultPhase.CLOSED);\nupdateDebtSnapshot(AmountMath.makeEmpty(runBrand));\nupdateUiState();\n",
"new_path": "packages/run-protocol/src/vaultFactory/vault.js",
"old_path": "packages/run-protocol/src/vaultFactory/vault.js"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
refactor(run-protocol): validate vault phase transitions
| 1
|
refactor
|
run-protocol
|
841,421
|
23.02.2022 15:07:42
| -32,400
|
e35d73adf4efbd7329cae6c63215e1c0a9193f8d
|
chore(clippy): Improve config
|
[
{
"change_type": "MODIFY",
"diff": "+blacklisted-names = [\"bool\", \"char\", \"str\", \"f32\", \"f64\", \"i8\", \"i16\", \"i32\", \"i64\", \"u8\", \"u16\", \"u32\", \"u64\", \"isize\", \"usize\"]\ncognitive-complexity-threshold = 50\ntype-complexity-threshold = 25000\n",
"new_path": "clippy.toml",
"old_path": "clippy.toml"
},
{
"change_type": "MODIFY",
"diff": "@@ -78,8 +78,8 @@ where\nlet mut dq = 0;\nlet mut sq = 0;\n- for char in text.chars() {\n- match char {\n+ for c in text.chars() {\n+ match c {\n// If the character is NULL (U+0000), then the REPLACEMENT CHARACTER (U+FFFD).\n'\\0' => {\nnew_string.push('\\u{FFFD}');\n@@ -91,7 +91,7 @@ where\nlet b3;\nlet b4;\n- let char_as_u8 = char as u8;\n+ let char_as_u8 = c as u8;\nlet bytes = if char_as_u8 > 0x0f {\nlet high = (char_as_u8 >> 4) as usize;\n@@ -101,7 +101,7 @@ where\n&b4[..]\n} else {\n- b3 = [b'\\\\', HEX_DIGITS[char as usize], b' '];\n+ b3 = [b'\\\\', HEX_DIGITS[c as usize], b' '];\n&b3[..]\n};\n@@ -117,16 +117,16 @@ where\n'\"' => {\ndq += 1;\n- new_string.push(char);\n+ new_string.push(c);\n}\n'\\'' => {\nsq += 1;\n- new_string.push(char);\n+ new_string.push(c);\n}\n// Otherwise, the character itself.\n_ => {\n- new_string.push(char);\n+ new_string.push(c);\n}\n};\n}\n@@ -145,8 +145,8 @@ where\n}\nfn write_raw(&mut self, span: Option<Span>, text: &str) -> Result {\n- for char in text.chars() {\n- self.write_raw_char(span, char)?;\n+ for c in text.chars() {\n+ self.write_raw_char(span, c)?;\n}\nOk(())\n",
"new_path": "crates/swc_css_codegen/src/writer/basic.rs",
"old_path": "crates/swc_css_codegen/src/writer/basic.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -254,8 +254,8 @@ impl VisitMut for CompressSelector {\nlet chars = value.chars();\nlet mut starts_with_hyphen = false;\n- for (idx, char) in chars.enumerate() {\n- match char {\n+ for (idx, c) in chars.enumerate() {\n+ match c {\n'0'..='9' if idx == 0 || (starts_with_hyphen && idx == 1) => {\nreturn;\n}\n@@ -264,7 +264,7 @@ impl VisitMut for CompressSelector {\nstarts_with_hyphen = true;\n}\n}\n- _ if !matches!(char, '-' | '_' | 'a'..='z' | 'A'..='Z' | '0'..='9' | '\\u{00a0}'..='\\u{10FFFF}') =>\n+ _ if !matches!(c, '-' | '_' | 'a'..='z' | 'A'..='Z' | '0'..='9' | '\\u{00a0}'..='\\u{10FFFF}') =>\n{\nreturn;\n}\n",
"new_path": "crates/swc_css_minifier/src/compress/selector.rs",
"old_path": "crates/swc_css_minifier/src/compress/selector.rs"
},
{
"change_type": "MODIFY",
"diff": "#![recursion_limit = \"1024\"]\n+#![deny(clippy::all)]\n#![allow(clippy::match_like_matches_macro)]\n#![allow(clippy::nonminimal_bool)]\n#![allow(unused_variables)]\n@@ -1058,7 +1059,7 @@ where\n}\n#[emitter]\n- fn emit_class_memeber(&mut self, node: &ClassMember) -> Result {\n+ fn emit_class_member(&mut self, node: &ClassMember) -> Result {\nmatch *node {\nClassMember::Constructor(ref n) => emit!(n),\nClassMember::ClassProp(ref n) => emit!(n),\n@@ -1123,7 +1124,7 @@ where\nfn emit_class_method(&mut self, n: &ClassMethod) -> Result {\nself.emit_leading_comments_of_span(n.span(), false)?;\n- self.emit_accesibility(n.accessibility)?;\n+ self.emit_accessibility(n.accessibility)?;\nif n.is_static {\nkeyword!(\"static\");\n@@ -1216,7 +1217,7 @@ where\nself.emit_list(n.span, Some(&n.decorators), ListFormat::Decorators)?;\n- self.emit_accesibility(n.accessibility)?;\n+ self.emit_accessibility(n.accessibility)?;\nif n.is_static {\nkeyword!(\"static\");\n@@ -1257,7 +1258,7 @@ where\nself.emit_leading_comments_of_span(n.span(), false)?;\nif n.accessibility != Some(Accessibility::Public) {\n- self.emit_accesibility(n.accessibility)?;\n+ self.emit_accessibility(n.accessibility)?;\n}\nif n.is_static {\n@@ -1295,7 +1296,7 @@ where\nsemi!();\n}\n- fn emit_accesibility(&mut self, n: Option<Accessibility>) -> Result {\n+ fn emit_accessibility(&mut self, n: Option<Accessibility>) -> Result {\nif let Some(a) = n {\nmatch a {\nAccessibility::Public => keyword!(self, \"public\"),\n@@ -1312,7 +1313,7 @@ where\nfn emit_class_constructor(&mut self, n: &Constructor) -> Result {\nself.emit_leading_comments_of_span(n.span(), false)?;\n- self.emit_accesibility(n.accessibility)?;\n+ self.emit_accessibility(n.accessibility)?;\nkeyword!(\"constructor\");\npunct!(\"(\");\n@@ -2844,7 +2845,7 @@ where\npub fn emit_module_export_name(&mut self, node: &ModuleExportName) -> Result {\nmatch *node {\nModuleExportName::Ident(ref ident) => emit!(ident),\n- ModuleExportName::Str(ref str) => emit!(str),\n+ ModuleExportName::Str(ref s) => emit!(s),\n}\n}\n}\n",
"new_path": "crates/swc_ecma_codegen/src/lib.rs",
"old_path": "crates/swc_ecma_codegen/src/lib.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -636,7 +636,7 @@ where\nfn emit_ts_param_prop(&mut self, n: &TsParamProp) -> Result {\nself.emit_leading_comments_of_span(n.span(), false)?;\n- self.emit_accesibility(n.accessibility)?;\n+ self.emit_accessibility(n.accessibility)?;\nif n.is_override {\nkeyword!(\"override\");\n",
"new_path": "crates/swc_ecma_codegen/src/typescript.rs",
"old_path": "crates/swc_ecma_codegen/src/typescript.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -24,16 +24,16 @@ where\nmatch e {\nExpr::Member(MemberExpr { prop, .. }) => {\nif let MemberProp::Computed(c) = prop {\n- if let Expr::Lit(Lit::Str(str)) = &mut *c.expr {\n- if !str.value.starts_with(|c: char| c.is_ascii_alphabetic()) {\n+ if let Expr::Lit(Lit::Str(s)) = &mut *c.expr {\n+ if !s.value.starts_with(|c: char| c.is_ascii_alphabetic()) {\nreturn;\n}\nself.changed = true;\ntracing::debug!(\"arguments: Optimizing computed access to arguments\");\n*prop = MemberProp::Ident(Ident {\n- span: str.span,\n- sym: str.take().value,\n+ span: s.span,\n+ sym: s.take().value,\noptional: false,\n})\n}\n@@ -42,16 +42,16 @@ where\nExpr::SuperProp(SuperPropExpr { prop, .. }) => {\nif let SuperProp::Computed(c) = prop {\n- if let Expr::Lit(Lit::Str(str)) = &mut *c.expr {\n- if !str.value.starts_with(|c: char| c.is_ascii_alphabetic()) {\n+ if let Expr::Lit(Lit::Str(s)) = &mut *c.expr {\n+ if !s.value.starts_with(|c: char| c.is_ascii_alphabetic()) {\nreturn;\n}\nself.changed = true;\ntracing::debug!(\"arguments: Optimizing computed access to arguments\");\n*prop = SuperProp::Ident(Ident {\n- span: str.span,\n- sym: str.take().value,\n+ span: s.span,\n+ sym: s.take().value,\noptional: false,\n})\n}\n",
"new_path": "crates/swc_ecma_minifier/src/compress/optimize/arguments.rs",
"old_path": "crates/swc_ecma_minifier/src/compress/optimize/arguments.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -473,10 +473,10 @@ impl SyntaxError {\nSyntaxError::GeneratorConstructor => \"A constructor cannot be generator\".into(),\n- SyntaxError::ImportBindingIsString(str) => format!(\n+ SyntaxError::ImportBindingIsString(s) => format!(\n\"A string literal cannot be used as an imported binding.\\n- Did you mean `import \\\n{{ \\\"{}\\\" as foo }}`?\",\n- str\n+ s\n)\n.into(),\n",
"new_path": "crates/swc_ecma_parser/src/error.rs",
"old_path": "crates/swc_ecma_parser/src/error.rs"
},
{
"change_type": "MODIFY",
"diff": "#![cfg_attr(docsrs, feature(doc_cfg))]\n#![cfg_attr(test, feature(bench_black_box))]\n#![cfg_attr(test, feature(test))]\n+#![deny(clippy::all)]\n#![deny(unused)]\n#![allow(clippy::nonminimal_bool)]\n#![allow(clippy::too_many_arguments)]\n",
"new_path": "crates/swc_ecma_parser/src/lib.rs",
"old_path": "crates/swc_ecma_parser/src/lib.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -166,8 +166,8 @@ impl Visit for UsageVisitor {\nif e.op == op!(\"in\") {\n// 'entries' in Object\n// 'entries' in [1, 2, 3]\n- if let Expr::Lit(Lit::Str(str)) = &*e.left {\n- self.add_property_deps(&e.right, &str.value);\n+ if let Expr::Lit(Lit::Str(s)) = &*e.left {\n+ self.add_property_deps(&e.right, &s.value);\n}\n}\n}\n@@ -215,8 +215,8 @@ impl Visit for UsageVisitor {\nfn visit_member_expr(&mut self, e: &MemberExpr) {\ne.obj.visit_with(self);\nif let MemberProp::Computed(c) = &e.prop {\n- if let Expr::Lit(Lit::Str(str)) = &*c.expr {\n- self.add_property_deps(&e.obj, &str.value);\n+ if let Expr::Lit(Lit::Str(s)) = &*c.expr {\n+ self.add_property_deps(&e.obj, &s.value);\n}\nc.visit_with(self);\n}\n",
"new_path": "crates/swc_ecma_preset_env/src/corejs3/usage.rs",
"old_path": "crates/swc_ecma_preset_env/src/corejs3/usage.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -213,8 +213,8 @@ impl VisitMut for TemplateLiteral {\nlet len = args.len();\nfor arg in args {\n// for `${asd}a`\n- if let Expr::Lit(Lit::Str(str)) = obj.as_ref() {\n- if str.value.len() == 0 && len == 2 {\n+ if let Expr::Lit(Lit::Str(s)) = obj.as_ref() {\n+ if s.value.len() == 0 && len == 2 {\nobj = arg;\ncontinue;\n}\n",
"new_path": "crates/swc_ecma_transforms_compat/src/es2015/template_literal.rs",
"old_path": "crates/swc_ecma_transforms_compat/src/es2015/template_literal.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -463,7 +463,7 @@ impl ClassProperties {\n},\n}))),\nPropName::Num(num) => Box::new(Expr::from(num)),\n- PropName::Str(str) => Box::new(Expr::from(str)),\n+ PropName::Str(s) => Box::new(Expr::from(s)),\nPropName::BigInt(big_int) => Box::new(Expr::from(big_int)),\nPropName::Computed(mut key) => {\n@@ -551,7 +551,7 @@ impl ClassProperties {\nlet ident = Ident::new(\nformat!(\"_{}\", prop.key.id.sym).into(),\n// We use `self.mark` for private variables.\n- prop.key.span.apply_mark(self.private.curr_mark()),\n+ prop.key.span.apply_mark(self.private.cur_mark()),\n);\nif let Some(value) = &mut prop.value {\n@@ -653,7 +653,7 @@ impl ClassProperties {\nmethod\n.span\n.with_ctxt(SyntaxContext::empty())\n- .apply_mark(self.private.curr_mark()),\n+ .apply_mark(self.private.cur_mark()),\n);\nlet should_use_map =\n@@ -664,7 +664,7 @@ impl ClassProperties {\nlet weak_coll_var = Ident::new(\nformat!(\"_{}\", method.key.id.sym).into(),\n// We use `self.mark` for private variables.\n- method.key.span.apply_mark(self.private.curr_mark()),\n+ method.key.span.apply_mark(self.private.cur_mark()),\n);\nmethod.function.visit_with(&mut UsedNameCollector {\nused_names: &mut used_names,\n",
"new_path": "crates/swc_ecma_transforms_compat/src/es2022/class_properties/mod.rs",
"old_path": "crates/swc_ecma_transforms_compat/src/es2022/class_properties/mod.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -30,7 +30,7 @@ impl PrivateRecord {\n&self.0.last().unwrap().class_name\n}\n- pub fn curr_mark(&self) -> Mark {\n+ pub fn cur_mark(&self) -> Mark {\nself.0.last().unwrap().mark\n}\n",
"new_path": "crates/swc_ecma_transforms_compat/src/es2022/class_properties/private_field.rs",
"old_path": "crates/swc_ecma_transforms_compat/src/es2022/class_properties/private_field.rs"
},
{
"change_type": "MODIFY",
"diff": "//! New-generation javascript to old-javascript compiler.\n+#![deny(clippy::all)]\n#![allow(clippy::vec_box)]\npub use self::{\n",
"new_path": "crates/swc_ecma_transforms_compat/src/lib.rs",
"old_path": "crates/swc_ecma_transforms_compat/src/lib.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -452,8 +452,8 @@ where\n})\n}\nPropName::Ident(id) => MemberProp::Ident(id),\n- PropName::Str(str) => MemberProp::Computed(ComputedPropName {\n- expr: Box::new(Expr::Lit(Lit::Str(str))),\n+ PropName::Str(s) => MemberProp::Computed(ComputedPropName {\n+ expr: Box::new(Expr::Lit(Lit::Str(s))),\nspan: DUMMY_SP,\n}),\nPropName::Num(num) => MemberProp::Computed(ComputedPropName {\n@@ -510,8 +510,8 @@ where\n})\n}\nPropName::Ident(id) => MemberProp::Ident(id),\n- PropName::Str(str) => MemberProp::Computed(ComputedPropName {\n- expr: Box::new(Expr::Lit(Lit::Str(str))),\n+ PropName::Str(s) => MemberProp::Computed(ComputedPropName {\n+ expr: Box::new(Expr::Lit(Lit::Str(s))),\nspan: DUMMY_SP,\n}),\nPropName::Num(num) => MemberProp::Computed(ComputedPropName {\n",
"new_path": "crates/swc_ecma_transforms_typescript/src/strip.rs",
"old_path": "crates/swc_ecma_transforms_typescript/src/strip.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -655,7 +655,7 @@ impl Swcify for swc_estree_ast::ModuleExportNameType {\nswc_estree_ast::ModuleExportNameType::Ident(ident) => {\nswc_ecma_ast::ModuleExportName::Ident(ident.swcify(ctx).id)\n}\n- swc_estree_ast::ModuleExportNameType::Str(str) => str.swcify(ctx).into(),\n+ swc_estree_ast::ModuleExportNameType::Str(s) => s.swcify(ctx).into(),\n}\n}\n}\n",
"new_path": "crates/swc_estree_compat/src/swcify/stmt.rs",
"old_path": "crates/swc_estree_compat/src/swcify/stmt.rs"
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
chore(clippy): Improve config (#3691)
| 1
|
chore
|
clippy
|
269,448
|
23.02.2022 15:18:13
| 28,800
|
3adc75ef33a8ff94475b338d3ccc57000bf7f9dc
|
docs: Add a new cookbook that covers using the jfrog-cli as an alternative to the artifactory publisher to publish to artifactory.
|
[
{
"change_type": "ADD",
"diff": "+# Publish to Artifactory using jfrog cli\n+This cookbook is an example of a [publishers](/customization/publishers/) section that uses the [jfrog cli](https://jfrog.com/getcli/) to upload files to Artifactory. It is an alternative to using the [Artifactory Publisher](/customization/artifactory.md) to upload to artifactory.\n+\n+The benefit of this method is that it uses the jfrog cli configuration instead of environment variables for configuration.\n+\n+This assumes you have the [jfrog cli](https://jfrog.com/getcli/) downloaded and in your path, and [configured](https://www.jfrog.com/confluence/display/CLI/JFrog+CLI#JFrogCLI-JFrogPlatformConfiguration) with an API key.\n+\n+```yaml\n+publishers:\n+- name: artifactory\n+ cmd: >-\n+ jfrog rt u \"{{ .ArtifactName }}\" \"my-repository/{{ tolower .Env.PROJECT_KEY }}/{{ tolower .ProjectName }}/{{ .Version }}/\"\n+ dir: \"{{ dir .ArtifactPath }}\"\n+```\n+\n+Example of a [publishers](/customization/publishers/) section pushing files to a Artifactory instance using jfrog cli with api key in environment\n+\n+```yaml\n+publishers:\n+- name: artifactory\n+ cmd: >-\n+ jfrog rt u \"{{ .ArtifactName }}\" \"my-repository/{{ tolower .Env.PROJECT_KEY }}/{{ tolower .ProjectName }}/{{ .Version }}/\" --api-key \"{{ .Env.ARTIFACTORY_API_KEY }}\"\n+ dir: \"{{ dir .ArtifactPath }}\"\n+```\n",
"new_path": "www/docs/cookbooks/using-jfrog-cli-to-publish-to-artifactory.md",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -146,6 +146,7 @@ nav:\n- cookbooks//build-go-modules.md\n- cookbooks/cgo-and-crosscompiling.md\n- cookbooks/debconf-templates.md\n+ - cookbooks/using-jfrog-cli-to-publish-to-artifactory.md\n- cookbooks/publish-to-nexus.md\n- cookbooks/release-a-library.md\n- cookbooks/semantic-release.md\n",
"new_path": "www/mkdocs.yml",
"old_path": "www/mkdocs.yml"
}
] |
Go
|
MIT License
|
goreleaser/goreleaser
|
docs: Add a new cookbook that covers using the jfrog-cli as an alternative to the artifactory publisher to publish to artifactory. (#2932)
| 1
|
docs
| null |
877,026
|
23.02.2022 15:24:54
| -3,600
|
2e589aeb8ce0d9d2e2487037c0cbd2ce51de9dc6
|
fix(@vtmn/css): change margin holders for quantity and select, optimizations on forms component
|
[
{
"change_type": "MODIFY",
"diff": "width: min-content;\n}\n+.vtmn-select_container > label {\n+ margin-block-end: rem(4px);\n+ display: inline-block;\n+ width: fit-content;\n+}\n+\n.vtmn-select_container select {\nappearance: none;\npadding: rem(12px) rem(40px) rem(12px) rem(12px);\nbox-shadow: inset 0 0 0 rem(1px) var(--vtmn-semantic-color_border-inactive);\nborder-radius: var(--vtmn-radius_100);\nheight: rem(48px);\n- margin-bottom: rem(5px);\nwidth: min-content;\nbackground-color: var(--vtmn-semantic-color_background-primary);\ncursor: pointer;\n.vtmn-select_container .vtmn-select_error-text {\nfont-size: var(--vtmn-typo_text-3-font-size);\n+ line-height: var(--vtmn-typo_text-3-line-height);\n+ margin-block-start: rem(4px);\n+ display: inline-block;\n}\n.vtmn-select_container .vtmn-select_error-text::before {\n",
"new_path": "packages/sources/css/src/components/forms/select/src/index.css",
"old_path": "packages/sources/css/src/components/forms/select/src/index.css"
},
{
"change_type": "MODIFY",
"diff": "border-radius: var(--vtmn-radius_100);\ndisplay: block;\nfont-weight: var(--vtmn-typo_font-weight--normal);\n- font-size: rem(16px);\n+ font-size: var(--vtmn-typo_text-2-font-size);\nline-height: 1;\npadding: rem(12px) rem(36px) rem(12px) rem(12px);\ncolor: var(--vtmn-semantic-color_content-primary);\n@@ -59,8 +59,8 @@ textarea.vtmn-text-input {\n.vtmn-text-input_label {\ncolor: var(--vtmn-semantic-color_content-primary);\n- font-size: rem(16px);\n- line-height: 1;\n+ font-size: var(--vtmn-typo_text-2-font-size);\n+ line-height: var(--vtmn-typo_text-2-line-height);\nmargin-block-end: rem(4px);\ndisplay: block;\nwidth: fit-content;\n@@ -90,8 +90,8 @@ textarea.vtmn-text-input {\n.vtmn-text-input_helper-text {\ncolor: var(--vtmn-semantic-color_content-secondary);\n- font-size: rem(14px);\n- line-height: 1;\n+ font-size: var(--vtmn-typo_text-3-font-size);\n+ line-height: var(--vtmn-typo_text-3-line-height);\nmargin-block-start: rem(4px);\nwidth: fit-content;\n}\n",
"new_path": "packages/sources/css/src/components/forms/text-input/src/index.css",
"old_path": "packages/sources/css/src/components/forms/text-input/src/index.css"
},
{
"change_type": "MODIFY",
"diff": "@import '@vtmn/css-design-tokens/src/radius';\n.vtmn-quantity {\n- font: var(--vtmn-typo_font-family) var(--vtmn-typo_text-2-font-size)\n- var(--vtmn-typo_font-weight--normal);\n+ font-family: var(--vtmn-typo_font-family);\n+ font-size: var(--vtmn-typo_text-2-font-size);\n+ font-weight: var(--vtmn-typo_font-weight--normal);\ncolor: var(--vtmn-semantic-color_content-primary);\nheight: fit-content;\nwidth: fit-content;\n}\n+.vtmn-quantity > label {\n+ font-size: var(--vtmn-typo_text-2-font-size);\n+ line-height: var(--vtmn-typo_text-2-line-height);\n+ margin-block-end: rem(4px);\n+ display: inline-block;\n+ width: fit-content;\n+}\n+\n.vtmn-quantity_content {\ndisplay: flex;\n- margin-block-start: var(--vtmn-spacing_1);\n- margin-block-end: var(--vtmn-spacing_1);\n}\n.vtmn-quantity input[type='number'] {\n.vtmn-quantity_error-text {\nfont-size: var(--vtmn-typo_text-3-font-size);\n+ line-height: var(--vtmn-typo_text-3-line-height);\n+ margin-block-start: rem(4px);\ndisplay: inline-flex;\nalign-items: center;\n}\n",
"new_path": "packages/sources/css/src/components/selection-controls/quantity/src/index.css",
"old_path": "packages/sources/css/src/components/selection-controls/quantity/src/index.css"
}
] |
JavaScript
|
Apache License 2.0
|
decathlon/vitamin-web
|
fix(@vtmn/css): change margin holders for quantity and select, optimizations on forms component (#988)
| 1
|
fix
|
@vtmn/css
|
877,026
|
23.02.2022 15:31:53
| -3,600
|
03877ed69df9d6b354ebe5ccf828751b106ce8ff
|
feat(@vtmn/css): add new font size (caption)
|
[
{
"change_type": "ADD",
"diff": "+<div class=\"block\">\n+ <p class=\"vtmn-typo_caption-1\">Caption 1</p>\n+</div>\n",
"new_path": "packages/showcases/css/stories/guidelines/typography/examples/caption.html",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -2,6 +2,7 @@ import overview from './examples/overview.html';\nimport displays from './examples/displays.html';\nimport headings from './examples/headings.html';\nimport bodyText from './examples/body-text.html';\n+import caption from './examples/caption.html';\nexport default {\ntitle: 'Guidelines / Typography',\n@@ -42,3 +43,12 @@ BodyText.parameters = {\n},\n},\n};\n+\n+export const Caption = () => caption;\n+Caption.parameters = {\n+ docs: {\n+ source: {\n+ code: caption,\n+ },\n+ },\n+};\n",
"new_path": "packages/showcases/css/stories/guidelines/typography/typography.stories.js",
"old_path": "packages/showcases/css/stories/guidelines/typography/typography.stories.js"
},
{
"change_type": "MODIFY",
"diff": "--vtmn-typo_text-1-font-size: rem(18px);\n--vtmn-typo_text-2-font-size: rem(16px);\n--vtmn-typo_text-3-font-size: rem(14px);\n+ --vtmn-typo_caption-1-font-size: rem(12px);\n}\n/**\n--vtmn-typo_text-1-line-height: 1.55;\n--vtmn-typo_text-2-line-height: 1.5;\n--vtmn-typo_text-3-line-height: 1.42;\n+ --vtmn-typo_caption-1-line-height: 1.34;\n}\n@media screen and (min-width: 600px) and (max-width: 899px) {\n",
"new_path": "packages/sources/css/src/design-tokens/src/typography.css",
"old_path": "packages/sources/css/src/design-tokens/src/typography.css"
},
{
"change_type": "MODIFY",
"diff": "font-size: var(--vtmn-typo_text-3-font-size);\nline-height: var(--vtmn-typo_text-3-line-height);\n}\n+\n+.vtmn-typo_caption-1 {\n+ font-family: var(--vtmn-typo_font-family);\n+ color: var(--vtmn-semantic-color_content-primary);\n+ font-size: var(--vtmn-typo_caption-1-font-size);\n+ line-height: var(--vtmn-typo_caption-1-line-height);\n+}\n",
"new_path": "packages/sources/css/src/utilities/src/typography.css",
"old_path": "packages/sources/css/src/utilities/src/typography.css"
}
] |
JavaScript
|
Apache License 2.0
|
decathlon/vitamin-web
|
feat(@vtmn/css): add new font size (caption) (#982)
| 1
|
feat
|
@vtmn/css
|
865,939
|
23.02.2022 16:04:51
| -3,600
|
4ff5315a03549ea99072fb4178ca0f06ee2d3bb9
|
fix(start-instance): remove unnecessary `onClose` prop for dropdown
Closes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -498,10 +498,6 @@ export default class StartInstanceTool extends PureComponent {\noverlayState\n} = this.state;\n- const toggleOverlay = () => {\n- this.props.deployService.closeOverlay(overlayState);\n- };\n-\nreturn <React.Fragment>\n{ isBpmnTab(activeTab) &&\n@@ -512,7 +508,6 @@ export default class StartInstanceTool extends PureComponent {\nitems={ this.START_ACTIONS }\nbuttonRef={ this.anchorRef }\noverlayState={ this.state.activeButton }\n- onClose={ toggleOverlay }\n>\n<PlayIcon className=\"icon\" />\n</OverlayDropdown>\n",
"new_path": "client/src/plugins/camunda-plugin/start-instance-tool/StartInstanceTool.js",
"old_path": "client/src/plugins/camunda-plugin/start-instance-tool/StartInstanceTool.js"
},
{
"change_type": "MODIFY",
"diff": "import React from 'react';\n-import { shallow } from 'enzyme';\n+import {\n+ shallow,\n+ mount\n+} from 'enzyme';\nimport { Config } from './../../../../app/__tests__/mocks';\n@@ -20,9 +23,16 @@ import { DeploymentService } from './mocks';\nimport StartInstanceTool from '../StartInstanceTool';\n-import { DeploymentError,\n+import {\n+ DeploymentError,\nConnectionError,\n- StartInstanceError } from '../../shared/CamundaAPI';\n+ StartInstanceError\n+} from '../../shared/CamundaAPI';\n+\n+import {\n+ Slot,\n+ SlotFillRoot\n+} from '../../../../app/slot-fill';\ndescribe('<StartInstanceTool>', () => {\n@@ -923,6 +933,89 @@ describe('<StartInstanceTool>', () => {\n});\n+ describe('overlay dropdown', () => {\n+\n+ it('should open', async () => {\n+\n+ // given\n+ const activeTab = createTab({ type: 'bpmn' });\n+\n+ const {\n+ wrapper\n+ } = createStartInstanceTool({\n+ activeTab,\n+ withFillSlot: true\n+ }, mount);\n+\n+ // when\n+ const statusBarBtn = wrapper.find(\"button[title='Start current diagram']\");\n+ statusBarBtn.simulate('click');\n+\n+ // then\n+ expect(wrapper.find(\"button[title='Start process instance']\").exists()).to.be.true;\n+\n+ });\n+\n+\n+ it('should close on button click', async () => {\n+\n+ // given\n+ const activeTab = createTab({ type: 'bpmn' });\n+ const {\n+ wrapper\n+ } = createStartInstanceTool({\n+ activeTab,\n+ withFillSlot: true\n+ }, mount);\n+\n+ // open overlay\n+ const statusBarBtn = wrapper.find(\"button[title='Start current diagram']\");\n+ statusBarBtn.simulate('click');\n+\n+ // assume\n+ expect(wrapper.find(\"button[title='Start process instance']\").exists()).to.be.true;\n+\n+ // then\n+ statusBarBtn.simulate('click');\n+ wrapper.update();\n+\n+ // assume\n+ expect(wrapper.find(\"button[title='Start process instance']\").exists()).to.be.false;\n+\n+ });\n+\n+\n+ it('should close on background click', async () => {\n+\n+ // given\n+ const activeTab = createTab({ type: 'bpmn' });\n+\n+ const {\n+ wrapper\n+ } = createStartInstanceTool({\n+ activeTab,\n+ withFillSlot: true\n+ }, mount);\n+\n+ // open overlay\n+ const statusBarBtn = wrapper.find(\"button[title='Start current diagram']\");\n+ statusBarBtn.simulate('click');\n+\n+ // assume\n+ expect(wrapper.find(\"button[title='Start process instance']\").exists()).to.be.true;\n+\n+ // when\n+ document.body.dispatchEvent(new MouseEvent('mousedown'));\n+ wrapper.update();\n+\n+ // then\n+ expect(wrapper.find(\"button[title='Start process instance']\").exists()).to.be.false;\n+\n+ });\n+\n+ });\n+\n+\ndescribe('Cockpit link', function() {\nfunction testCockpitLink(deploymentUrl, expectedCockpitLink) {\n@@ -1077,7 +1170,7 @@ function createStartInstanceTool({\n...props\n} = {}, render = shallow) {\nconst subscribe = (event, callback) => {\n- event === 'app.activeTabChanged' && callback(activeTab);\n+ event === 'app.activeTabChanged' && callback({ activeTab });\n};\nconst triggerAction = (event, context) => {\n@@ -1111,7 +1204,8 @@ function createStartInstanceTool({\n...props.deployService\n});\n- const wrapper = render(<TestStartInstanceTool\n+ const StartInstance = (\n+ <TestStartInstanceTool\nsubscribe={ subscribe }\ntriggerAction={ triggerAction }\ndisplayNotification={ noop }\n@@ -1119,7 +1213,19 @@ function createStartInstanceTool({\n{ ...props }\ndeployService={ deployService }\nconfig={ config }\n- />);\n+ />\n+ );\n+\n+ const StartInstanceWithFillSlot = (\n+ <SlotFillRoot>\n+ <Slot name=\"status-bar__file\" />\n+ {StartInstance}\n+ </SlotFillRoot>\n+ );\n+\n+ const wrapper = render(\n+ props.withFillSlot ? StartInstanceWithFillSlot : StartInstance\n+ );\nreturn {\nwrapper,\n",
"new_path": "client/src/plugins/camunda-plugin/start-instance-tool/__tests__/StartInstanceToolSpec.js",
"old_path": "client/src/plugins/camunda-plugin/start-instance-tool/__tests__/StartInstanceToolSpec.js"
}
] |
JavaScript
|
MIT License
|
camunda/camunda-modeler
|
fix(start-instance): remove unnecessary `onClose` prop for dropdown
Closes #2727
| 1
|
fix
|
start-instance
|
688,450
|
23.02.2022 16:13:16
| -10,800
|
e425ab4b01c76059f4ef98c2d50d27adefe2d25f
|
feat(PasswordInput): add new component
|
[
{
"change_type": "ADD",
"diff": "+---\n+'@toptal/picasso': minor\n+---\n+\n+---\n+### PasswordInput\n+\n+- add new input component with a toggle for showing/hiding the password\n+\n+### NumberInput\n+\n+- fix styling for control buttons\n+\n",
"new_path": ".changeset/forty-cooks-flash.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+---\n+'@toptal/picasso-forms': minor\n+---\n+\n+---\n+### PasswordInput\n+\n+- add new component for form wrapper\n",
"new_path": ".changeset/twenty-clocks-yell.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import React from 'react'\n+import { mount } from '@cypress/react'\n+import { PasswordInput } from '@toptal/picasso'\n+import { TestingPicasso } from '@toptal/picasso/test-utils'\n+\n+const PasswordInputExample = () => (\n+ <PasswordInput\n+ value='asd'\n+ testIds={{\n+ input: 'password-input',\n+ toggle: 'password-input-toggle'\n+ }}\n+ />\n+)\n+\n+describe('PasswordInput', () => {\n+ describe('shows password after toggle click', () => {\n+ it('renders', () => {\n+ mount(\n+ <TestingPicasso>\n+ <PasswordInputExample />\n+ </TestingPicasso>\n+ )\n+ cy.get('body').happoScreenshot()\n+\n+ cy.get('[data-testid=\"password-input-toggle\"]').click()\n+\n+ cy.get('body').happoScreenshot()\n+ })\n+ })\n+})\n",
"new_path": "cypress/component/PasswordInput.spec.tsx",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import React from 'react'\n+import {\n+ PasswordInput as PicassoPasswordInput,\n+ PasswordInputProps\n+} from '@toptal/picasso'\n+\n+import FieldWrapper, { FieldProps } from '../FieldWrapper'\n+\n+export type Props = PasswordInputProps & FieldProps<PasswordInputProps['value']>\n+\n+export const PasswordInput = (props: Props) => {\n+ return (\n+ <FieldWrapper<PasswordInputProps> {...props}>\n+ {(inputProps: PasswordInputProps) => {\n+ return <PicassoPasswordInput {...inputProps} />\n+ }}\n+ </FieldWrapper>\n+ )\n+}\n+\n+PasswordInput.displayName = 'PasswordInput'\n+\n+export default PasswordInput\n",
"new_path": "packages/picasso-forms/src/PasswordInput/PasswordInput.tsx",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+export { default } from './PasswordInput'\n",
"new_path": "packages/picasso-forms/src/PasswordInput/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import React, { forwardRef, useState, ChangeEvent, useCallback } from 'react'\n+import { makeStyles, Theme } from '@material-ui/core/styles'\n+import { BaseProps, OmitInternalProps } from '@toptal/picasso-shared'\n+import cx from 'classnames'\n+\n+import OutlinedInput, { Props as OutlinedInputProps } from '../OutlinedInput'\n+import InputAdornment from '../InputAdornment'\n+import styles from './styles'\n+import SvgEye16 from '../Icon/Eye16'\n+import SvgEyeHidden16 from '../Icon/EyeHidden16'\n+import Button from '../Button'\n+import { InputProps } from '../Input'\n+\n+export interface Props\n+ extends Omit<\n+ OmitInternalProps<OutlinedInputProps>,\n+ | 'defaultValue'\n+ | 'type'\n+ | 'rows'\n+ | 'rowsMax'\n+ | 'multiline'\n+ | 'enableReset'\n+ | 'onResetClick'\n+ >,\n+ BaseProps {\n+ /** Value of the `input` element. */\n+ value?: string\n+ /** Indicates whether component is in error state */\n+ error?: boolean\n+ /** Indicates whether component is in disabled state */\n+ disabled?: boolean\n+ /** Callback invoked when `PasswordInput` changes its state. */\n+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void\n+ testIds?: InputProps['testIds'] & {\n+ input?: string\n+ toggle?: string\n+ }\n+}\n+\n+const useStyles = makeStyles<Theme>(styles, {\n+ name: 'PicassoPasswordInput'\n+})\n+\n+export const PasswordInput = forwardRef<HTMLInputElement, Props>(\n+ function PasswordInput(props, ref) {\n+ const {\n+ value,\n+ onChange,\n+ disabled,\n+ error,\n+ width,\n+ style,\n+ className,\n+ ...rest\n+ } = props\n+\n+ const [showPassword, setShowPassword] = useState(false)\n+ const classes = useStyles()\n+\n+ const handleToggleVisibilityClick = useCallback(() => {\n+ setShowPassword(previousState => !previousState)\n+ }, [])\n+\n+ const endAdornment = (\n+ <InputAdornment position='end'>\n+ <Button.Circular\n+ className={classes.toggle}\n+ variant='flat'\n+ icon={showPassword ? <SvgEyeHidden16 /> : <SvgEye16 />}\n+ onClick={handleToggleVisibilityClick}\n+ data-testid={rest.testIds?.toggle}\n+ disabled={disabled}\n+ />\n+ </InputAdornment>\n+ )\n+\n+ return (\n+ <OutlinedInput\n+ style={style}\n+ className={cx(classes.root, className)}\n+ classes={{\n+ input: classes.input\n+ }}\n+ inputProps={{\n+ ...rest,\n+ 'data-testid': rest.testIds?.input\n+ }}\n+ width={width}\n+ error={error}\n+ inputRef={ref}\n+ type={showPassword ? 'text' : 'password'}\n+ value={value}\n+ disabled={disabled}\n+ onChange={onChange}\n+ endAdornment={endAdornment}\n+ />\n+ )\n+ }\n+)\n+\n+PasswordInput.defaultProps = {\n+ onChange: () => {},\n+ value: ''\n+}\n+\n+PasswordInput.displayName = 'PasswordInput'\n+\n+export default PasswordInput\n",
"new_path": "packages/picasso/src/PasswordInput/PasswordInput.tsx",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { OmitInternalProps } from '@toptal/picasso-shared'\n+\n+import { Props } from './PasswordInput'\n+\n+export { default } from './PasswordInput'\n+export type PasswordInputProps = OmitInternalProps<Props>\n+export * from './PasswordInput'\n",
"new_path": "packages/picasso/src/PasswordInput/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import React, { useState, ChangeEventHandler } from 'react'\n+import { PasswordInput, Container } from '@toptal/picasso'\n+\n+const DefaultExample = () => {\n+ const [value, setValue] = useState('asd')\n+\n+ const handleChange: ChangeEventHandler<HTMLInputElement> = event => {\n+ setValue(event.target.value)\n+ }\n+\n+ return (\n+ <Container>\n+ <PasswordInput value={value} onChange={handleChange} />\n+ </Container>\n+ )\n+}\n+\n+export default DefaultExample\n",
"new_path": "packages/picasso/src/PasswordInput/story/Default.example.tsx",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import React, { useState, ChangeEventHandler } from 'react'\n+import { PasswordInput, Container } from '@toptal/picasso'\n+\n+const DisabledExample = () => {\n+ const [value, setValue] = useState('asd')\n+\n+ const handleChange: ChangeEventHandler<HTMLInputElement> = event => {\n+ setValue(event.target.value)\n+ }\n+\n+ return (\n+ <Container>\n+ <PasswordInput disabled value={value} onChange={handleChange} />\n+ </Container>\n+ )\n+}\n+\n+export default DisabledExample\n",
"new_path": "packages/picasso/src/PasswordInput/story/Disabled.example.tsx",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import React, { useState, ChangeEventHandler } from 'react'\n+import { PasswordInput, Container } from '@toptal/picasso'\n+\n+const ErroredExample = () => {\n+ const [value, setValue] = useState('asd')\n+\n+ const handleChange: ChangeEventHandler<HTMLInputElement> = event => {\n+ setValue(event.target.value)\n+ }\n+\n+ return (\n+ <Container>\n+ <PasswordInput error value={value} onChange={handleChange} />\n+ </Container>\n+ )\n+}\n+\n+export default ErroredExample\n",
"new_path": "packages/picasso/src/PasswordInput/story/Errored.example.tsx",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { PasswordInput } from '../PasswordInput'\n+import PicassoBook from '~/.storybook/components/PicassoBook'\n+\n+const page = PicassoBook.section('Forms').createPage(\n+ 'PasswordInput',\n+ 'Input component for passwords'\n+)\n+\n+page\n+ .createTabChapter('Props')\n+ .addComponentDocs({ component: PasswordInput, name: 'PasswordInput' })\n+\n+page\n+ .createChapter()\n+ .addExample('PasswordInput/story/Default.example.tsx', 'Default') // picasso-skip-visuals\n+ .addExample('PasswordInput/story/Disabled.example.tsx', 'Disabled') // picasso-skip-visuals\n+ .addExample('PasswordInput/story/Errored.example.tsx', 'Errored') // picasso-skip-visuals\n",
"new_path": "packages/picasso/src/PasswordInput/story/index.jsx",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { createStyles, Theme } from '@material-ui/core/styles'\n+\n+export default ({ spacing }: Theme) =>\n+ createStyles({\n+ root: {\n+ paddingRight: 0,\n+ cursor: 'text'\n+ },\n+ input: {\n+ '&::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {\n+ '-webkit-appearance': 'none',\n+ appearance: 'none',\n+ margin: 0\n+ }\n+ },\n+\n+ toggle: {\n+ marginRight: spacing(1)\n+ }\n+ })\n",
"new_path": "packages/picasso/src/PasswordInput/styles.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import React from 'react'\n+import { render, fireEvent } from '@toptal/picasso/test-utils'\n+\n+import PasswordInput, { Props as PasswordInputProps } from './PasswordInput'\n+\n+const renderPasswordInput = (\n+ props: Partial<PasswordInputProps> & { initialValue?: string } = {}\n+) => {\n+ const { initialValue } = props\n+\n+ return render(<PasswordInput {...props} value={initialValue} />)\n+}\n+\n+describe('PasswordInput', () => {\n+ it('shows and hides password', async () => {\n+ const { getByDisplayValue, getByTestId } = renderPasswordInput({\n+ initialValue: 'asd',\n+ testIds: {\n+ input: 'password-input',\n+ toggle: 'password-input-toggle'\n+ }\n+ })\n+\n+ const input = getByDisplayValue('asd') as HTMLInputElement\n+ const toggle = getByTestId('password-input-toggle')\n+\n+ expect(input.type).toBe('password')\n+\n+ fireEvent.click(toggle)\n+\n+ expect(input.type).toBe('text')\n+ })\n+})\n",
"new_path": "packages/picasso/src/PasswordInput/test.tsx",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -181,6 +181,8 @@ export type { TimelineProps } from './Timeline'\nexport { default as RichText } from './RichText'\nexport type { RichTextProps, ASTType } from './RichText'\nexport type { RatingThumbsProps } from './RatingThumbs'\n+export { default as PasswordInput } from './PasswordInput'\n+export type { PasswordInputProps } from './PasswordInput'\n// hygen code generator inserts export statements above this comment.\nexport * from './Icon'\n",
"new_path": "packages/picasso/src/index.ts",
"old_path": "packages/picasso/src/index.ts"
}
] |
TypeScript
|
MIT License
|
toptal/picasso
|
feat(PasswordInput): add new component (#2462)
| 1
|
feat
|
PasswordInput
|
306,900
|
23.02.2022 17:03:44
| -3,600
|
eb2315075eccb1fe56240d564f4f6ec8d9bd71f1
|
fix(elements|ino-markdown-editor): handle change of `initialValue`
|
[
{
"change_type": "MODIFY",
"diff": "@@ -132,4 +132,15 @@ describe('InoMarkdownEditor', () => {\nexpect(spy).toHaveReceivedEvent();\nexpect(spy).toHaveReceivedEventDetail(dummyText);\n});\n+\n+ it('should change initial value', async () => {\n+ const initialText = '# Hello World';\n+ await setUpTest(initialText, ViewMode.MARKDOWN);\n+ expect(await textArea.getProperty('value')).toBe(initialText);\n+\n+ const newInitialText = '# Hallo Welt';\n+ inoMarkdownEditor.setProperty('initialValue', newInitialText);\n+ await page.waitForChanges();\n+ expect(await textArea.getProperty('value')).toBe(newInitialText);\n+ });\n});\n",
"new_path": "packages/elements/src/components/ino-markdown-editor/ino-markdown-editor.e2e.ts",
"old_path": "packages/elements/src/components/ino-markdown-editor/ino-markdown-editor.e2e.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -46,6 +46,11 @@ export class MarkdownEditor implements ComponentInterface {\n*/\n@Prop() initialValue: string;\n+ @Watch('initialValue')\n+ handleInitialValueChange(newInitialValue: string): void {\n+ this.initializeEditor(newInitialValue);\n+ }\n+\n/**\n* Sets the view mode of the editor.\n* Can be changed between `preview` (default), `markdown` and `readonly`.\n@@ -86,9 +91,7 @@ export class MarkdownEditor implements ComponentInterface {\ncomponentDidLoad(): void {\nthis.createEditor();\nif (this.initialValue) {\n- this.editor.commands.setContent(this.markdownToHtml(), true);\n- this.textareaRef.value = this.htmlToMarkdown();\n- this.textareaRef.rows = this.textareaRef.value.split('\\n').length;\n+ this.initializeEditor(this.initialValue);\n}\nthis.textareaRef.addEventListener('valueChange', this.onTextareaChange);\nthis.textareaRef.addEventListener('inoBlur', this.handleMarkdownBlur);\n@@ -100,6 +103,12 @@ export class MarkdownEditor implements ComponentInterface {\nthis.textareaRef.removeEventListener('inoBlur', this.handleMarkdownBlur);\n}\n+ private initializeEditor(initialValue: string): void {\n+ this.editor.commands.setContent(this.markdownToHtml(initialValue), true);\n+ this.textareaRef.value = this.htmlToMarkdown();\n+ this.textareaRef.rows = this.textareaRef.value.split('\\n').length;\n+ }\n+\nprivate createEditor(): void {\nthis.editor = new Editor({\nelement: this.editorRef,\n",
"new_path": "packages/elements/src/components/ino-markdown-editor/ino-markdown-editor.tsx",
"old_path": "packages/elements/src/components/ino-markdown-editor/ino-markdown-editor.tsx"
}
] |
TypeScript
|
MIT License
|
inovex/elements
|
fix(elements|ino-markdown-editor): handle change of `initialValue` (#529)
| 1
|
fix
|
elements|ino-markdown-editor
|
419,590
|
23.02.2022 17:05:32
| -32,400
|
725ff912509c5535a7a50dbecf9a9855098ae7a8
|
docs: fix asynclocalstorage docs url
|
[
{
"change_type": "MODIFY",
"diff": "@@ -49,7 +49,7 @@ can be hard to achieve this, because you usually want to access your repositorie\nbut it will always provide you with the same instance, rather than new one for each request.\nTo solve this, you can use `RequestContext` helper, that will use `node`'s\n-[`AsyncLocalStorage`](https://nodejs.org/api/async_hooks.html#async_hooks_class_asynclocalstorage)\n+[`AsyncLocalStorage`](https://nodejs.org/api/async_context.html#class-asynclocalstorage)\nin the background to isolate the request context. MikroORM will always use request specific (forked)\nentity manager if available, so all you need to do is to create new request context preferably\nas a middleware:\n",
"new_path": "docs/docs/identity-map.md",
"old_path": "docs/docs/identity-map.md"
}
] |
TypeScript
|
MIT License
|
mikro-orm/mikro-orm
|
docs: fix asynclocalstorage docs url (#2814)
| 1
|
docs
| null |
777,353
|
23.02.2022 17:20:28
| 21,600
|
754964184840a8fab698d762f0567598bd248893
|
fix: stop experiment modal closing unexpectedly
|
[
{
"change_type": "MODIFY",
"diff": "@@ -45,6 +45,7 @@ const useModal = (\noptions?: ModalOptions,\n): ModalHooks => {\nconst modalRef = useRef<ReturnType<ModalFunc>>();\n+ const componentUnmounting = useRef(false);\nconst [ modalProps, setModalProps ] = useState<ModalFuncProps>();\nconst prevModalProps = usePrevious(modalProps, undefined);\n@@ -106,10 +107,21 @@ const useModal = (\n}\n}, [ extendEventHandler, modalProps, options, prevModalProps ]);\n+ /**\n+ * Sets componentUnmounting to true only when the parent component is unmounting so that the next\n+ * useEffect only runs modalClose on unmount, rather than every time modalClose updates.\n+ * The order of these two useEffects matters, this one has to be first.\n+ */\n+ useEffect(() => {\n+ return () => {\n+ componentUnmounting.current = true;\n+ };\n+ }, []);\n+\n// When the component using the hook unmounts, remove the modal automatically.\nuseEffect(() => {\nreturn () => {\n- modalClose();\n+ if (componentUnmounting.current) modalClose();\n};\n}, [ modalClose ]);\n",
"new_path": "webui/react/src/hooks/useModal/useModal.tsx",
"old_path": "webui/react/src/hooks/useModal/useModal.tsx"
}
] |
Python
|
Apache License 2.0
|
determined-ai/determined
|
fix: stop experiment modal closing unexpectedly [DET-6746] (#3653)
| 1
|
fix
| null |
306,900
|
23.02.2022 17:32:40
| -3,600
|
e970e9222e09055f9d842ede592a04d84c3ace01
|
feat(elements|ino-datepicker): add new property `attachToBody`
|
[
{
"change_type": "MODIFY",
"diff": "@@ -283,14 +283,14 @@ The value can be found in `event.detail`\n@ProxyCmp({\ndefineCustomElementFn: undefined,\n- inputs: ['autoFocus', 'dateFormat', 'defaultDate', 'defaultHour', 'defaultMinute', 'disabled', 'error', 'helper', 'helperPersistent', 'helperValidation', 'hourStep', 'label', 'max', 'min', 'minuteStep', 'name', 'outline', 'range', 'required', 'showLabelHint', 'twelveHourTime', 'type', 'value'],\n+ inputs: ['attachToBody', 'autoFocus', 'dateFormat', 'defaultDate', 'defaultHour', 'defaultMinute', 'disabled', 'error', 'helper', 'helperPersistent', 'helperValidation', 'hourStep', 'label', 'max', 'min', 'minuteStep', 'name', 'outline', 'range', 'required', 'showLabelHint', 'twelveHourTime', 'type', 'value'],\nmethods: ['setFocus', 'setBlur']\n})\n@Component({\nselector: 'ino-datepicker',\nchangeDetection: ChangeDetectionStrategy.OnPush,\ntemplate: '<ng-content></ng-content>',\n- inputs: ['autoFocus', 'dateFormat', 'defaultDate', 'defaultHour', 'defaultMinute', 'disabled', 'error', 'helper', 'helperPersistent', 'helperValidation', 'hourStep', 'label', 'max', 'min', 'minuteStep', 'name', 'outline', 'range', 'required', 'showLabelHint', 'twelveHourTime', 'type', 'value']\n+ inputs: ['attachToBody', 'autoFocus', 'dateFormat', 'defaultDate', 'defaultHour', 'defaultMinute', 'disabled', 'error', 'helper', 'helperPersistent', 'helperValidation', 'hourStep', 'label', 'max', 'min', 'minuteStep', 'name', 'outline', 'range', 'required', 'showLabelHint', 'twelveHourTime', 'type', 'value']\n})\nexport class InoDatepicker {\nprotected el: HTMLElement;\n",
"new_path": "packages/elements-angular/elements/src/directives/proxies.ts",
"old_path": "packages/elements-angular/elements/src/directives/proxies.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -239,6 +239,10 @@ export namespace Components {\n\"value\": number | string;\n}\ninterface InoDatepicker {\n+ /**\n+ * Attach calendar overlay to body (true) or Position the calendar inside the wrapper and inside the ino-datepicker (false)\n+ */\n+ \"attachToBody\": boolean;\n/**\n* Autofocuses this element.\n*/\n@@ -1866,6 +1870,10 @@ declare namespace LocalJSX {\n\"value\"?: number | string;\n}\ninterface InoDatepicker {\n+ /**\n+ * Attach calendar overlay to body (true) or Position the calendar inside the wrapper and inside the ino-datepicker (false)\n+ */\n+ \"attachToBody\"?: boolean;\n/**\n* Autofocuses this element.\n*/\n",
"new_path": "packages/elements/src/components.d.ts",
"old_path": "packages/elements/src/components.d.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -18,7 +18,7 @@ describe('InoDatepicker', () => {\nconst inputEl = await page.find(INPUT);\nexpect(inputEl).toBeDefined();\n- const flatpickrInputEl = await page.find('ino-input > .flatpickr-input');\n+ const flatpickrInputEl = await page.find('ino-input > label.mdc-text-field');\nexpect(flatpickrInputEl).toBeDefined();\nconst flatpickrCalEl = await page.find('.flatpickr-calendar');\n@@ -34,7 +34,7 @@ describe('InoDatepicker', () => {\nconst inoDatepickerEl = await page.find(DATEPICKER);\nexpect(inoDatepickerEl).toBeDefined();\n- const flatpickrInputEl = await page.find('.flatpickr-input');\n+ const flatpickrInputEl = await page.find('ino-input > label.mdc-text-field');\nexpect(flatpickrInputEl).not.toHaveClass('mdc-text-field--focused');\ninoDatepickerEl.setAttribute('autofocus', 'true');\n@@ -161,16 +161,16 @@ describe('InoDatepicker', () => {\nconst page = await setupPageWithContent(INO_DATEPICKER_WITH_SIBLING);\nconst inoDatepickerEl = await page.find(DATEPICKER);\nconst buttonEl = await page.find('button');\n- const flatpickrInputEl = await page.find('.flatpickr-input');\n+ const flatpickrInputEl = await page.find('ino-input > label.mdc-text-field');\ninoDatepickerEl.setAttribute('required', true);\nawait page.waitForChanges();\nexpect(flatpickrInputEl).not.toHaveClass('mdc-text-field--invalid');\n- inoDatepickerEl.click();\n+ await inoDatepickerEl.click();\nawait page.waitForChanges();\n- buttonEl.click();\n+ await buttonEl.click();\nawait page.waitForChanges();\nexpect(flatpickrInputEl).toHaveClass('mdc-text-field--invalid');\n@@ -227,7 +227,7 @@ describe('InoDatepicker', () => {\nit('should be invalid if wrong date format provided', async () => {\nconst page = await setupPageWithContent(INO_DATEPICKER_WITH_FORMAT);\nconst inoDatepickerEl = await page.find(DATEPICKER);\n- const flatpickrInputEl = await page.find('.flatpickr-input');\n+ const flatpickrInputEl = await page.find('ino-input > label.mdc-text-field');\ninoDatepickerEl.setAttribute('value', '01-1970-01');\nawait page.waitForChanges();\n@@ -243,7 +243,7 @@ describe('InoDatepicker', () => {\nit('should be valid if not required and empty value', async () => {\nconst page = await setupPageWithContent(INO_DATEPICKER);\nconst inoDatepickerEl = await page.find(DATEPICKER);\n- const flatpickrInputEl = await page.find('.flatpickr-input');\n+ const flatpickrInputEl = await page.find('ino-input > label.mdc-text-field');\ninoDatepickerEl.setAttribute('required', false);\ninoDatepickerEl.setAttribute('value', '');\n@@ -255,7 +255,7 @@ describe('InoDatepicker', () => {\nit('should be invalid if value is set before min date', async () => {\nconst page = await setupPageWithContent(INO_DATEPICKER);\nconst inoDatepickerEl = await page.find(DATEPICKER);\n- const flatpickrInputEl = await page.find('.flatpickr-input');\n+ const flatpickrInputEl = await page.find('ino-input > label.mdc-text-field');\ninoDatepickerEl.setAttribute('date-format', 'd-m-Y');\ninoDatepickerEl.setAttribute('min', '10-10-2020');\n@@ -268,7 +268,7 @@ describe('InoDatepicker', () => {\nit('should be valid if value is set to min date', async () => {\nconst page = await setupPageWithContent(INO_DATEPICKER);\nconst inoDatepickerEl = await page.find(DATEPICKER);\n- const flatpickrInputEl = await page.find('.flatpickr-input');\n+ const flatpickrInputEl = await page.find('ino-input > label.mdc-text-field');\ninoDatepickerEl.setAttribute('date-format', 'd-m-Y');\ninoDatepickerEl.setAttribute('min', '10-10-2020');\n@@ -281,7 +281,7 @@ describe('InoDatepicker', () => {\nit('should be validated after min date is set', async () => {\nconst page = await setupPageWithContent(INO_DATEPICKER);\nconst inoDatepickerEl = await page.find(DATEPICKER);\n- const flatpickrInputEl = await page.find('.flatpickr-input');\n+ const flatpickrInputEl = await page.find('ino-input > label.mdc-text-field');\ninoDatepickerEl.setAttribute('date-format', 'd-m-Y');\ninoDatepickerEl.setAttribute('value', '09-10-2020');\n@@ -294,7 +294,7 @@ describe('InoDatepicker', () => {\nit('should be invalid if value is set after max date', async () => {\nconst page = await setupPageWithContent(INO_DATEPICKER);\nconst inoDatepickerEl = await page.find(DATEPICKER);\n- const flatpickrInputEl = await page.find('.flatpickr-input');\n+ const flatpickrInputEl = await page.find('ino-input > label.mdc-text-field');\ninoDatepickerEl.setAttribute('date-format', 'd-m-Y');\ninoDatepickerEl.setAttribute('max', '10-10-2020');\n@@ -307,7 +307,7 @@ describe('InoDatepicker', () => {\nit('should be valid if value is set to max date', async () => {\nconst page = await setupPageWithContent(INO_DATEPICKER);\nconst inoDatepickerEl = await page.find(DATEPICKER);\n- const flatpickrInputEl = await page.find('.flatpickr-input');\n+ const flatpickrInputEl = await page.find('ino-input > label.mdc-text-field');\ninoDatepickerEl.setAttribute('date-format', 'd-m-Y');\ninoDatepickerEl.setAttribute('max', '10-10-2020');\n@@ -320,7 +320,7 @@ describe('InoDatepicker', () => {\nit('should be validated after max date is set', async () => {\nconst page = await setupPageWithContent(INO_DATEPICKER);\nconst inoDatepickerEl = await page.find(DATEPICKER);\n- const flatpickrInputEl = await page.find('.flatpickr-input');\n+ const flatpickrInputEl = await page.find('ino-input > label.mdc-text-field');\ninoDatepickerEl.setAttribute('date-format', 'd-m-Y');\ninoDatepickerEl.setAttribute('value', '11-10-2020');\n@@ -333,7 +333,7 @@ describe('InoDatepicker', () => {\nit('should be valid with min and max date set', async () => {\nconst page = await setupPageWithContent(INO_DATEPICKER);\nconst inoDatepickerEl = await page.find(DATEPICKER);\n- const flatpickrInputEl = await page.find('.flatpickr-input');\n+ const flatpickrInputEl = await page.find('ino-input > label.mdc-text-field');\ninoDatepickerEl.setAttribute('date-format', 'd-m-Y');\ninoDatepickerEl.setAttribute('min', '09-10-2020');\n@@ -347,7 +347,7 @@ describe('InoDatepicker', () => {\nit('should be invalid if wrong date format is used inside range', async () => {\nconst page = await setupPageWithContent(INO_DATEPICKER);\nconst inoDatepickerEl = await page.find(DATEPICKER);\n- const flatpickrInputEl = await page.find('.flatpickr-input');\n+ const flatpickrInputEl = await page.find('ino-input > label.mdc-text-field');\ninoDatepickerEl.setAttribute('date-format', 'd.m.Y');\ninoDatepickerEl.setAttribute('range', 'true');\n@@ -360,7 +360,7 @@ describe('InoDatepicker', () => {\nit('should be invalid if incorrectly formatted value is provided in month-picker', async () => {\nconst page = await setupPageWithContent(INO_DATEPICKER);\nconst inoDatepickerEl = await page.find(DATEPICKER);\n- const flatpickrInputEl = await page.find('.flatpickr-input');\n+ const flatpickrInputEl = await page.find('ino-input > label.mdc-text-field');\ninoDatepickerEl.setAttribute('type', 'month');\ninoDatepickerEl.setAttribute('date-format', 'm.Y');\n@@ -373,7 +373,7 @@ describe('InoDatepicker', () => {\nit('should be valid if correctly formatted value is provided in month-picker', async () => {\nconst page = await setupPageWithContent(INO_DATEPICKER);\nconst inoDatepickerEl = await page.find(DATEPICKER);\n- const flatpickrInputEl = await page.find('.flatpickr-input');\n+ const flatpickrInputEl = await page.find('ino-input > label.mdc-text-field');\ninoDatepickerEl.setAttribute('type', 'month');\ninoDatepickerEl.setAttribute('date-format', 'm.Y');\n",
"new_path": "packages/elements/src/components/ino-datepicker/ino-datepicker.e2e.ts",
"old_path": "packages/elements/src/components/ino-datepicker/ino-datepicker.e2e.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -142,6 +142,18 @@ export class Datepicker implements ComponentInterface {\nthis.validate();\n}\n+ /**\n+ * Attach calendar overlay to body (true) or\n+ * Position the calendar inside the wrapper and inside the ino-datepicker (false)\n+ */\n+ @Prop() attachToBody = true;\n+\n+ @Watch('attachToBody')\n+ attachToBodyChanged(attachToBody: boolean) {\n+ this.flatpickr?.set('static', !attachToBody);\n+ }\n+\n+\n/**\n* A string to change the date format.\n* Possible values are listed [here](https://flatpickr.js.org/formatting/).\n@@ -316,7 +328,7 @@ export class Datepicker implements ComponentInterface {\nprivate create() {\nthis.dispose();\n- const target = this.el.querySelector('ino-input > label') as HTMLElement;\n+ const target = this.el.querySelector('ino-input') as HTMLElement;\nif (this.disabled || !target) {\nreturn;\n@@ -342,6 +354,7 @@ export class Datepicker implements ComponentInterface {\nminDate: this.min,\nmaxDate: this.max,\nmode: this.range ? 'range' : 'single',\n+ static: !this.attachToBody,\nonValueChange: (value: string) => this.valueChange.emit(value),\n});\n",
"new_path": "packages/elements/src/components/ino-datepicker/ino-datepicker.tsx",
"old_path": "packages/elements/src/components/ino-datepicker/ino-datepicker.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -2,7 +2,7 @@ import { BaseOptions } from 'flatpickr/dist/types/options';\nexport type Datepicker = Pick<\nBaseOptions,\n- 'dateFormat' | 'minDate' | 'maxDate' | 'mode' | 'defaultDate'\n+ 'dateFormat' | 'minDate' | 'maxDate' | 'mode' | 'defaultDate' | 'static'\n>;\nexport const createDatePickerOptions = ({\n@@ -11,10 +11,12 @@ export const createDatePickerOptions = ({\nminDate,\nmaxDate,\nmode,\n+ static: staticVal,\n}: Partial<BaseOptions>): Datepicker => ({\ndefaultDate,\ndateFormat,\nminDate,\nmaxDate,\nmode,\n+ 'static': staticVal,\n});\n",
"new_path": "packages/elements/src/components/ino-datepicker/picker/DatePicker.ts",
"old_path": "packages/elements/src/components/ino-datepicker/picker/DatePicker.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -6,7 +6,7 @@ import { PartialFlatpickrOptions } from '../picker-factory';\nexport type MonthPicker = Pick<\nBaseOptions,\n- 'defaultDate' | 'minDate' | 'maxDate' | 'plugins' | 'onReady' | 'onDestroy'\n+ 'defaultDate' | 'minDate' | 'maxDate' | 'plugins' | 'onReady' | 'onDestroy' | 'static'\n>;\ntype OnValueChangeFn = PartialFlatpickrOptions['onValueChange'];\n@@ -75,6 +75,7 @@ export const createMonthPickerOptions = ({\ndefaultDate,\ndateFormat,\nonValueChange,\n+ static: staticVal,\n}: PartialFlatpickrOptions): MonthPicker => {\nif (!onValueChange) {\nthrow new Error(\n@@ -91,6 +92,7 @@ export const createMonthPickerOptions = ({\nmaxDate,\nminDate,\ndefaultDate,\n+ static: staticVal,\nonReady: (_, __, instance) => {\ninstance.prevMonthNav.addEventListener('click', () =>\nmonthChangePrevHandler(instance, onValueChange)\n",
"new_path": "packages/elements/src/components/ino-datepicker/picker/MonthPicker.ts",
"old_path": "packages/elements/src/components/ino-datepicker/picker/MonthPicker.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -9,6 +9,7 @@ export type TimePicker = Pick<\n| 'minuteIncrement'\n| 'hourIncrement'\n| 'noCalendar'\n+ | 'static'\n>;\nexport const createTimePickerOptions = ({\n@@ -19,6 +20,7 @@ export const createTimePickerOptions = ({\nminuteIncrement,\nhourIncrement,\nnoCalendar,\n+ static: staticVal\n}: Partial<BaseOptions>): TimePicker => ({\ndefaultHour,\ndefaultMinute,\n@@ -27,4 +29,5 @@ export const createTimePickerOptions = ({\nminuteIncrement,\nhourIncrement,\nnoCalendar,\n+ 'static': staticVal\n});\n",
"new_path": "packages/elements/src/components/ino-datepicker/picker/TimePicker.ts",
"old_path": "packages/elements/src/components/ino-datepicker/picker/TimePicker.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -146,6 +146,7 @@ The type of the picker is selected based on the type` property. See the example\n| Property | Attribute | Description | Type | Default |\n| ------------------ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- | ----------- |\n+| `attachToBody` | `attach-to-body` | Attach calendar overlay to body (true) or Position the calendar inside the wrapper and inside the ino-datepicker (false) | `boolean` | `true` |\n| `autoFocus` | `autofocus` | Autofocuses this element. | `boolean` | `undefined` |\n| `dateFormat` | `date-format` | A string to change the date format. Possible values are listed [here](https://flatpickr.js.org/formatting/). The default value is `d-m-Y` which accepts values like `01-01-2019`. | `string` | `'d-m-Y'` |\n| `defaultDate` | `default-date` | A string/array containing the initial date of the datepicker overlay. If you're using `inoRange = true` provide an array. If a `value` is given, this will be ignored. | `string \\| string[]` | `undefined` |\n",
"new_path": "packages/elements/src/components/ino-datepicker/readme.md",
"old_path": "packages/elements/src/components/ino-datepicker/readme.md"
},
{
"change_type": "MODIFY",
"diff": "{\n- \"timestamp\": \"2022-02-21T11:16:37\",\n+ \"timestamp\": \"2022-02-21T14:53:58\",\n\"compiler\": {\n\"name\": \"@stencil/core\",\n\"version\": \"2.14.0\",\n\"docsTags\": [],\n\"usage\": {},\n\"props\": [\n+ {\n+ \"name\": \"attachToBody\",\n+ \"type\": \"boolean\",\n+ \"mutable\": false,\n+ \"attr\": \"attach-to-body\",\n+ \"reflectToAttr\": false,\n+ \"docs\": \"Attach calendar overlay to body (true) or\\nPosition the calendar inside the wrapper and inside the ino-datepicker (false)\",\n+ \"docsTags\": [],\n+ \"default\": \"true\",\n+ \"values\": [\n+ {\n+ \"type\": \"boolean\"\n+ }\n+ ],\n+ \"optional\": false,\n+ \"required\": false\n+ },\n{\n\"name\": \"autoFocus\",\n\"type\": \"boolean\",\n",
"new_path": "packages/storybook/elements-stencil-docs.json",
"old_path": "packages/storybook/elements-stencil-docs.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -35,6 +35,7 @@ export default {\nexport const Playground: Story<Components.InoDatepicker> = (args) => html`\n<ino-datepicker\nclass=\"customizable-picker\"\n+ attach-to-body=\"${args.attachToBody}\",\ndisabled=\"${args.disabled}\"\ndate-format=\"${args.dateFormat}\"\nhelper=\"${args.helper}\"\n@@ -55,6 +56,7 @@ export const Playground: Story<Components.InoDatepicker> = (args) => html`\n</ino-datepicker>\n`;\nPlayground.args = {\n+ attachToBody: true,\ndisabled: false,\ndateFormat: 'Y-m-d',\nhelper: 'Helper text to describe the input',\n",
"new_path": "packages/storybook/src/stories/ino-datepicker/ino-datepicker.stories.ts",
"old_path": "packages/storybook/src/stories/ino-datepicker/ino-datepicker.stories.ts"
}
] |
TypeScript
|
MIT License
|
inovex/elements
|
feat(elements|ino-datepicker): add new property `attachToBody` (#510)
| 1
|
feat
|
elements|ino-datepicker
|
667,713
|
23.02.2022 17:56:47
| -28,800
|
9b30441ac983cd169bb7f3ba4f360635b6a9e675
|
feat(android): update AGP version to 7.1.1
|
[
{
"change_type": "MODIFY",
"diff": "@@ -36,7 +36,7 @@ buildscript {\nmavenCentral()\n}\ndependencies {\n- classpath 'com.android.tools.build:gradle:7.0.4'\n+ classpath 'com.android.tools.build:gradle:7.1.1'\n// NOTE: Do not place your application dependencies here; they belong\n// in the individual module build.gradle files\n}\n",
"new_path": "android/sdk/build.gradle",
"old_path": "android/sdk/build.gradle"
},
{
"change_type": "MODIFY",
"diff": "android.enableJetifier=true\nandroid.useAndroidX=true\n+android.disableAutomaticComponentCreation=true\norg.gradle.jvmargs = -Xms1024m -Xmx4096m\n#\n",
"new_path": "android/sdk/gradle.properties",
"old_path": "android/sdk/gradle.properties"
},
{
"change_type": "MODIFY",
"diff": "@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n-distributionUrl=https\\://services.gradle.org/distributions/gradle-7.0.2-all.zip\n+distributionUrl=https\\://services.gradle.org/distributions/gradle-7.2-all.zip\n",
"new_path": "android/sdk/gradle/wrapper/gradle-wrapper.properties",
"old_path": "android/sdk/gradle/wrapper/gradle-wrapper.properties"
},
{
"change_type": "MODIFY",
"diff": "@@ -6,7 +6,7 @@ buildscript {\nmavenCentral()\n}\ndependencies {\n- classpath 'com.android.tools.build:gradle:7.0.4'\n+ classpath 'com.android.tools.build:gradle:7.1.1'\n// NOTE: Do not place your application dependencies here; they belong\n// in the individual module build.gradle files\n}\n",
"new_path": "examples/android-demo/build.gradle",
"old_path": "examples/android-demo/build.gradle"
},
{
"change_type": "MODIFY",
"diff": "@@ -70,7 +70,7 @@ buildscript {\nmavenCentral()\n}\ndependencies {\n- classpath 'com.android.tools.build:gradle:7.0.4'\n+ classpath 'com.android.tools.build:gradle:7.1.1'\n// NOTE: Do not place your application dependencies here; they belong\n// in the individual module build.gradle files\n}\n",
"new_path": "examples/android-demo/example/build.gradle",
"old_path": "examples/android-demo/example/build.gradle"
},
{
"change_type": "MODIFY",
"diff": "android.enableJetifier=true\nandroid.useAndroidX=true\n+android.disableAutomaticComponentCreation=true\norg.gradle.jvmargs = -Xms1024m -Xmx4096m\n",
"new_path": "examples/android-demo/gradle.properties",
"old_path": "examples/android-demo/gradle.properties"
},
{
"change_type": "MODIFY",
"diff": "@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n-distributionUrl=https\\://services.gradle.org/distributions/gradle-7.0.2-all.zip\n+distributionUrl=https\\://services.gradle.org/distributions/gradle-7.2-all.zip\n",
"new_path": "examples/android-demo/gradle/wrapper/gradle-wrapper.properties",
"old_path": "examples/android-demo/gradle/wrapper/gradle-wrapper.properties"
}
] |
C++
|
Apache License 2.0
|
tencent/hippy
|
feat(android): update AGP version to 7.1.1
| 1
|
feat
|
android
|
841,385
|
23.02.2022 18:21:51
| -10,800
|
7079e88744ece43ebf82b05a376c5683c8015084
|
feat(css/minifier): Compress lengths
|
[
{
"change_type": "ADD",
"diff": "+use swc_css_ast::*;\n+use swc_css_visit::{VisitMut, VisitMutWith};\n+\n+pub fn compress_length() -> impl VisitMut {\n+ CompressLength {\n+ in_math_function: false,\n+ }\n+}\n+\n+struct CompressLength {\n+ in_math_function: bool,\n+}\n+\n+impl VisitMut for CompressLength {\n+ fn visit_mut_calc_sum(&mut self, function: &mut CalcSum) {\n+ let old_in_math_function = self.in_math_function;\n+\n+ self.in_math_function = true;\n+\n+ function.visit_mut_children_with(self);\n+\n+ self.in_math_function = old_in_math_function;\n+ }\n+\n+ fn visit_mut_value(&mut self, value: &mut Value) {\n+ value.visit_mut_children_with(self);\n+\n+ if self.in_math_function {\n+ return;\n+ }\n+\n+ match &value {\n+ Value::Dimension(Dimension::Length(Length {\n+ value:\n+ Number {\n+ value: number_value,\n+ ..\n+ },\n+ span,\n+ ..\n+ })) if *number_value == 0.0 => {\n+ *value = Value::Number(Number {\n+ span: *span,\n+ value: 0.0,\n+ raw: \"0\".into(),\n+ });\n+ }\n+ _ => {}\n+ }\n+ }\n+}\n",
"new_path": "crates/swc_css_minifier/src/compress/length.rs",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -4,6 +4,7 @@ pub mod easing_function;\npub mod empty;\npub mod frequency;\npub mod keyframes;\n+pub mod length;\npub mod selector;\npub mod time;\npub mod transform_function;\n",
"new_path": "crates/swc_css_minifier/src/compress/mod.rs",
"old_path": "crates/swc_css_minifier/src/compress/mod.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -6,15 +6,16 @@ use swc_css_visit::VisitMutWith;\nuse self::compress::{\nangle::compress_angle, declaration::compress_declaration,\neasing_function::compress_easing_function, empty::compress_empty,\n- frequency::compress_frequency, keyframes::compress_keyframes, selector::compress_selector,\n- time::compress_time, transform_function::compress_transform_function, urange::compress_urange,\n- url::compress_url,\n+ frequency::compress_frequency, keyframes::compress_keyframes, length::compress_length,\n+ selector::compress_selector, time::compress_time,\n+ transform_function::compress_transform_function, urange::compress_urange, url::compress_url,\n};\nmod compress;\npub fn minify(stylesheet: &mut Stylesheet) {\nstylesheet.visit_mut_with(&mut compress_empty());\n+ stylesheet.visit_mut_with(&mut compress_length());\nstylesheet.visit_mut_with(&mut compress_angle());\nstylesheet.visit_mut_with(&mut compress_time());\nstylesheet.visit_mut_with(&mut compress_frequency());\n",
"new_path": "crates/swc_css_minifier/src/lib.rs",
"old_path": "crates/swc_css_minifier/src/lib.rs"
},
{
"change_type": "MODIFY",
"diff": "-@keyframes slide-right{0%{margin-left:0px}50%{margin-left:110px;opacity:1}50%{opacity:.9}to{margin-left:200px}}@keyframes slide-right-upper-case{0%{margin-left:0px}50%{margin-left:110px;opacity:1}50%{opacity:.9}TO{margin-left:200px}}@keyframes slide-right-one{0%{margin-left:0px}50%{margin-left:110px;opacity:1}50%{opacity:.9}to{margin-left:200px}}@keyframes slide-right-two{0%{margin-left:0px}50%{margin-left:110px;opacity:1}50%{opacity:.9}to{margin-left:200px}}@keyframes slide-right-three{0%,50%{margin-left:0px}60%,to{margin-left:200px}}@keyframes foo{0%{margin-left:0px}to{margin-left:200px}}@keyframes\"initial\"{0%{margin-left:0px}to{margin-left:200px}}\n+@keyframes slide-right{0%{margin-left:0}50%{margin-left:110px;opacity:1}50%{opacity:.9}to{margin-left:200px}}@keyframes slide-right-upper-case{0%{margin-left:0}50%{margin-left:110px;opacity:1}50%{opacity:.9}TO{margin-left:200px}}@keyframes slide-right-one{0%{margin-left:0}50%{margin-left:110px;opacity:1}50%{opacity:.9}to{margin-left:200px}}@keyframes slide-right-two{0%{margin-left:0}50%{margin-left:110px;opacity:1}50%{opacity:.9}to{margin-left:200px}}@keyframes slide-right-three{0%,50%{margin-left:0}60%,to{margin-left:200px}}@keyframes foo{0%{margin-left:0}to{margin-left:200px}}@keyframes\"initial\"{0%{margin-left:0}to{margin-left:200px}}\n",
"new_path": "crates/swc_css_minifier/tests/fixture/compress-keyframe-selector/output.min.css",
"old_path": "crates/swc_css_minifier/tests/fixture/compress-keyframe-selector/output.min.css"
},
{
"change_type": "ADD",
"diff": "+.class1 {\n+ width: 0px;\n+}\n+\n+.class2 {\n+ width: 100px\n+}\n+\n+.class3 {\n+ width: calc(100px + 0px);\n+}\n+\n+.class4 {\n+ width: caLc(100px + 0px);\n+}\n+\n+.class5 {\n+ padding: calc(1in + 0in * 2) 0 calc(0px) 0;\n+}\n+\n+.class6 {\n+ padding: calc(var(--foo, 0px) + 10px) 0;\n+}\n+\n+.class7 {\n+ padding: max(10px, var(--foo, 0px)) 0;\n+}\n+\n+.class8 {\n+ right: max(100vw, 0rem);\n+}\n+\n+.class9 {\n+ right: calc(max(100vw, 0rem));\n+}\n+\n+.class10 {\n+ top: 0.000px;\n+}\n+\n+@media (min-width: 0px) {\n+ .foo {\n+ color: red\n+ }\n+}\n+\n+@media (min-width: 0) {\n+ .bar {\n+ color: red;\n+ }\n+}\n+\n+.class11 {\n+ font: normal normal 400 0px/ 0px cursive;\n+}\n+\n+.class12 {\n+ grid-template-columns: repeat(2, 50px 0px) 100px;\n+}\n+\n+\n+.class13 {\n+ margin: 0q;\n+}\n+\n+.class14 {\n+ transform: translate(0px);\n+}\n+\n+.class15 {\n+ padding: min(1vw, 0in) max(1vw, 0px) clamp(0em, 1vw, 10px) 0px;\n+}\n+\n+.class16 {\n+ padding: 1px 0vmax 2px 3px;\n+}\n+\n+.class17 {\n+ padding: 1px 2px 0rem 3px;\n+}\n+\n+.class18 {\n+ width: 0PX;\n+}\n+\n+.class19 {\n+ width: +0px;\n+}\n+\n+.class20 {\n+ top: -0.000px;\n+}\n",
"new_path": "crates/swc_css_minifier/tests/fixture/compress-length/input.css",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+.class1{width:0}.class2{width:100px}.class3{width:calc(100px + 0px)}.class4{width:caLc(100px + 0px)}.class5{padding:calc(1in + 0in*2)0 calc(0px)0}.class6{padding:calc(var(--foo,0px) + 10px)0}.class7{padding:max(10px,var(--foo,0px))0}.class8{right:max(100vw,0rem)}.class9{right:calc(max(100vw,0rem))}.class10{top:0}@media(min-width:0px){.foo{color:red}}@media(min-width:0){.bar{color:red}}.class11{font:normal normal 400 0/0 cursive}.class12{grid-template-columns:repeat(2,50px 0)100px}.class13{margin:0}.class14{transform:translate(0)}.class15{padding:min(1vw,0in)max(1vw,0px)clamp(0em,1vw,10px)0}.class16{padding:1px 0 2px 3px}.class17{padding:1px 2px 0 3px}.class18{width:0}.class19{width:0}.class20{top:0}\n",
"new_path": "crates/swc_css_minifier/tests/fixture/compress-length/output.min.css",
"old_path": null
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
feat(css/minifier): Compress lengths (#3698)
| 1
|
feat
|
css/minifier
|
306,338
|
23.02.2022 18:42:47
| -3,600
|
5aa8187b76e69abd89aaf2057b187f1ac0757ef1
|
fix: Update filter for google_container_node_pool resource
For `n2d-highcpu-2` machine type it returned two prices for
`n2d-highcpu-2` and `n2d-highcpu-224`. Setting line begin/end in the
regex solves incorrect match.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -86,7 +86,7 @@ func computeCostComponent(region, machineType string, purchaseOption string, ins\nService: strPtr(\"Compute Engine\"),\nProductFamily: strPtr(\"Compute Instance\"),\nAttributeFilters: []*schema.AttributeFilter{\n- {Key: \"machineType\", ValueRegex: strPtr(fmt.Sprintf(\"/%s/i\", machineType))},\n+ {Key: \"machineType\", ValueRegex: strPtr(fmt.Sprintf(\"/^%s$/i\", machineType))},\n},\n},\nPriceFilter: &schema.PriceFilter{\n",
"new_path": "internal/providers/terraform/google/compute_instance.go",
"old_path": "internal/providers/terraform/google/compute_instance.go"
}
] |
Go
|
Apache License 2.0
|
infracost/infracost
|
fix: Update filter for google_container_node_pool resource
For `n2d-highcpu-2` machine type it returned two prices for
`n2d-highcpu-2` and `n2d-highcpu-224`. Setting line begin/end in the
regex solves incorrect match.
| 1
|
fix
| null |
756,051
|
23.02.2022 18:43:01
| 21,600
|
42ca4a48e0452bbb0e43eef32b3e4236c38d5bd7
|
chore: bridgeCoreEval: pass powers explicitly rather than ambiently
|
[
{
"change_type": "MODIFY",
"diff": "-/* global E, powers */\n+/* global E */\n/**\n* This file, along with the companion `gov-permit.json`, are used to test \"big\n* hammer\" chain governance. They don't have a functional purpose outside of\n* that testing.\n*/\n-// Extract our permitted powers from the global `powers` object.\n-const {\n- consume: { client },\n-} = powers;\n-\n// Demonstrate that a console is available.\nconsole.info('hello from the governed code!');\n+// Extract our permitted powers from the `powers` argument.\n+const behavior = ({ consume: { client } }) => {\n// Assign the address of the governed code to the `youAreGoverned` property in\n// clients' `home`.\nE(client).assignBundle([addr => ({ youAreGoverned: addr })]);\n+};\n+\n+// \"export\" our behavior by way of the completion value of this script.\n+behavior;\n",
"new_path": "packages/cosmic-swingset/test/gov-code.js",
"old_path": "packages/cosmic-swingset/test/gov-code.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -76,11 +76,11 @@ export const bridgeCoreEval = async allPowers => {\n...farExports,\nassert,\nconsole,\n- powers,\n});\n// Evaluate the code in the context of the globals.\n- return new Compartment(globals).evaluate(code);\n+ const behavior = new Compartment(globals).evaluate(code);\n+ return behavior(powers);\n}),\n),\n);\n",
"new_path": "packages/vats/src/core/chain-behaviors.js",
"old_path": "packages/vats/src/core/chain-behaviors.js"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
chore: bridgeCoreEval: pass powers explicitly rather than ambiently
| 1
|
chore
| null |
306,644
|
23.02.2022 19:27:12
| -19,080
|
b2dd0586dbd9caefb6e3dc9a5b3054f5174a8169
|
docs(docs): update error messages content
|
[
{
"change_type": "MODIFY",
"diff": "@@ -3,6 +3,28 @@ title: Error messages\ndescription: Your error messages could be the last straw for users to move forward or abort the process in the middle. Use this guide to help users navigate their way and turn their delay into an experience.\n---\n+#### Tone profile\n+<br/>\n+<br/>\n+\n+<Row className=\"justify-content-around\">\n+ <div class=\"bitmap-container\">\n+ <img src=\"/images/assistive.png\"/>\n+ <Subheading className=\"mt-5\" appearance=\"subtle\">assistive</Subheading>\n+ </div>\n+ <div class=\"bitmap-container\">\n+ <img src=\"/images/friendly.png\"/>\n+ <Subheading className=\"mt-5\" appearance=\"subtle\">friendly</Subheading>\n+ </div>\n+ <div class=\"bitmap-container\">\n+ <img src=\"/images/positive.png\"/>\n+ <Subheading className=\"mt-5\" appearance=\"subtle\">positive</Subheading>\n+ </div>\n+</Row>\n+<br />\n+<br />\n+<br />\n+\n#### Remember to\n<ul>\n",
"new_path": "docs/src/pages/content/error-messages.mdx",
"old_path": "docs/src/pages/content/error-messages.mdx"
},
{
"change_type": "ADD",
"diff": "Binary files /dev/null and b/docs/src/pages/content/images/assistive.png differ\n",
"new_path": "docs/src/pages/content/images/assistive.png",
"old_path": "docs/src/pages/content/images/assistive.png"
},
{
"change_type": "ADD",
"diff": "Binary files /dev/null and b/docs/src/pages/content/images/friendly.png differ\n",
"new_path": "docs/src/pages/content/images/friendly.png",
"old_path": "docs/src/pages/content/images/friendly.png"
},
{
"change_type": "ADD",
"diff": "Binary files /dev/null and b/docs/src/pages/content/images/positive.png differ\n",
"new_path": "docs/src/pages/content/images/positive.png",
"old_path": "docs/src/pages/content/images/positive.png"
}
] |
TypeScript
|
MIT License
|
innovaccer/design-system
|
docs(docs): update error messages content
| 1
|
docs
|
docs
|
104,828
|
23.02.2022 20:22:56
| -3,600
|
55a4971446a1c7130c1fdd2ebb87f5575c0c7fb4
|
docs(story): fixed spelling in comment
|
[
{
"change_type": "MODIFY",
"diff": "@@ -36,7 +36,7 @@ addons.getChannel().addListener(STORY_RENDERED, () => {\n* Example 2\n* The dependencies can be the value of a knob representing the same table prop as the state does\n* so that that they can be used together, i.e. when the knob is modified the state\n- * is also updatet with the same value.\n+ * is also updated with the same value.\n* @param {any} initialValue The inital value of the state\n* @param {any} currentDep The dependencies that when changed will force a reset to the\n* initial value and re-render\n@@ -56,7 +56,7 @@ export default function useStoryState(initialValue, currentDep) {\n// If the dependencies has changed the state is \"reset\" to use the\n// new initial value and force a rerender of the story just like\n- // a normal update would, thus the resetted value is picked up during\n+ // a normal update would, thus the reset value is picked up during\n// next render\nconst previousDep = dependencies[index];\nconst dependenciesHasChanged = !isEqual(previousDep, currentDep);\n",
"new_path": "packages/react/src/internal/storyState.js",
"old_path": "packages/react/src/internal/storyState.js"
}
] |
JavaScript
|
Apache License 2.0
|
carbon-design-system/carbon-addons-iot-react
|
docs(story): fixed spelling in comment
#3303
| 1
|
docs
|
story
|
104,828
|
23.02.2022 20:32:47
| -3,600
|
c41de466b879d74d6b1c0164f789cec93323a928
|
docs(story): fixed more spelling in comment
|
[
{
"change_type": "MODIFY",
"diff": "@@ -9,7 +9,7 @@ let states = [];\nlet dependencies = [];\naddons.getChannel().addListener(STORY_CHANGED, () => {\n- // Clear the global state and reset the capll order when\n+ // Clear the global state and reset the call order when\n// the user selects another story\ncallOrder = 0;\nstates = [];\n",
"new_path": "packages/react/src/internal/storyState.js",
"old_path": "packages/react/src/internal/storyState.js"
}
] |
JavaScript
|
Apache License 2.0
|
carbon-design-system/carbon-addons-iot-react
|
docs(story): fixed more spelling in comment
#3303
| 1
|
docs
|
story
|
531,793
|
23.02.2022 20:58:33
| 0
|
78e0561f1ca880cae657d591b747a58fd19e88b1
|
fix(ci): correctly bump nodejs version in package-lock.json
|
[
{
"change_type": "MODIFY",
"diff": "@@ -24,6 +24,14 @@ jobs:\nsed -i -E s/'([\\ \\t]+)node-version: .+'/'\\1node-version: ${{ env.NODE_VERSION }}'/g .github/workflows/*\nsed -i -E s/'([\\ \\t]+)\"node\": .+'/'\\1\"node\": \"${{ env.NODE_VERSION }}\"'/g ui/package.json ui/*/package.json\n+ - name: Set up Node JS\n+ uses: actions/setup-node@v2\n+ with:\n+ node-version: \"${{ env.NODE_VERSION }}\"\n+\n+ - name: Regenerate package-lock.json\n+ run: cd ui && npm i\n+\n- name: Create Pull Request\nid: cpr\nuses: peter-evans/create-pull-request@v3.12.1\n",
"new_path": ".github/workflows/node-version.yml",
"old_path": ".github/workflows/node-version.yml"
}
] |
TypeScript
|
Apache License 2.0
|
prymitive/karma
|
fix(ci): correctly bump nodejs version in package-lock.json
| 1
|
fix
|
ci
|
160,177
|
23.02.2022 21:29:45
| -28,800
|
4309b81902280f0dacb7fb169b6b9c34f06de3f7
|
feat: anchor add event api
|
[
{
"change_type": "MODIFY",
"diff": "@@ -11,6 +11,9 @@ class CustomCircleModel extends CircleNodeModel {\nif (this.isHovered) {\nstyle.stroke = 'green'\n}\n+ if (this.properties.isConnectable) {\n+ style.fill = 'green'\n+ }\nreturn style\n}\n}\n",
"new_path": "packages/core/examples/customNode/customCircle.mjs",
"old_path": "packages/core/examples/customNode/customCircle.mjs"
},
{
"change_type": "MODIFY",
"diff": "@@ -101,6 +101,30 @@ lf.render({\n]\n});\n+lf.on('anchor:dragstart', ({ data, nodeModel }) => {\n+ if (nodeModel.type === 'hexagonNode') {\n+ lf.graphModel.nodes.forEach(node => {\n+ if (node.type === 'customCircle') {\n+ node.setProperties({\n+ isConnectable: true\n+ })\n+ }\n+ });\n+ }\n+})\n+\n+lf.on('anchor:drop', ({ data, nodeModel }) => {\n+ if (nodeModel.type === 'hexagonNode') {\n+ lf.graphModel.nodes.forEach(node => {\n+ if (node.type === 'customCircle') {\n+ node.setProperties({\n+ isConnectable: false\n+ })\n+ }\n+ });\n+ }\n+})\n+\ndocument.querySelector('#select_js').addEventListener('click', () => {\nlf.setProperties('custom-111', {\nisSelected: true\n",
"new_path": "packages/core/examples/customNode/index.mjs",
"old_path": "packages/core/examples/customNode/index.mjs"
},
{
"change_type": "MODIFY",
"diff": "@@ -60,6 +60,9 @@ export enum EventType {\nEDGE_CONTEXTMENU = 'edge:contextmenu',\nEDGE_ADJUST = 'edge:adjust',\nEDGE_EXCHANGE_NODE = 'edge:exchange-node',\n+ ANCHOR_DRAGSTART = 'anchor:dragstart',\n+ ANCHOR_DRAG = 'anchor:drag',\n+ ANCHOR_DROP = 'anchor:drop',\nBLANK_MOUSEDOWN = 'blank:mousedown',\nBLANK_DRAGSTART = 'blank:dragstart',\nBLANK_DRAG = 'blank:drag',\n",
"new_path": "packages/core/src/constant/constant.ts",
"old_path": "packages/core/src/constant/constant.ts"
}
] |
TypeScript
|
Apache License 2.0
|
didi/logicflow
|
feat: anchor add event api
| 1
|
feat
| null |
791,374
|
23.02.2022 21:40:42
| -7,200
|
6b5db1b71cb873ed4c50f5f1454f410bf93d9327
|
chore(logging): handle TestListLogEntriesRequest flakiness
* chore(fix): handle TestListLogEntriesRequest flakiness
remove timestamp comparison which fails due to (milli-)seconds mismatch when
executing time.Now() to get filter time delayed after time.Now() in the test.
separately test default (-24h) look back period
|
[
{
"change_type": "MODIFY",
"diff": "@@ -23,13 +23,13 @@ import (\n\"net/http\"\n\"net/url\"\n\"os\"\n+ \"strings\"\n\"testing\"\n\"time\"\n\"cloud.google.com/go/internal/testutil\"\n\"cloud.google.com/go/logging\"\nltesting \"cloud.google.com/go/logging/internal/testing\"\n- \"github.com/golang/protobuf/proto\"\n\"github.com/golang/protobuf/ptypes\"\ndurpb \"github.com/golang/protobuf/ptypes/duration\"\nstructpb \"github.com/golang/protobuf/ptypes/struct\"\n@@ -261,41 +261,59 @@ func TestFromLogEntry(t *testing.T) {\n}\n}\n+func TestListLogEntriesRequestDefaults(t *testing.T) {\n+ const timeFilterPrefix = \"timestamp >= \"\n+\n+ got := listLogEntriesRequest(\"projects/PROJECT_ID\", nil)\n+\n+ // parse time from filter\n+ if len(got.Filter) < len(timeFilterPrefix) {\n+ t.Errorf(\"got %v; want len(%v) start with '%v'\", got, got.Filter, timeFilterPrefix)\n+ }\n+ filterTime, err := time.Parse(time.RFC3339, strings.Trim(got.Filter[len(timeFilterPrefix):], \"\\\"\"))\n+ if err != nil {\n+ t.Errorf(\"got %v; want %v in RFC3339\", err, got.Filter)\n+ }\n+ timeDiff := time.Now().UTC().Sub(filterTime)\n+\n+ // Default is client's project ID, 24 hour lookback, and no orderBy.\n+ if !testutil.Equal(got.ResourceNames, []string{\"projects/PROJECT_ID\"}) || got.OrderBy != \"\" || timeDiff.Hours() < 24 {\n+ t.Errorf(\"got %v; want resource_names:\\\"projects/PROJECT_ID\\\" filter: %v - 24 hours order_by:\\\"\\\"\", got, filterTime)\n+ }\n+}\n+\nfunc TestListLogEntriesRequest(t *testing.T) {\n- dayAgo := time.Now().Add(-24 * time.Hour).UTC().Format(time.RFC3339)\nfor _, test := range []struct {\nopts []EntriesOption\nresourceNames []string\n- filter string\n+ filterPrefix string\norderBy string\n}{\n- // Default is client's project ID, 24 hour lookback, and orderBy.\n- {nil, []string{\"projects/PROJECT_ID\"}, `timestamp >= \"` + dayAgo + `\"`, \"\"},\n// Timestamp default does not override user's filter\n{[]EntriesOption{NewestFirst(), Filter(`timestamp > \"2020-10-30T15:39:09Z\"`)},\n[]string{\"projects/PROJECT_ID\"}, `timestamp > \"2020-10-30T15:39:09Z\"`, \"timestamp desc\"},\n{[]EntriesOption{NewestFirst(), Filter(\"f\")},\n- []string{\"projects/PROJECT_ID\"}, `f AND timestamp >= \"` + dayAgo + `\"`, \"timestamp desc\"},\n+ []string{\"projects/PROJECT_ID\"}, \"f AND timestamp >= \\\"\", \"timestamp desc\"},\n{[]EntriesOption{ProjectIDs([]string{\"foo\"})},\n- []string{\"projects/foo\"}, `timestamp >= \"` + dayAgo + `\"`, \"\"},\n+ []string{\"projects/foo\"}, \"timestamp >= \\\"\", \"\"},\n{[]EntriesOption{ResourceNames([]string{\"folders/F\", \"organizations/O\"})},\n- []string{\"folders/F\", \"organizations/O\"}, `timestamp >= \"` + dayAgo + `\"`, \"\"},\n+ []string{\"folders/F\", \"organizations/O\"}, \"timestamp >= \\\"\", \"\"},\n{[]EntriesOption{NewestFirst(), Filter(\"f\"), ProjectIDs([]string{\"foo\"})},\n- []string{\"projects/foo\"}, `f AND timestamp >= \"` + dayAgo + `\"`, \"timestamp desc\"},\n+ []string{\"projects/foo\"}, \"f AND timestamp >= \\\"\", \"timestamp desc\"},\n{[]EntriesOption{NewestFirst(), Filter(\"f\"), ProjectIDs([]string{\"foo\"})},\n- []string{\"projects/foo\"}, `f AND timestamp >= \"` + dayAgo + `\"`, \"timestamp desc\"},\n+ []string{\"projects/foo\"}, \"f AND timestamp >= \\\"\", \"timestamp desc\"},\n// If there are repeats, last one wins.\n{[]EntriesOption{NewestFirst(), Filter(\"no\"), ProjectIDs([]string{\"foo\"}), Filter(\"f\")},\n- []string{\"projects/foo\"}, `f AND timestamp >= \"` + dayAgo + `\"`, \"timestamp desc\"},\n+ []string{\"projects/foo\"}, \"f AND timestamp >= \\\"\", \"timestamp desc\"},\n} {\ngot := listLogEntriesRequest(\"projects/PROJECT_ID\", test.opts)\nwant := &logpb.ListLogEntriesRequest{\nResourceNames: test.resourceNames,\n- Filter: test.filter,\n+ Filter: test.filterPrefix,\nOrderBy: test.orderBy,\n}\n- if !proto.Equal(got, want) {\n- t.Errorf(\"%v:\\ngot %v\\nwant %v\", test.opts, got, want)\n+ if !testutil.Equal(got.ResourceNames, want.ResourceNames) || !strings.HasPrefix(got.Filter, want.Filter) || got.OrderBy != want.OrderBy {\n+ t.Errorf(\"got: %v; want %v (mind wanted Filter is prefix)\", got, want)\n}\n}\n}\n",
"new_path": "logging/logadmin/logadmin_test.go",
"old_path": "logging/logadmin/logadmin_test.go"
}
] |
Go
|
Apache License 2.0
|
googleapis/google-cloud-go
|
chore(logging): handle TestListLogEntriesRequest flakiness (#5460)
* chore(fix): handle TestListLogEntriesRequest flakiness
remove timestamp comparison which fails due to (milli-)seconds mismatch when
executing time.Now() to get filter time delayed after time.Now() in the test.
separately test default (-24h) look back period
| 1
|
chore
|
logging
|
841,479
|
23.02.2022 22:20:06
| -28,800
|
d499b8c14f0f75fd48fd7f5e4b7ad6e790bf4882
|
fix(es/parser): Allow `Expr::TsInstantiation` in extends clause
|
[
{
"change_type": "ADD",
"diff": "+{\n+ \"jsc\": {\n+ \"parser\": {\n+ \"syntax\": \"typescript\"\n+ },\n+ \"target\": \"es2022\"\n+ },\n+ \"module\": {\n+ \"type\": \"es6\"\n+ }\n+}\n",
"new_path": "crates/swc/tests/fixture/issue-3694/1/input/.swcrc",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+interface IConnectedAppProps\n+ extends ReturnType<typeof mapStateToProps>,\n+ ReturnType<typeof mapDispatchToProps> {}\n+\n+class Foo implements IConnectedAppProps {}\n",
"new_path": "crates/swc/tests/fixture/issue-3694/1/input/index.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+class Foo {\n+}\n",
"new_path": "crates/swc/tests/fixture/issue-3694/1/output/index.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -938,7 +938,10 @@ impl<I: Tokens> Parser<I> {\nlet ident = Box::new(Expr::Ident(self.parse_ident_name()?));\nlet expr = self.parse_subscripts(Callee::Expr(ident), true, true)?;\n- if !matches!(&*expr, Expr::Ident(..) | Expr::Member(..)) {\n+ if !matches!(\n+ &*expr,\n+ Expr::Ident(..) | Expr::Member(..) | Expr::TsInstantiation(..)\n+ ) {\nself.emit_err(span!(self, start), SyntaxError::TS2499);\n}\n",
"new_path": "crates/swc_ecma_parser/src/parser/typescript.rs",
"old_path": "crates/swc_ecma_parser/src/parser/typescript.rs"
},
{
"change_type": "ADD",
"diff": "+interface IConnectedAppProps\n+ extends ReturnType<typeof mapStateToProps>,\n+ ReturnType<typeof mapDispatchToProps> {}\n",
"new_path": "crates/swc_ecma_parser/tests/typescript/issue-3694/input.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"type\": \"Script\",\n+ \"span\": {\n+ \"start\": 0,\n+ \"end\": 125,\n+ \"ctxt\": 0\n+ },\n+ \"body\": [\n+ {\n+ \"type\": \"TsInterfaceDeclaration\",\n+ \"span\": {\n+ \"start\": 0,\n+ \"end\": 125,\n+ \"ctxt\": 0\n+ },\n+ \"id\": {\n+ \"type\": \"Identifier\",\n+ \"span\": {\n+ \"start\": 10,\n+ \"end\": 28,\n+ \"ctxt\": 0\n+ },\n+ \"value\": \"IConnectedAppProps\",\n+ \"optional\": false\n+ },\n+ \"declare\": false,\n+ \"typeParams\": null,\n+ \"extends\": [\n+ {\n+ \"type\": \"TsExpressionWithTypeArguments\",\n+ \"span\": {\n+ \"start\": 41,\n+ \"end\": 75,\n+ \"ctxt\": 0\n+ },\n+ \"expression\": {\n+ \"type\": \"Identifier\",\n+ \"span\": {\n+ \"start\": 41,\n+ \"end\": 51,\n+ \"ctxt\": 0\n+ },\n+ \"value\": \"ReturnType\",\n+ \"optional\": false\n+ },\n+ \"typeArguments\": {\n+ \"type\": \"TsTypeParameterInstantiation\",\n+ \"span\": {\n+ \"start\": 51,\n+ \"end\": 75,\n+ \"ctxt\": 0\n+ },\n+ \"params\": [\n+ {\n+ \"type\": \"TsTypeQuery\",\n+ \"span\": {\n+ \"start\": 52,\n+ \"end\": 74,\n+ \"ctxt\": 0\n+ },\n+ \"exprName\": {\n+ \"type\": \"Identifier\",\n+ \"span\": {\n+ \"start\": 59,\n+ \"end\": 74,\n+ \"ctxt\": 0\n+ },\n+ \"value\": \"mapStateToProps\",\n+ \"optional\": false\n+ },\n+ \"typeArguments\": null\n+ }\n+ ]\n+ }\n+ },\n+ {\n+ \"type\": \"TsExpressionWithTypeArguments\",\n+ \"span\": {\n+ \"start\": 85,\n+ \"end\": 122,\n+ \"ctxt\": 0\n+ },\n+ \"expression\": {\n+ \"type\": \"Identifier\",\n+ \"span\": {\n+ \"start\": 85,\n+ \"end\": 95,\n+ \"ctxt\": 0\n+ },\n+ \"value\": \"ReturnType\",\n+ \"optional\": false\n+ },\n+ \"typeArguments\": {\n+ \"type\": \"TsTypeParameterInstantiation\",\n+ \"span\": {\n+ \"start\": 95,\n+ \"end\": 122,\n+ \"ctxt\": 0\n+ },\n+ \"params\": [\n+ {\n+ \"type\": \"TsTypeQuery\",\n+ \"span\": {\n+ \"start\": 96,\n+ \"end\": 121,\n+ \"ctxt\": 0\n+ },\n+ \"exprName\": {\n+ \"type\": \"Identifier\",\n+ \"span\": {\n+ \"start\": 103,\n+ \"end\": 121,\n+ \"ctxt\": 0\n+ },\n+ \"value\": \"mapDispatchToProps\",\n+ \"optional\": false\n+ },\n+ \"typeArguments\": null\n+ }\n+ ]\n+ }\n+ }\n+ ],\n+ \"body\": {\n+ \"type\": \"TsInterfaceBody\",\n+ \"span\": {\n+ \"start\": 123,\n+ \"end\": 125,\n+ \"ctxt\": 0\n+ },\n+ \"body\": []\n+ }\n+ }\n+ ],\n+ \"interpreter\": null\n+}\n",
"new_path": "crates/swc_ecma_parser/tests/typescript/issue-3694/input.ts.json",
"old_path": null
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
fix(es/parser): Allow `Expr::TsInstantiation` in extends clause (#3696)
| 1
|
fix
|
es/parser
|
841,474
|
23.02.2022 22:57:01
| -28,800
|
d6522f3a37f38aef713c7cbba06349708b56ee27
|
fix(es/parser): Disallow using reserved words as an expression in typescript
|
[
{
"change_type": "MODIFY",
"diff": "@@ -352,7 +352,7 @@ impl<'a, I: Tokens> Parser<I> {\n}\nif is!(self, \"let\")\n- || (self.input.syntax().typescript() && is!(self, IdentName))\n+ || (self.input.syntax().typescript() && is_one_of!(self, IdentRef, \"await\"))\n|| is!(self, IdentRef)\n{\n// TODO: Handle [Yield, Await]\n",
"new_path": "crates/swc_ecma_parser/src/parser/expr.rs",
"old_path": "crates/swc_ecma_parser/src/parser/expr.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -116,7 +116,9 @@ impl<'a, I: Tokens> Parser<I> {\nreturn Ok(Stmt::Expr(ExprStmt { span, expr }));\n}\n- if self.input.syntax().typescript() && is!(self, \"const\") && peeked_is!(self, \"enum\") {\n+ let is_typescript = self.input.syntax().typescript();\n+\n+ if is_typescript && is!(self, \"const\") && peeked_is!(self, \"enum\") {\nassert_and_bump!(self, \"const\");\nassert_and_bump!(self, \"enum\");\nreturn self\n@@ -273,6 +275,32 @@ impl<'a, I: Tokens> Parser<I> {\n}\n}\n+ tok!(\"interface\") => {\n+ if is_typescript\n+ && peeked_is!(self, IdentName)\n+ && !self.input.has_linebreak_between_cur_and_peeked()\n+ {\n+ let start = self.input.cur_pos();\n+ bump!(self);\n+ return Ok(Stmt::Decl(Decl::TsInterface(\n+ self.parse_ts_interface_decl(start)?,\n+ )));\n+ }\n+ }\n+\n+ tok!(\"enum\") => {\n+ if is_typescript\n+ && peeked_is!(self, IdentName)\n+ && !self.input.has_linebreak_between_cur_and_peeked()\n+ {\n+ let start = self.input.cur_pos();\n+ bump!(self);\n+ return Ok(Stmt::Decl(Decl::TsEnum(\n+ self.parse_ts_enum_decl(start, false)?,\n+ )));\n+ }\n+ }\n+\ntok!('{') => {\nreturn self.parse_block(false).map(Stmt::Block);\n}\n",
"new_path": "crates/swc_ecma_parser/src/parser/stmt.rs",
"old_path": "crates/swc_ecma_parser/src/parser/stmt.rs"
},
{
"change_type": "ADD",
"diff": "+let a = if\n",
"new_path": "crates/swc_ecma_parser/tests/typescript-errors/reserved-words/keywords/input.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+error: Unexpected token `if`. Expected this, import, async, function, [ for array literal, { for object literal, @ for decorator, function, class, null, true, false, number, bigint, string, regexp, ` for template literal, (, or an identifier\n+ --> $DIR/tests/typescript-errors/reserved-words/keywords/input.ts:1:9\n+ |\n+1 | let a = if\n+ | ^^\n+\n",
"new_path": "crates/swc_ecma_parser/tests/typescript-errors/reserved-words/keywords/input.ts.stderr",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+\"use strict\";\n+\n+let a = interface;\n",
"new_path": "crates/swc_ecma_parser/tests/typescript-errors/reserved-words/reserved/input.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+error: Unexpected token `interface`. Expected this, import, async, function, [ for array literal, { for object literal, @ for decorator, function, class, null, true, false, number, bigint, string, regexp, ` for template literal, (, or an identifier\n+ --> $DIR/tests/typescript-errors/reserved-words/reserved/input.ts:3:9\n+ |\n+3 | let a = interface;\n+ | ^^^^^^^^^\n+\n",
"new_path": "crates/swc_ecma_parser/tests/typescript-errors/reserved-words/reserved/input.ts.stderr",
"old_path": null
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
fix(es/parser): Disallow using reserved words as an expression in typescript (#3697)
| 1
|
fix
|
es/parser
|
756,013
|
23.02.2022 23:23:32
| 21,600
|
7b063dbc5894657035cd654b7d0cca01475463d5
|
feat(vats): pass some module namespaces to core eval
|
[
{
"change_type": "MODIFY",
"diff": "@@ -17,6 +17,7 @@ import {\nimport * as behaviors from './behaviors.js';\nimport * as simBehaviors from './sim-behaviors.js';\nimport * as clientBehaviors from './client-behaviors.js';\n+import * as utils from './utils.js';\nconst { entries } = Object;\nconst { details: X, quote: q } = assert;\n@@ -82,7 +83,8 @@ const buildRootObject = (vatPowers, vatParameters, log = console.info) => {\n/** @param { Record<string, Record<string, unknown>> } manifest */\nconst runBehaviors = manifest => {\n- const allPowers = {\n+ // TODO: Aspires to be BootstrapPowers, but it's too specific.\n+ const allPowers = harden({\nvatPowers,\nvatParameters,\nvats,\n@@ -91,7 +93,14 @@ const buildRootObject = (vatPowers, vatParameters, log = console.info) => {\nconsume,\n...spaces,\nrunBehaviors,\n- };\n+ // These module namespaces might be useful for core eval governance.\n+ modules: {\n+ clientBehaviors: { ...clientBehaviors },\n+ simBehaviors: { ...simBehaviors },\n+ behaviors: { ...behaviors },\n+ utils: { ...utils },\n+ },\n+ });\nreturn Promise.all(\nentries(manifest).map(([name, permit]) =>\nPromise.resolve().then(() => {\n",
"new_path": "packages/vats/src/core/boot.js",
"old_path": "packages/vats/src/core/boot.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -73,6 +73,7 @@ export const bridgeCoreEval = async allPowers => {\n// Inspired by ../repl.js:\nconst globals = harden({\n+ ...allPowers.modules,\n...farExports,\nassert,\nconsole,\n",
"new_path": "packages/vats/src/core/chain-behaviors.js",
"old_path": "packages/vats/src/core/chain-behaviors.js"
},
{
"change_type": "MODIFY",
"diff": "* vatPowers: { [prop: string]: any, D: DProxy },\n* vatParameters: BootstrapVatParams,\n* runBehaviors: (manifest: unknown) => Promise<unknown>,\n+ * modules: Record<string, Record<string, any>>,\n* }} BootstrapPowers\n* @typedef { WellKnownSpaces & {\n* consume: EconomyBootstrapPowers['consume'] & {\n",
"new_path": "packages/vats/src/core/types.js",
"old_path": "packages/vats/src/core/types.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -241,6 +241,7 @@ test('mintInitialSupply, addBankAssets bootstrap actions', async t => {\nvats: /** @type { any } */ ({}),\nvatPowers: /** @type { any } */ ({}),\nrunBehaviors: /** @type { any } */ ({}),\n+ modules: {},\n...spaces,\n});\n",
"new_path": "packages/vats/test/test-vat-bank.js",
"old_path": "packages/vats/test/test-vat-bank.js"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
feat(vats): pass some module namespaces to core eval
| 1
|
feat
|
vats
|
841,497
|
23.02.2022 23:36:05
| 18,000
|
4318a2e73b1ab7df07da809cf3207268942d77b7
|
fix(es/parser): Fix the span of an export declaration containing a const enum
|
[
{
"change_type": "MODIFY",
"diff": "@@ -529,12 +529,12 @@ impl<'a, I: Tokens> Parser<I> {\n&& is!(self, \"const\")\n&& peeked_is!(self, \"enum\")\n{\n- let start = cur_pos!(self);\n+ let enum_start = cur_pos!(self);\nassert_and_bump!(self, \"const\");\nlet _ = cur!(self, true);\nassert_and_bump!(self, \"enum\");\nreturn self\n- .parse_ts_enum_decl(start, /* is_const */ true)\n+ .parse_ts_enum_decl(enum_start, /* is_const */ true)\n.map(Decl::from)\n.map(|decl| {\nModuleDecl::ExportDecl(ExportDecl {\n",
"new_path": "crates/swc_ecma_parser/src/parser/stmt/module_item.rs",
"old_path": "crates/swc_ecma_parser/src/parser/stmt/module_item.rs"
},
{
"change_type": "ADD",
"diff": "+export const enum A {}\n",
"new_path": "crates/swc_ecma_parser/tests/span/ts/decl/export-const-enum.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+warning: Module\n+ --> $DIR/tests/span/ts/decl/export-const-enum.ts:1:1\n+ |\n+1 | export const enum A {}\n+ | ^^^^^^^^^^^^^^^^^^^^^^\n+\n+warning: ModuleItem\n+ --> $DIR/tests/span/ts/decl/export-const-enum.ts:1:1\n+ |\n+1 | export const enum A {}\n+ | ^^^^^^^^^^^^^^^^^^^^^^\n+\n+warning: ModuleDecl\n+ --> $DIR/tests/span/ts/decl/export-const-enum.ts:1:1\n+ |\n+1 | export const enum A {}\n+ | ^^^^^^^^^^^^^^^^^^^^^^\n+\n+warning: ExportDecl\n+ --> $DIR/tests/span/ts/decl/export-const-enum.ts:1:1\n+ |\n+1 | export const enum A {}\n+ | ^^^^^^^^^^^^^^^^^^^^^^\n+\n+warning: Decl\n+ --> $DIR/tests/span/ts/decl/export-const-enum.ts:1:8\n+ |\n+1 | export const enum A {}\n+ | ^^^^^^^^^^^^^^^\n+\n+warning: TsEnumDecl\n+ --> $DIR/tests/span/ts/decl/export-const-enum.ts:1:8\n+ |\n+1 | export const enum A {}\n+ | ^^^^^^^^^^^^^^^\n+\n+warning: Ident\n+ --> $DIR/tests/span/ts/decl/export-const-enum.ts:1:19\n+ |\n+1 | export const enum A {}\n+ | ^\n+\n",
"new_path": "crates/swc_ecma_parser/tests/span/ts/decl/export-const-enum.ts.spans",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "{\n\"type\": \"ExportDeclaration\",\n\"span\": {\n- \"start\": 103,\n+ \"start\": 96,\n\"end\": 131,\n\"ctxt\": 0\n},\n",
"new_path": "crates/swc_ecma_parser/tests/tsc/es6modulekindWithES5Target5.json",
"old_path": "crates/swc_ecma_parser/tests/tsc/es6modulekindWithES5Target5.json"
},
{
"change_type": "MODIFY",
"diff": "{\n\"type\": \"ExportDeclaration\",\n\"span\": {\n- \"start\": 103,\n+ \"start\": 96,\n\"end\": 131,\n\"ctxt\": 0\n},\n",
"new_path": "crates/swc_ecma_parser/tests/tsc/esnextmodulekindWithES5Target5.json",
"old_path": "crates/swc_ecma_parser/tests/tsc/esnextmodulekindWithES5Target5.json"
},
{
"change_type": "MODIFY",
"diff": "{\n\"type\": \"ExportDeclaration\",\n\"span\": {\n- \"start\": 174,\n+ \"start\": 167,\n\"end\": 202,\n\"ctxt\": 0\n},\n",
"new_path": "crates/swc_ecma_parser/tests/tsc/exportsAndImports3-amd.json",
"old_path": "crates/swc_ecma_parser/tests/tsc/exportsAndImports3-amd.json"
},
{
"change_type": "MODIFY",
"diff": "{\n\"type\": \"ExportDeclaration\",\n\"span\": {\n- \"start\": 179,\n+ \"start\": 172,\n\"end\": 207,\n\"ctxt\": 0\n},\n",
"new_path": "crates/swc_ecma_parser/tests/tsc/exportsAndImports3-es6.json",
"old_path": "crates/swc_ecma_parser/tests/tsc/exportsAndImports3-es6.json"
},
{
"change_type": "MODIFY",
"diff": "{\n\"type\": \"ExportDeclaration\",\n\"span\": {\n- \"start\": 163,\n+ \"start\": 156,\n\"end\": 191,\n\"ctxt\": 0\n},\n",
"new_path": "crates/swc_ecma_parser/tests/tsc/exportsAndImports3.json",
"old_path": "crates/swc_ecma_parser/tests/tsc/exportsAndImports3.json"
},
{
"change_type": "MODIFY",
"diff": "{\n\"type\": \"ExportDeclaration\",\n\"span\": {\n- \"start\": 149,\n+ \"start\": 142,\n\"end\": 174,\n\"ctxt\": 0\n},\n",
"new_path": "crates/swc_ecma_parser/tests/tsc/importsNotUsedAsValues_error.json",
"old_path": "crates/swc_ecma_parser/tests/tsc/importsNotUsedAsValues_error.json"
},
{
"change_type": "MODIFY",
"diff": "{\n\"type\": \"ExportDeclaration\",\n\"span\": {\n- \"start\": 605,\n+ \"start\": 598,\n\"end\": 645,\n\"ctxt\": 0\n},\n{\n\"type\": \"ExportDeclaration\",\n\"span\": {\n- \"start\": 759,\n+ \"start\": 752,\n\"end\": 861,\n\"ctxt\": 0\n},\n",
"new_path": "crates/swc_ecma_parser/tests/tsc/jsDeclarationsEnums.json",
"old_path": "crates/swc_ecma_parser/tests/tsc/jsDeclarationsEnums.json"
},
{
"change_type": "MODIFY",
"diff": "{\n\"type\": \"ExportDeclaration\",\n\"span\": {\n- \"start\": 209,\n+ \"start\": 202,\n\"end\": 226,\n\"ctxt\": 0\n},\n",
"new_path": "crates/swc_ecma_parser/tests/tsc/superInStaticMembers1.json",
"old_path": "crates/swc_ecma_parser/tests/tsc/superInStaticMembers1.json"
},
{
"change_type": "MODIFY",
"diff": "{\n\"type\": \"ExportDeclaration\",\n\"span\": {\n- \"start\": 7,\n+ \"start\": 0,\n\"end\": 22,\n\"ctxt\": 0\n},\n",
"new_path": "crates/swc_ecma_parser/tests/typescript/enum/export-const/input.ts.json",
"old_path": "crates/swc_ecma_parser/tests/typescript/enum/export-const/input.ts.json"
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
fix(es/parser): Fix the span of an export declaration containing a const enum (#3701)
| 1
|
fix
|
es/parser
|
877,015
|
23.02.2022 23:38:25
| -3,600
|
fc69ec8f0045d7775a86aac363718c1999d184e3
|
docs(@vtmn/css): change placeholder url for images
|
[
{
"change_type": "MODIFY",
"diff": ">\n<img\nclass=\"vtmn-progressbar_image\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"Black and white grid\"\n/>\n<svg>\n>\n<img\nclass=\"vtmn-progressbar_image\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"Black and white grid\"\n/>\n<svg>\n",
"new_path": "packages/showcases/css/stories/components/indicators/progressbar/examples/circular.html",
"old_path": "packages/showcases/css/stories/components/indicators/progressbar/examples/circular.html"
},
{
"change_type": "MODIFY",
"diff": ">\n<img\nclass=\"vtmn-progressbar_image\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"Black and white grid\"\n/>\n<svg>\n",
"new_path": "packages/showcases/css/stories/components/indicators/progressbar/examples/overview.html",
"old_path": "packages/showcases/css/stories/components/indicators/progressbar/examples/overview.html"
},
{
"change_type": "MODIFY",
"diff": "<div class=\"vtmn-chip vtmn-chip_variant--input vtmn-chip--selected\">\n<img\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"Black and white grid\"\n/>\nJavaScript\nclass=\"vtmn-chip vtmn-chip_variant--input vtmn-chip_size--small vtmn-chip--selected\"\n>\n<img\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"Black and white grid\"\n/>\nJavaScript\n",
"new_path": "packages/showcases/css/stories/components/selection-controls/chip/examples/input.html",
"old_path": "packages/showcases/css/stories/components/selection-controls/chip/examples/input.html"
},
{
"change_type": "MODIFY",
"diff": "class=\"vtmn-chip vtmn-chip_variant--input vtmn-chip_size--small vtmn-chip--selected\"\n>\n<img\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"Black and white grid\"\n/>\nJavaScript\n",
"new_path": "packages/showcases/css/stories/components/selection-controls/chip/examples/overview.html",
"old_path": "packages/showcases/css/stories/components/selection-controls/chip/examples/overview.html"
},
{
"change_type": "MODIFY",
"diff": "<div class=\"vtmn-card vtmn-card_variant--full-image\">\n<div class=\"vtmn-card_image\">\n<img\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"\"\n/>\n</div>\n<div class=\"vtmn-card vtmn-card_variant--full-image\">\n<div class=\"vtmn-card_image\">\n<img\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"\"\n/>\n</div>\n",
"new_path": "packages/showcases/css/stories/components/structure/card/examples/full-image.html",
"old_path": "packages/showcases/css/stories/components/structure/card/examples/full-image.html"
},
{
"change_type": "MODIFY",
"diff": "<div class=\"vtmn-card\">\n<div class=\"vtmn-card_image\">\n<img\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"\"\n/>\n</div>\n",
"new_path": "packages/showcases/css/stories/components/structure/card/examples/overview.html",
"old_path": "packages/showcases/css/stories/components/structure/card/examples/overview.html"
},
{
"change_type": "MODIFY",
"diff": "<div class=\"vtmn-card vtmn-card_variant--side-image\">\n<div class=\"vtmn-card_image\">\n<img\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"\"\n/>\n</div>\n<div class=\"vtmn-card vtmn-card_variant--side-image\">\n<div class=\"vtmn-card_image\">\n<img\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"\"\n/>\n</div>\n",
"new_path": "packages/showcases/css/stories/components/structure/card/examples/side-image.html",
"old_path": "packages/showcases/css/stories/components/structure/card/examples/side-image.html"
},
{
"change_type": "MODIFY",
"diff": "<div class=\"vtmn-card vtmn-card_variant--top-image\">\n<div class=\"vtmn-card_image\">\n<img\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"\"\n/>\n</div>\n<div class=\"vtmn-card vtmn-card_variant--top-image\">\n<div class=\"vtmn-card_image vtmn-card_image--full\">\n<img\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"\"\n/>\n</div>\n<div class=\"vtmn-card vtmn-card_variant--top-image\">\n<div class=\"vtmn-card_image vtmn-card_image--full\">\n<img\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"\"\n/>\n</div>\n",
"new_path": "packages/showcases/css/stories/components/structure/card/examples/top-image.html",
"old_path": "packages/showcases/css/stories/components/structure/card/examples/top-image.html"
},
{
"change_type": "MODIFY",
"diff": "<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--circle\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--circle\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--circle\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--square\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--square\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--square\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--rectangle\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--rectangle\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--rectangle\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n",
"new_path": "packages/showcases/css/stories/components/structure/list/examples/medium.html",
"old_path": "packages/showcases/css/stories/components/structure/list/examples/medium.html"
},
{
"change_type": "MODIFY",
"diff": "<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--circle\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--circle\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--circle\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--square\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--square\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--square\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--rectangle\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--rectangle\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n<div class=\"vtmn-list_start-visual\">\n<img\nclass=\"vtmn-list_media--rectangle\"\n- src=\"https://storage.googleapis.com/dkt-design-cdn/images/placeholder.jpg\"\n+ src=\"https://storage.googleapis.com/dkt-design-cdn/images/landscape-placeholder.jpg\"\nalt=\"placeholder\"\n/>\n</div>\n",
"new_path": "packages/showcases/css/stories/components/structure/list/examples/overview.html",
"old_path": "packages/showcases/css/stories/components/structure/list/examples/overview.html"
}
] |
JavaScript
|
Apache License 2.0
|
decathlon/vitamin-web
|
docs(@vtmn/css): change placeholder url for images
| 1
|
docs
|
@vtmn/css
|
841,474
|
23.02.2022 23:48:17
| -28,800
|
010fe048c20bc5a0acfbc65fe43cdd38aeae8fc1
|
fix(es/parser): Fix a typescript instantiation expression followed by EOF
|
[
{
"change_type": "MODIFY",
"diff": "@@ -572,7 +572,7 @@ impl<'a, I: Tokens> Parser<I> {\nreturn_if_arrow!(self, obj);\nlet type_args = if self.syntax().typescript() && is!(self, '<') {\n- self.try_parse_type_args_of_ts_expr_with_type_args()\n+ self.try_parse_ts_type_args()\n} else {\nNone\n};\n@@ -1109,7 +1109,7 @@ impl<'a, I: Tokens> Parser<I> {\n}\nlet type_args = if self.syntax().typescript() && is!(self, '<') {\n- self.try_parse_type_args_of_ts_expr_with_type_args()\n+ self.try_parse_ts_type_args()\n} else {\nNone\n};\n@@ -1143,7 +1143,7 @@ impl<'a, I: Tokens> Parser<I> {\n};\nlet type_args = if self.syntax().typescript() && is!(self, '<') {\n- self.try_parse_type_args_of_ts_expr_with_type_args()\n+ self.try_parse_ts_type_args()\n} else {\nNone\n};\n@@ -1262,7 +1262,7 @@ impl<'a, I: Tokens> Parser<I> {\ndebug_assert_eq!(prop.span().hi(), span.hi());\nlet type_args = if self.syntax().typescript() && is!(self, '<') {\n- self.try_parse_type_args_of_ts_expr_with_type_args()\n+ self.try_parse_ts_type_args()\n} else {\nNone\n};\n",
"new_path": "crates/swc_ecma_parser/src/parser/expr.rs",
"old_path": "crates/swc_ecma_parser/src/parser/expr.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -506,9 +506,7 @@ impl<I: Tokens> Parser<I> {\n}\n}\n- pub(super) fn try_parse_type_args_of_ts_expr_with_type_args(\n- &mut self,\n- ) -> Option<TsTypeParamInstantiation> {\n+ pub(super) fn try_parse_ts_type_args(&mut self) -> Option<TsTypeParamInstantiation> {\ndebug_assert!(self.input.syntax().typescript());\nself.try_parse_ts(|p| {\n@@ -517,6 +515,7 @@ impl<I: Tokens> Parser<I> {\np, ',', '.', '?', ')', ']', ':', '&', '|', '^', '}', \"??\", \"==\", \"===\", \"!=\",\n\"!==\", \"&&\", \"||\"\n) || is_exact!(p, ';')\n+ || eof!(p)\n{\nOk(Some(type_args))\n} else {\n",
"new_path": "crates/swc_ecma_parser/src/parser/typescript.rs",
"old_path": "crates/swc_ecma_parser/src/parser/typescript.rs"
},
{
"change_type": "ADD",
"diff": "+let v = f<x>\n",
"new_path": "crates/swc_ecma_parser/tests/typescript/instantiation-expr/eof/input.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"type\": \"Script\",\n+ \"span\": {\n+ \"start\": 0,\n+ \"end\": 12,\n+ \"ctxt\": 0\n+ },\n+ \"body\": [\n+ {\n+ \"type\": \"VariableDeclaration\",\n+ \"span\": {\n+ \"start\": 0,\n+ \"end\": 12,\n+ \"ctxt\": 0\n+ },\n+ \"kind\": \"let\",\n+ \"declare\": false,\n+ \"declarations\": [\n+ {\n+ \"type\": \"VariableDeclarator\",\n+ \"span\": {\n+ \"start\": 4,\n+ \"end\": 12,\n+ \"ctxt\": 0\n+ },\n+ \"id\": {\n+ \"type\": \"Identifier\",\n+ \"span\": {\n+ \"start\": 4,\n+ \"end\": 5,\n+ \"ctxt\": 0\n+ },\n+ \"value\": \"v\",\n+ \"optional\": false,\n+ \"typeAnnotation\": null\n+ },\n+ \"init\": {\n+ \"type\": \"TsInstantiation\",\n+ \"span\": {\n+ \"start\": 8,\n+ \"end\": 12,\n+ \"ctxt\": 0\n+ },\n+ \"expression\": {\n+ \"type\": \"Identifier\",\n+ \"span\": {\n+ \"start\": 8,\n+ \"end\": 9,\n+ \"ctxt\": 0\n+ },\n+ \"value\": \"f\",\n+ \"optional\": false\n+ },\n+ \"typeArguments\": {\n+ \"type\": \"TsTypeParameterInstantiation\",\n+ \"span\": {\n+ \"start\": 9,\n+ \"end\": 12,\n+ \"ctxt\": 0\n+ },\n+ \"params\": [\n+ {\n+ \"type\": \"TsTypeReference\",\n+ \"span\": {\n+ \"start\": 10,\n+ \"end\": 11,\n+ \"ctxt\": 0\n+ },\n+ \"typeName\": {\n+ \"type\": \"Identifier\",\n+ \"span\": {\n+ \"start\": 10,\n+ \"end\": 11,\n+ \"ctxt\": 0\n+ },\n+ \"value\": \"x\",\n+ \"optional\": false\n+ },\n+ \"typeParams\": null\n+ }\n+ ]\n+ }\n+ },\n+ \"definite\": false\n+ }\n+ ]\n+ }\n+ ],\n+ \"interpreter\": null\n+}\n",
"new_path": "crates/swc_ecma_parser/tests/typescript/instantiation-expr/eof/input.ts.json",
"old_path": null
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
fix(es/parser): Fix a typescript instantiation expression followed by EOF (#3699)
| 1
|
fix
|
es/parser
|
317,891
|
24.02.2022 01:12:42
| 18,000
|
7aafc96e7db46325db5db72c2cf3b795b2272d65
|
feat(theme): add tiwahu theme
Simple theme, yet unlike others.
|
[
{
"change_type": "ADD",
"diff": "+{\n+ \"$schema\": \"https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json\",\n+ \"blocks\": [\n+ {\n+ \"alignment\": \"left\",\n+ \"segments\": [\n+ {\n+ \"background\": \"#880000\",\n+ \"foreground\": \"#ff8888\",\n+ \"properties\": {\n+ \"template\": \" {{ if gt .Code 0 }}\\uf00d {{ .Code }}{{ else }}\\uf42e{{ end }} \"\n+ },\n+ \"style\": \"plain\",\n+ \"type\": \"exit\"\n+ },\n+ {\n+ \"background\": \"#ffcc88\",\n+ \"foreground\": \"#222222\",\n+ \"properties\": {\n+ \"template\": \"\\uf0e7\"\n+ },\n+ \"style\": \"plain\",\n+ \"type\": \"root\"\n+ },\n+ {\n+ \"background\": \"#222222\",\n+ \"foreground\": \"#666666\",\n+ \"powerline_symbol\": \"\\ue0b8\",\n+ \"properties\": {\n+ \"template\": \" {{ if .SSHSession }}\\uf817 {{ end }}{{ .UserName }}@{{ .HostName }} \"\n+ },\n+ \"style\": \"plain\",\n+ \"type\": \"session\"\n+ },\n+ {\n+ \"background\": \"#444444\",\n+ \"foreground\": \"#cccccc\",\n+ \"powerline_symbol\": \"\\ue0b8\",\n+ \"properties\": {\n+ \"folder_icon\": \"\\u2026\",\n+ \"style\": \"mixed\",\n+ \"template\": \" {{ .Path }} \"\n+ },\n+ \"style\": \"plain\",\n+ \"type\": \"path\"\n+ },\n+ {\n+ \"background\": \"#f14e32\",\n+ \"foreground\": \"#f0efe7\",\n+ \"powerline_symbol\": \"\\ue0b8\",\n+ \"properties\": {\n+ \"branch_icon\": \"\\ue725 \",\n+ \"fetch_status\": true,\n+ \"fetch_upstream_icon\": false,\n+ \"template\": \" {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} \\uf044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \\uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \\uf692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \\uf1bb {{ .WorktreeCount }}{{ end }} \"\n+ },\n+ \"style\": \"plain\",\n+ \"type\": \"git\"\n+ },\n+ {\n+ \"background\": \"#7014eb\",\n+ \"foreground\": \"#ffffff\",\n+ \"powerline_symbol\": \"\\ue0b8\",\n+ \"properties\": {\n+ \"template\": \" \\ue77f {{ if .Unsupported }}\\uf071{{ else }}{{ .Full }}{{ end }} \"\n+ },\n+ \"style\": \"plain\",\n+ \"type\": \"dotnet\"\n+ }\n+ ],\n+ \"type\": \"prompt\"\n+ },\n+ {\n+ \"alignment\": \"left\",\n+ \"newline\": true,\n+ \"segments\": [\n+ {\n+ \"foreground\": \"#007ACC\",\n+ \"properties\": {\n+ \"template\": \"\\u276f \"\n+ },\n+ \"style\": \"plain\",\n+ \"type\": \"text\"\n+ }\n+ ],\n+ \"type\": \"prompt\"\n+ }\n+ ],\n+ \"version\": 1\n+}\n",
"new_path": "themes/tiwahu.omp.json",
"old_path": null
}
] |
Go
|
MIT License
|
jandedobbeleer/oh-my-posh
|
feat(theme): add tiwahu theme
Simple theme, yet unlike others.
| 1
|
feat
|
theme
|
815,574
|
24.02.2022 01:53:43
| -28,800
|
d739177349a092003983b9e73d884b9a40e041bd
|
feat(verification): log tx verification fr monitor
|
[
{
"change_type": "MODIFY",
"diff": "use ckb_channel::{self as channel, select, Sender};\nuse ckb_error::{Error, InternalErrorKind};\n-use ckb_logger::{self, debug, error, info, log_enabled, trace, warn};\n+use ckb_logger::Level::Trace;\n+use ckb_logger::{\n+ self, debug, error, info, log_enabled, log_enabled_target, trace, trace_target, warn,\n+};\nuse ckb_metrics::{metrics, Timer};\nuse ckb_proposal_table::ProposalTable;\n#[cfg(debug_assertions)]\n@@ -821,7 +824,7 @@ impl ChainService {\n) {\nOk((cycles, cache_entries)) => {\nlet txs_fees =\n- cache_entries.into_iter().map(|entry| entry.fee).collect();\n+ cache_entries.iter().map(|entry| entry.fee).collect();\ntxn.attach_block(b)?;\nattach_block_cell(txn, b)?;\nlet mut mut_ext = ext.clone();\n@@ -838,6 +841,20 @@ impl ChainService {\ncycles,\nself.shared.consensus().max_block_cycles()\n);\n+\n+ // log tx verification result for monitor node\n+ if log_enabled_target!(\"ckb_tx_monitor\", Trace) {\n+ for (rtx, cycles) in\n+ resolved.iter().zip(cache_entries.iter()).skip(1)\n+ {\n+ trace_target!(\n+ \"ckb_tx_monitor\",\n+ r#\"{{\"tx_hash\":\"{:#x}\",\"cycles\":{}}}\"#,\n+ rtx.transaction.hash(),\n+ cycles.cycles\n+ );\n+ }\n+ }\n}\n}\nErr(err) => {\n",
"new_path": "chain/src/chain.rs",
"old_path": "chain/src/chain.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -18,7 +18,8 @@ use ckb_chain_spec::consensus::MAX_BLOCK_PROPOSALS_LIMIT;\nuse ckb_dao::DaoCalculator;\nuse ckb_error::{AnyError, InternalErrorKind};\nuse ckb_jsonrpc_types::BlockTemplate;\n-use ckb_logger::{debug, error, info};\n+use ckb_logger::Level::Trace;\n+use ckb_logger::{debug, error, info, log_enabled_target, trace_target};\nuse ckb_network::PeerIndex;\nuse ckb_snapshot::Snapshot;\nuse ckb_store::ChainStore;\n@@ -729,6 +730,18 @@ impl TxPoolService {\n.is_vm_version_1_and_syscalls_2_enabled(epoch)\n};\n+ // log tx verification result for monitor node\n+ if log_enabled_target!(\"ckb_tx_monitor\", Trace) {\n+ if let Ok(c) = ret {\n+ trace_target!(\n+ \"ckb_tx_monitor\",\n+ r#\"{{\"tx_hash\":\"{:#x}\",\"cycles\":{}}}\"#,\n+ tx_hash,\n+ c.cycles\n+ );\n+ }\n+ }\n+\nmatch remote {\nSome((declared_cycle, peer)) => match ret {\nOk(_) => {\n",
"new_path": "tx-pool/src/process.rs",
"old_path": "tx-pool/src/process.rs"
}
] |
Rust
|
MIT License
|
nervosnetwork/ckb
|
feat(verification): log tx verification fr monitor
| 1
|
feat
|
verification
|
76,611
|
24.02.2022 04:47:20
| -3,600
|
e932353c1ed1efc692406cae51b69aa4abc9d358
|
fix: allow configure spellchecker from main cfg
|
[
{
"change_type": "MODIFY",
"diff": "@@ -48,7 +48,7 @@ class Nlu extends Clonable {\npipelineTrain: this.getPipeline(`${this.settings.tag}-train`),\npipelineProcess: this.getPipeline(`${this.settings.tag}-process`),\n});\n- this.spellCheck = new SpellCheck();\n+ this.spellCheck = new SpellCheck(this.settings);\n}\nregisterDefault() {\n",
"new_path": "packages/nlu/src/nlu.js",
"old_path": "packages/nlu/src/nlu.js"
}
] |
JavaScript
|
MIT License
|
axa-group/nlp.js
|
fix: allow configure spellchecker from main cfg
| 1
|
fix
| null |
71,568
|
24.02.2022 06:05:55
| 28,800
|
e2f6918604b56281d666498dd1dfaa5cdcd2d76c
|
chore(mergify): add TheRealAmazonKendra as core contributor in mergify
|
[
{
"change_type": "MODIFY",
"diff": "@@ -10,7 +10,7 @@ pull_request_rules:\nlabel:\nadd: [ contribution/core ]\nconditions:\n- - author~=^(eladb|RomainMuller|garnaat|nija-at|skinny85|rix0rrr|NGL321|Jerry-AWS|MrArnoldPalmer|NetaNir|iliapolo|njlynch|ericzbeard|ccfife|fulghum|pkandasamy91|SoManyHs|uttarasridhar|otaviomacedo|BenChaimberg|madeline-k|BryanPan342|kaizen3031593|comcalvi|Chriscbr|corymhall|peterwoodworth|ryparker)$\n+ - author~=^(eladb|RomainMuller|garnaat|nija-at|skinny85|rix0rrr|NGL321|Jerry-AWS|MrArnoldPalmer|NetaNir|iliapolo|njlynch|ericzbeard|ccfife|fulghum|pkandasamy91|SoManyHs|uttarasridhar|otaviomacedo|BenChaimberg|madeline-k|BryanPan342|kaizen3031593|comcalvi|Chriscbr|corymhall|peterwoodworth|ryparker|TheRealAmazonKendra)$\n- -label~=\"contribution/core\"\n- name: automatic merge\nactions:\n",
"new_path": ".mergify.yml",
"old_path": ".mergify.yml"
}
] |
TypeScript
|
Apache License 2.0
|
aws/aws-cdk
|
chore(mergify): add TheRealAmazonKendra as core contributor in mergify (#19086)
| 1
|
chore
|
mergify
|
841,385
|
24.02.2022 07:01:45
| -10,800
|
cd95ac4caf0af06db9195790707a475938a5fcb7
|
feat(css/minifier): Compress more properties
|
[
{
"change_type": "MODIFY",
"diff": "@@ -43,7 +43,9 @@ impl VisitMut for CompressDeclaration {\nif let DeclarationName::Ident(Ident { value, .. }) = &declaration.name {\nmatch &*value.to_lowercase() {\n- \"padding\" | \"margin\" | \"inset\" if declaration.value.len() > 1 => {\n+ \"padding\" | \"margin\" | \"inset\" | \"scroll-margin\" | \"scroll-padding\"\n+ if declaration.value.len() > 1 =>\n+ {\nlet top = declaration.value.get(0);\nlet right = declaration\n.value\n",
"new_path": "crates/swc_css_minifier/src/compress/declaration.rs",
"old_path": "crates/swc_css_minifier/src/compress/declaration.rs"
},
{
"change_type": "ADD",
"diff": "+.class1 {\n+ scroll-margin: 20px;\n+}\n+\n+.class2 {\n+ scroll-margin: 20px 21px 22px 23px;\n+}\n+\n+/* 4 -> 3 */\n+.class4 {\n+ scroll-margin: 20px 21px 22px 21px;\n+}\n+\n+/* 4 -> 2 */\n+.class5 {\n+ scroll-margin: 20px 21px 20px 21px;\n+}\n+\n+/* 4 -> 1 */\n+.class6 {\n+ scroll-margin: 20px 20px 20px 20px;\n+}\n+\n+/* 3 -> 2 */\n+.class7 {\n+ scroll-margin: 20px 21px 20px;\n+}\n+\n+/* 3 -> 1 */\n+.class8 {\n+ scroll-margin: 20px 20px 20px;\n+}\n+\n+/* 2 -> 1 */\n+.class10 {\n+ scroll-margin: 20px 20px;\n+}\n+\n+.class11 {\n+ scroll-margin: 20px 20px 21px;\n+}\n+\n+.class12 {\n+ scroll-margin: var(--scroll-margin);\n+}\n+\n+.class13 {\n+ scroll-margin: 20px var(--scroll-margin);\n+}\n+\n+.class14 {\n+ scroll-margin: 20px 20px var(--scroll-margin);\n+}\n+\n+.class15 {\n+ scroll-margin: 20px 20px 20px var(--scroll-margin);\n+}\n+\n+.class16 {\n+ scroll-margin: var(--scroll-margin);\n+}\n+\n+.class17 {\n+ scroll-margin: var(--scroll-margin) var(--scroll-margin);\n+}\n+\n+.class18 {\n+ scroll-margin: var(--scroll-margin) var(--scroll-margin) var(--scroll-margin) var(--scroll-margin);\n+}\n+\n+.class19 {\n+ scroll-margin: 20PX 20pX 20Px 20px;\n+}\n+\n+.class20 {\n+ scroll-margin: 20px 3em 20px 3em;\n+}\n",
"new_path": "crates/swc_css_minifier/tests/fixture/compress-declaration/scroll-margin/input.css",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+.class1{scroll-margin:20px}.class2{scroll-margin:20px 21px 22px 23px}.class4{scroll-margin:20px 21px 22px}.class5{scroll-margin:20px 21px}.class6{scroll-margin:20px}.class7{scroll-margin:20px 21px}.class8{scroll-margin:20px}.class10{scroll-margin:20px}.class11{scroll-margin:20px 20px 21px}.class12{scroll-margin:var(--scroll-margin)}.class13{scroll-margin:20px var(--scroll-margin)}.class14{scroll-margin:20px 20px var(--scroll-margin)}.class15{scroll-margin:20px 20px 20px var(--scroll-margin)}.class16{scroll-margin:var(--scroll-margin)}.class17{scroll-margin:var(--scroll-margin)var(--scroll-margin)}.class18{scroll-margin:var(--scroll-margin)var(--scroll-margin)var(--scroll-margin)var(--scroll-margin)}.class19{scroll-margin:20PX}.class20{scroll-margin:20px 3em}\n",
"new_path": "crates/swc_css_minifier/tests/fixture/compress-declaration/scroll-margin/output.min.css",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+.class1 {\n+ scroll-padding: 20px;\n+}\n+\n+.class2 {\n+ scroll-padding: 20px 21px 22px 23px;\n+}\n+\n+/* 4 -> 3 */\n+.class4 {\n+ scroll-padding: 20px 21px 22px 21px;\n+}\n+\n+/* 4 -> 2 */\n+.class5 {\n+ scroll-padding: 20px 21px 20px 21px;\n+}\n+\n+/* 4 -> 1 */\n+.class6 {\n+ scroll-padding: 20px 20px 20px 20px;\n+}\n+\n+/* 3 -> 2 */\n+.class7 {\n+ scroll-padding: 20px 21px 20px;\n+}\n+\n+/* 3 -> 1 */\n+.class8 {\n+ scroll-padding: 20px 20px 20px;\n+}\n+\n+/* 2 -> 1 */\n+.class10 {\n+ scroll-padding: 20px 20px;\n+}\n+\n+.class11 {\n+ scroll-padding: 20px 20px 21px;\n+}\n+\n+.class12 {\n+ scroll-padding: var(--scroll-padding);\n+}\n+\n+.class13 {\n+ scroll-padding: 20px var(--scroll-padding);\n+}\n+\n+.class14 {\n+ scroll-padding: 20px 20px var(--scroll-padding);\n+}\n+\n+.class15 {\n+ scroll-padding: 20px 20px 20px var(--scroll-padding);\n+}\n+\n+.class16 {\n+ scroll-padding: var(--scroll-padding);\n+}\n+\n+.class17 {\n+ scroll-padding: var(--scroll-padding) var(--scroll-padding);\n+}\n+\n+.class18 {\n+ scroll-padding: var(--scroll-padding) var(--scroll-padding) var(--scroll-padding) var(--scroll-padding);\n+}\n+\n+.class19 {\n+ scroll-padding: 20PX 20pX 20Px 20px;\n+}\n+\n+.class20 {\n+ scroll-padding: 20px 3em 20px 3em;\n+}\n",
"new_path": "crates/swc_css_minifier/tests/fixture/compress-declaration/scroll-padding/input.css",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+.class1{scroll-padding:20px}.class2{scroll-padding:20px 21px 22px 23px}.class4{scroll-padding:20px 21px 22px}.class5{scroll-padding:20px 21px}.class6{scroll-padding:20px}.class7{scroll-padding:20px 21px}.class8{scroll-padding:20px}.class10{scroll-padding:20px}.class11{scroll-padding:20px 20px 21px}.class12{scroll-padding:var(--scroll-padding)}.class13{scroll-padding:20px var(--scroll-padding)}.class14{scroll-padding:20px 20px var(--scroll-padding)}.class15{scroll-padding:20px 20px 20px var(--scroll-padding)}.class16{scroll-padding:var(--scroll-padding)}.class17{scroll-padding:var(--scroll-padding)var(--scroll-padding)}.class18{scroll-padding:var(--scroll-padding)var(--scroll-padding)var(--scroll-padding)var(--scroll-padding)}.class19{scroll-padding:20PX}.class20{scroll-padding:20px 3em}\n",
"new_path": "crates/swc_css_minifier/tests/fixture/compress-declaration/scroll-padding/output.min.css",
"old_path": null
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
feat(css/minifier): Compress more properties (#3708)
| 1
|
feat
|
css/minifier
|
841,385
|
24.02.2022 08:35:54
| -10,800
|
bff04b4afecb9a57046352aaa92e4cec0e25363b
|
feat(css/minifier): Compress alpha of values
|
[
{
"change_type": "ADD",
"diff": "+use swc_css_ast::*;\n+use swc_css_visit::{VisitMut, VisitMutWith};\n+\n+pub fn compress_alpha_value() -> impl VisitMut {\n+ CompressAlphaValue { preserve: true }\n+}\n+\n+struct CompressAlphaValue {\n+ preserve: bool,\n+}\n+\n+impl VisitMut for CompressAlphaValue {\n+ fn visit_mut_declaration(&mut self, declaration: &mut Declaration) {\n+ declaration.visit_mut_children_with(self);\n+\n+ if let DeclarationName::Ident(Ident { value, .. }) = &declaration.name {\n+ match &*value.to_lowercase() {\n+ \"opacity\" | \"fill-opacity\" | \"stroke-opacity\" | \"shape-image-threshold\" => {\n+ let old_preserve = self.preserve;\n+\n+ self.preserve = false;\n+\n+ declaration.visit_mut_children_with(self);\n+\n+ self.preserve = old_preserve;\n+ }\n+ _ => {\n+ declaration.visit_mut_children_with(self);\n+ }\n+ }\n+ }\n+ }\n+\n+ fn visit_mut_value(&mut self, value: &mut Value) {\n+ value.visit_mut_children_with(self);\n+\n+ if self.preserve {\n+ return;\n+ }\n+\n+ match value {\n+ Value::Percentage(Percentage {\n+ span,\n+ value: number,\n+ }) if number.value % 10.0 == 0.0 => {\n+ let new_value = number.value / 100.0;\n+\n+ *value = Value::Number(Number {\n+ span: *span,\n+ value: new_value,\n+ raw: new_value.to_string().into(),\n+ });\n+ }\n+ _ => {}\n+ }\n+ }\n+}\n",
"new_path": "crates/swc_css_minifier/src/compress/alpha_value.rs",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "+pub mod alpha_value;\npub mod angle;\npub mod declaration;\npub mod easing_function;\n",
"new_path": "crates/swc_css_minifier/src/compress/mod.rs",
"old_path": "crates/swc_css_minifier/src/compress/mod.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -4,7 +4,7 @@ use swc_css_ast::*;\nuse swc_css_visit::VisitMutWith;\nuse self::compress::{\n- angle::compress_angle, declaration::compress_declaration,\n+ alpha_value::compress_alpha_value, angle::compress_angle, declaration::compress_declaration,\neasing_function::compress_easing_function, empty::compress_empty,\nfrequency::compress_frequency, keyframes::compress_keyframes, length::compress_length,\nselector::compress_selector, time::compress_time,\n@@ -15,6 +15,7 @@ mod compress;\npub fn minify(stylesheet: &mut Stylesheet) {\nstylesheet.visit_mut_with(&mut compress_empty());\n+ stylesheet.visit_mut_with(&mut compress_alpha_value());\nstylesheet.visit_mut_with(&mut compress_length());\nstylesheet.visit_mut_with(&mut compress_angle());\nstylesheet.visit_mut_with(&mut compress_time());\n",
"new_path": "crates/swc_css_minifier/src/lib.rs",
"old_path": "crates/swc_css_minifier/src/lib.rs"
},
{
"change_type": "ADD",
"diff": "+.class1 {\n+ opacity: 0\n+}\n+\n+.class2 {\n+ opacity: 0%;\n+}\n+\n+.class3 {\n+ opacity: 0.5;\n+}\n+\n+.class4 {\n+ opacity: 50%;\n+}\n+\n+.class5 {\n+ opacity: 1;\n+}\n+\n+.class6 {\n+ opacity: 100%;\n+}\n+\n+.class7 {\n+ shape-image-threshold: 70%;\n+}\n+\n+.class8 {\n+ fill-opacity: 50%;\n+}\n+\n+.class9 {\n+ stroke-opacity: 50%;\n+}\n+\n+.class10 {\n+ shape-image-threshold: 50%;\n+}\n+\n+.class11 {\n+ opacity: 53%;\n+}\n+\n+.class12 {\n+ OPACITY: 0\n+}\n",
"new_path": "crates/swc_css_minifier/tests/fixture/compress-alpha-value/input.css",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+.class1{opacity:0}.class2{opacity:0}.class3{opacity:.5}.class4{opacity:.5}.class5{opacity:1}.class6{opacity:1}.class7{shape-image-threshold:.7}.class8{fill-opacity:.5}.class9{stroke-opacity:.5}.class10{shape-image-threshold:.5}.class11{opacity:53%}.class12{OPACITY:0}\n",
"new_path": "crates/swc_css_minifier/tests/fixture/compress-alpha-value/output.min.css",
"old_path": null
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
feat(css/minifier): Compress alpha of values (#3707)
| 1
|
feat
|
css/minifier
|
791,255
|
24.02.2022 09:02:22
| 28,800
|
06a5aef913e63b5b05ecf115fb96b81ef4dba253
|
docs(bigquery/storage/managedwriter): clarify experimental status
|
[
{
"change_type": "MODIFY",
"diff": "Package managedwriter provides an EXPERIMENTAL thick client around the BigQuery storage API's BigQueryWriteClient.\nMore information about this new write client may also be found in the public documentation: https://cloud.google.com/bigquery/docs/write-api\n-It is EXPERIMENTAL and subject to change or removal without notice. This library is in a pre-alpha\n-state, and breaking changes are frequent.\n+It is EXPERIMENTAL and subject to change or removal without notice. This is primarily to signal that this\n+package may still make breaking changes to existing methods and functionality.\nCurrently, this client targets the BigQueryWriteClient present in the v1 endpoint, and is intended as a more\nfeature-rich successor to the classic BigQuery streaming interface, which is presented as the Inserter abstraction\n",
"new_path": "bigquery/storage/managedwriter/doc.go",
"old_path": "bigquery/storage/managedwriter/doc.go"
}
] |
Go
|
Apache License 2.0
|
googleapis/google-cloud-go
|
docs(bigquery/storage/managedwriter): clarify experimental status (#5696)
| 1
|
docs
|
bigquery/storage/managedwriter
|
821,230
|
24.02.2022 09:48:12
| 28,800
|
acd986d53681b3840f17220b6e16fd8bb3c869f7
|
feat: remove all relevant directories on uninstall
|
[
{
"change_type": "MODIFY",
"diff": "@@ -89,6 +89,16 @@ fi\n#remove application source distribution\n[ -e \"/usr/local/lib/${config.dirname}\" ] && rm -rf \"/usr/local/lib/${config.dirname}\"\n+\n+#remove application data directory\n+[ -e \"${config.dataDir}\" ] && rm -rf \"${config.dataDir}\"\n+\n+#remove application cache directory\n+[ -e \"${config.cacheDir}\" ] && rm -rf \"${config.cacheDir}\"\n+\n+#remove application config directory\n+[ -e \"${config.configDir}\" ] && rm -rf \"${config.configDir}\"\n+\nif [ $? -eq 0 ]\nthen\necho \"[3/3] [DONE] Successfully deleted application\"\n@@ -106,10 +116,22 @@ export default class PackMacos extends Command {\nstatic description = 'pack CLI into macOS .pkg'\nstatic flags = {\n- root: Flags.string({char: 'r', description: 'path to oclif CLI root', default: '.', required: true}),\n- 'additional-cli': Flags.string({description: `an Oclif CLI other than the one listed in config.bin that should be made available to the user\n-the CLI should already exist in a directory named after the CLI that is the root of the tarball produced by \"oclif pack:tarballs\"`, hidden: true}),\n- tarball: Flags.string({char: 't', description: 'optionally specify a path to a tarball already generated by NPM', required: false}),\n+ root: Flags.string({\n+ char: 'r',\n+ description: 'path to oclif CLI root',\n+ default: '.',\n+ required: true,\n+ }),\n+ 'additional-cli': Flags.string({\n+ description: `an Oclif CLI other than the one listed in config.bin that should be made available to the user\n+the CLI should already exist in a directory named after the CLI that is the root of the tarball produced by \"oclif pack:tarballs\"`,\n+ hidden: true,\n+ }),\n+ tarball: Flags.string({\n+ char: 't',\n+ description: 'optionally specify a path to a tarball already generated by NPM',\n+ required: false,\n+ }),\n}\nasync run(): Promise<void> {\n",
"new_path": "src/commands/pack/macos.ts",
"old_path": "src/commands/pack/macos.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -203,10 +203,22 @@ export default class PackWin extends Command {\nThis command requires WINDOWS_SIGNING (prefixed with the name of your executable, e.g. OCLIF_WINDOWS_SIGNING_PASS) to be set in the environment`\nstatic flags = {\n- root: Flags.string({char: 'r', description: 'path to oclif CLI root', default: '.', required: true}),\n- 'additional-cli': Flags.string({description: `an Oclif CLI other than the one listed in config.bin that should be made available to the user\n-the CLI should already exist in a directory named after the CLI that is the root of the tarball produced by \"oclif pack:tarballs\"`, hidden: true}),\n- tarball: Flags.string({char: 't', description: 'optionally specify a path to a tarball already generated by NPM', required: false}),\n+ root: Flags.string({\n+ char: 'r',\n+ description: 'path to oclif CLI root',\n+ default: '.',\n+ required: true,\n+ }),\n+ 'additional-cli': Flags.string({\n+ description: `an Oclif CLI other than the one listed in config.bin that should be made available to the user\n+the CLI should already exist in a directory named after the CLI that is the root of the tarball produced by \"oclif pack:tarballs\"`,\n+ hidden: true,\n+ }),\n+ tarball: Flags.string({\n+ char: 't',\n+ description: 'optionally specify a path to a tarball already generated by NPM',\n+ required: false,\n+ }),\n}\nasync run(): Promise<void> {\n",
"new_path": "src/commands/pack/win.ts",
"old_path": "src/commands/pack/win.ts"
}
] |
TypeScript
|
MIT License
|
oclif/oclif
|
feat: remove all relevant directories on uninstall (#831)
| 1
|
feat
| null |
711,597
|
24.02.2022 10:09:12
| -3,600
|
2319f6b5f721e1b8558896bfc0d4cf129de2e80d
|
test(email-plugin): Fix failing test
|
[
{
"change_type": "MODIFY",
"diff": "@@ -647,12 +647,13 @@ describe('EmailPlugin', () => {\n_languageCode: LanguageCode.en,\n} as any);\n- const order = ({\n+ const order = {\ncode: 'ABCDE',\ncustomer: {\nemailAddress: 'test@test.com',\n},\n- } as Partial<Order>) as any;\n+ lines: [],\n+ } as any;\nit('filters events with wrong order state', async () => {\neventBus.publish(new OrderStateTransitionEvent('AddingItems', 'ArrangingPayment', ctx, order));\n",
"new_path": "packages/email-plugin/src/plugin.spec.ts",
"old_path": "packages/email-plugin/src/plugin.spec.ts"
}
] |
TypeScript
|
MIT License
|
vendure-ecommerce/vendure
|
test(email-plugin): Fix failing test
| 1
|
test
|
email-plugin
|
756,040
|
24.02.2022 10:57:30
| 18,000
|
2ef445e969bc960b758c1c1330eff4906ed8f765
|
test: Ensure access to reduced counterexamples from fast-check
* test: Fix use of fast-check assert
* test: propagate assertion results to fast-check callback return values
Ensures proper reporting of reduced counterexamples
* fix(store): Document SetStore method `values`
|
[
{
"change_type": "MODIFY",
"diff": "@@ -4,6 +4,7 @@ import fc from 'fast-check';\nimport { AmountMath as m, AssetKind } from '../../src/index.js';\nimport { mockBrand } from './mathHelpers/mockBrand.js';\n+import { assertionPassed } from '../../../store/test/test-store.js';\n// Perhaps makeCopyBag should coalesce duplicate labels, but for now, it does\n// not.\n@@ -28,59 +29,115 @@ const arbAmount = arbBagContents.map(contents =>\n// Note: we write P => Q as !P || Q since JS has no logical => operator\nconst implies = (p, q) => !p || q;\n-test('isEqual is a (total) equivalence relation', t => {\n- fc.assert(\n+test('isEqual is a (total) equivalence relation', async t => {\n+ await fc.assert(\nfc.property(\nfc.record({ x: arbAmount, y: arbAmount, z: arbAmount }),\n({ x, y, z }) => {\n- t.true([true, false].includes(m.isEqual(x, y))); // Total\n- t.true(m.isEqual(x, x)); // Reflexive\n- t.true(implies(m.isEqual(x, y), m.isEqual(y, x))); // Symmetric\n+ return (\n+ // Total\n+ assertionPassed(t.true([true, false].includes(m.isEqual(x, y))), () =>\n+ [true, false].includes(m.isEqual(x, y)),\n+ ) &&\n+ // Reflexive\n+ assertionPassed(t.true(m.isEqual(x, x)), () => m.isEqual(x, x)) &&\n+ // Symmetric\n+ assertionPassed(\n+ t.true(implies(m.isEqual(x, y), m.isEqual(y, x))),\n+ () => implies(m.isEqual(x, y), m.isEqual(y, x)),\n+ ) &&\n// Transitive\n- t.true(implies(m.isEqual(x, y) && m.isEqual(y, z), m.isEqual(x, z)));\n+ assertionPassed(\n+ t.true(\n+ implies(m.isEqual(x, y) && m.isEqual(y, z), m.isEqual(x, z)),\n+ ),\n+ () => implies(m.isEqual(x, y) && m.isEqual(y, z), m.isEqual(x, z)),\n+ )\n+ );\n},\n),\n);\n});\n-test('isGTE is a partial order with empty as minimum', t => {\n+test('isGTE is a partial order with empty as minimum', async t => {\nconst empty = m.makeEmpty(mockBrand, AssetKind.COPY_BAG);\n- fc.assert(\n+ await fc.assert(\nfc.property(fc.record({ x: arbAmount, y: arbAmount }), ({ x, y }) => {\n- t.true(m.isGTE(x, empty));\n- t.true([true, false].includes(m.isGTE(x, y))); // Total\n- t.true(m.isGTE(x, x)); // Reflexive\n+ return (\n+ assertionPassed(t.true(m.isGTE(x, empty)), () => m.isGTE(x, empty)) &&\n+ // Total\n+ assertionPassed(t.true([true, false].includes(m.isGTE(x, y))), () =>\n+ [true, false].includes(m.isGTE(x, y)),\n+ ) &&\n+ // Reflexive\n+ assertionPassed(t.true(m.isGTE(x, x)), () => m.isGTE(x, x)) &&\n// Antisymmetric\n- t.true(implies(m.isGTE(x, y) && m.isGTE(y, x), m.isEqual(x, y)));\n+ assertionPassed(\n+ t.true(implies(m.isGTE(x, y) && m.isGTE(y, x), m.isEqual(x, y))),\n+ () => implies(m.isGTE(x, y) && m.isGTE(y, x), m.isEqual(x, y)),\n+ )\n+ );\n}),\n);\n});\n-test('add: closed, commutative, associative, monotonic, with empty identity', t => {\n+test('add: closed, commutative, associative, monotonic, with empty identity', async t => {\nconst empty = m.makeEmpty(mockBrand, AssetKind.COPY_BAG);\n- fc.assert(\n+ await fc.assert(\nfc.property(\nfc.record({ x: arbAmount, y: arbAmount, z: arbAmount }),\n({ x, y, z }) => {\n+ return (\n// note: + for SET is not total.\n- t.truthy(m.coerce(mockBrand, m.add(x, y)));\n- t.true(m.isEqual(m.add(x, empty), x)); // Identity (right)\n- t.true(m.isEqual(m.add(empty, x), x)); // Identity (left)\n- t.true(m.isEqual(m.add(x, y), m.add(y, x))); // Commutative\n+ assertionPassed(t.truthy(m.coerce(mockBrand, m.add(x, y))), () =>\n+ m.coerce(mockBrand, m.add(x, y)),\n+ ) &&\n+ // Identity (right)\n+ assertionPassed(t.true(m.isEqual(m.add(x, empty), x)), () =>\n+ m.isEqual(m.add(x, empty), x),\n+ ) &&\n+ // Identity (left)\n+ assertionPassed(t.true(m.isEqual(m.add(empty, x), x)), () =>\n+ m.isEqual(m.add(empty, x), x),\n+ ) &&\n+ // Commutative\n+ assertionPassed(t.true(m.isEqual(m.add(x, y), m.add(y, x))), () =>\n+ m.isEqual(m.add(x, y), m.add(y, x)),\n+ ) &&\n// Associative\n- t.true(m.isEqual(m.add(m.add(x, y), z), m.add(x, m.add(y, z))));\n- t.true(m.isGTE(m.add(x, y), x)); // Monotonic (left)\n- t.true(m.isGTE(m.add(x, y), y)); // Monotonic (right)\n+ assertionPassed(\n+ t.true(m.isEqual(m.add(m.add(x, y), z), m.add(x, m.add(y, z)))),\n+ () => m.isEqual(m.add(m.add(x, y), z), m.add(x, m.add(y, z))),\n+ ) &&\n+ // Monotonic (left)\n+ assertionPassed(t.true(m.isGTE(m.add(x, y), x)), () =>\n+ m.isGTE(m.add(x, y), x),\n+ ) &&\n+ // Monotonic (right)\n+ assertionPassed(t.true(m.isGTE(m.add(x, y), y)), () =>\n+ m.isGTE(m.add(x, y), y),\n+ )\n+ );\n},\n),\n);\n});\n-test('subtract: (x + y) - y = x; (y - x) + x = y if y >= x', t => {\n- fc.assert(\n+test('subtract: (x + y) - y = x; (y - x) + x = y if y >= x', async t => {\n+ await fc.assert(\nfc.property(fc.record({ x: arbAmount, y: arbAmount }), ({ x, y }) => {\n- t.true(m.isEqual(m.subtract(m.add(x, y), y), x));\n- t.true(m.isGTE(y, x) ? m.isEqual(m.add(m.subtract(y, x), x), y) : true);\n+ return (\n+ assertionPassed(t.true(m.isEqual(m.subtract(m.add(x, y), y), x)), () =>\n+ m.isEqual(m.subtract(m.add(x, y), y), x),\n+ ) &&\n+ assertionPassed(\n+ t.true(\n+ m.isGTE(y, x) ? m.isEqual(m.add(m.subtract(y, x), x), y) : true,\n+ ),\n+ () =>\n+ m.isGTE(y, x) ? m.isEqual(m.add(m.subtract(y, x), x), y) : true,\n+ )\n+ );\n}),\n);\n});\n",
"new_path": "packages/ERTP/test/unitTests/test-amountProperties.js",
"old_path": "packages/ERTP/test/unitTests/test-amountProperties.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -37,8 +37,8 @@ const withinEpsilon = (left, right) =>\nmultiply(right, 105) >= multiply(left, 100) &&\nmultiply(left, 105) >= multiply(right, 100);\n-test('balancesToReachRatio calculations are to spec', t => {\n- fc.assert(\n+test('balancesToReachRatio calculations are to spec', async t => {\n+ await fc.assert(\nfc.property(\nfc.record({\npoolX: arbPoolX,\n@@ -56,6 +56,8 @@ test('balancesToReachRatio calculations are to spec', t => {\nmultiply(poolX.value, poolY.value),\n),\n);\n+ let ok = true;\n+\nconst { targetX, targetY } = balancesToReachRatio(\npoolX,\npoolY,\n@@ -71,6 +73,7 @@ test('balancesToReachRatio calculations are to spec', t => {\ntargetWithinRangeOfK,\n`with giveX=${giveX.value} giveY=${giveY.value}, targetX=${targetX.value} and targetY=${targetY.value} should have the same product as poolX=${poolX.value} * poolY=${poolY.value}.`,\n);\n+ if (!targetWithinRangeOfK) ok = false;\n// target X / targetY approximately equals poolXAfter / poolYAfter\nconst ratiosWithinRange = withinEpsilon(\n@@ -79,11 +82,13 @@ test('balancesToReachRatio calculations are to spec', t => {\n// @ts-ignore targetY.value is a Nat\ntargetY.value * add(poolX.value, giveX.value),\n);\n-\nt.truthy(\nratiosWithinRange,\n`targetX ${targetX.value} and targetY ${targetY.value} should be in the same ratio as poolX + giveX / poolY + giveY`,\n);\n+ if (!ratiosWithinRange) ok = false;\n+\n+ return ok;\n},\n),\n);\n",
"new_path": "packages/run-protocol/test/amm/vpool-xyk-amm/test-amm-calc.js",
"old_path": "packages/run-protocol/test/amm/vpool-xyk-amm/test-amm-calc.js"
},
{
"change_type": "MODIFY",
"diff": "* Remove the key. Throws if not found.\n* @property {(keys: Iterable<K>) => void} addAll\n* @property {(keyPatt?: Pattern) => Iterable<K>} keys\n+ * @property {(keyPatt?: Pattern) => Iterable<K>} values\n* @property {(keyPatt?: Pattern) => CopySet<K>} snapshot\n* @property {(keyPatt?: Pattern) => number} getSize\n* @property {(keyPatt?: Pattern) => void} clear\n",
"new_path": "packages/store/src/types.js",
"old_path": "packages/store/src/types.js"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
test: Ensure access to reduced counterexamples from fast-check (#4631)
* test: Fix use of fast-check assert
* test: propagate assertion results to fast-check callback return values
Ensures proper reporting of reduced counterexamples
* fix(store): Document SetStore method `values`
| 1
|
test
| null |
777,360
|
24.02.2022 11:00:30
| 18,000
|
b828db78955610f44b660920b77a36b1ba0abd0e
|
fix: nightly test errors for BYOL.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -336,6 +336,9 @@ def test_data_layer_mnist_tf_keras_accuracy() -> None:\n@pytest.mark.nightly\ndef test_cifar10_byol_pytorch_accuracy() -> None:\nconfig = conf.load_config(conf.cv_examples_path(\"byol_pytorch/const-cifar10.yaml\"))\n+ # Limit convergence time, since was running over 30 minute limit.\n+ config[\"searcher\"][\"max_length\"][\"epochs\"] = 20\n+ config[\"hyperparameters\"][\"classifier\"][\"train_epochs\"] = 1\nconfig = conf.set_random_seed(config, 1591280374)\nexperiment_id = exp.run_basic_test_with_temp_config(\nconfig, conf.cv_examples_path(\"byol_pytorch\"), 1\n@@ -350,7 +353,8 @@ def test_cifar10_byol_pytorch_accuracy() -> None:\nif step.get(\"validation\")\n]\n- target_accuracy = 0.70\n+ # Accuracy reachable within limited convergence time -- goes higher given full training.\n+ target_accuracy = 0.40\nassert max(validation_accuracies) > target_accuracy, (\n\"cifar10_byol_pytorch did not reach minimum target accuracy {} in {} steps.\"\n\" full validation accuracy history: {}\".format(\n",
"new_path": "e2e_tests/tests/nightly/test_convergence.py",
"old_path": "e2e_tests/tests/nightly/test_convergence.py"
},
{
"change_type": "MODIFY",
"diff": "@@ -3,6 +3,7 @@ entrypoint: model_def:BYOLTrial\nrecords_per_epoch: 45000\nresources:\nslots_per_trial: 1\n+ shm_size: 17179869184\nmin_validation_period:\nepochs: 2\n",
"new_path": "examples/computer_vision/byol_pytorch/const-cifar10.yaml",
"old_path": "examples/computer_vision/byol_pytorch/const-cifar10.yaml"
},
{
"change_type": "MODIFY",
"diff": "@@ -3,6 +3,7 @@ entrypoint: model_def:BYOLTrial\nrecords_per_epoch: 1271158\nresources:\nslots_per_trial: 64\n+ shm_size: 17179869184\nmin_checkpoint_period:\nepochs: 1\nmin_validation_period:\n",
"new_path": "examples/computer_vision/byol_pytorch/distributed-imagenet.yaml",
"old_path": "examples/computer_vision/byol_pytorch/distributed-imagenet.yaml"
},
{
"change_type": "MODIFY",
"diff": "@@ -6,6 +6,7 @@ entrypoint: model_def:BYOLTrial\nrecords_per_epoch: 105000\nresources:\nslots_per_trial: 8\n+ shm_size: 17179869184\nmin_validation_period:\nepochs: 2\n",
"new_path": "examples/computer_vision/byol_pytorch/distributed-stl10.yaml",
"old_path": "examples/computer_vision/byol_pytorch/distributed-stl10.yaml"
}
] |
Python
|
Apache License 2.0
|
determined-ai/determined
|
fix: nightly test errors for BYOL. (#3652)
| 1
|
fix
| null |
777,395
|
24.02.2022 11:34:04
| 28,800
|
c5f42f349e23c80db92099a5f84c017a8ce38d06
|
fix: refreshing profiler results in blank screen
|
[
{
"change_type": "MODIFY",
"diff": "@@ -53,7 +53,7 @@ const SystemMetricFilter: React.FC = () => {\nstyle={{ width: 220 }}\nvalue={settings.agentId}\nonChange={handleChangeAgentId}>\n- {settings.name && Object.keys(systemSeries[settings.name]).map(agentId => (\n+ {settings.name && systemSeries && Object.keys(systemSeries[settings.name]).map(agentId => (\n<Option key={agentId} value={agentId}>{agentId}</Option>\n))}\n</SelectFilter>\n",
"new_path": "webui/react/src/pages/TrialDetails/Profiles/SystemMetricFilter.tsx",
"old_path": "webui/react/src/pages/TrialDetails/Profiles/SystemMetricFilter.tsx"
}
] |
Python
|
Apache License 2.0
|
determined-ai/determined
|
fix: refreshing profiler results in blank screen [DET-6673] (#3658)
| 1
|
fix
| null |
791,370
|
24.02.2022 11:36:50
| 25,200
|
3a81108c74cd8864c56b8ab5939afd864db3c64b
|
fix(internal/gapicgen): don't gen version files for longrunning and debugger
|
[
{
"change_type": "MODIFY",
"diff": "@@ -316,6 +316,12 @@ func (g *GapicGenerator) microgen(conf *microgenConfig) error {\n}\nfunc (g *GapicGenerator) genVersionFile(conf *microgenConfig) error {\n+ // These directories are not modules on purpose, don't generate a version\n+ // file for them.\n+ if conf.importPath == \"cloud.google.com/go/longrunning/autogen\" ||\n+ conf.importPath == \"cloud.google.com/go/debugger/apiv2\" {\n+ return nil\n+ }\nrelDir := strings.TrimPrefix(conf.importPath, \"cloud.google.com/go/\")\nrootPackage := strings.Split(relDir, \"/\")[0]\nrootModInternal := fmt.Sprintf(\"cloud.google.com/go/%s/internal\", rootPackage)\n",
"new_path": "internal/gapicgen/generator/gapics.go",
"old_path": "internal/gapicgen/generator/gapics.go"
}
] |
Go
|
Apache License 2.0
|
googleapis/google-cloud-go
|
fix(internal/gapicgen): don't gen version files for longrunning and debugger (#5698)
| 1
|
fix
|
internal/gapicgen
|
426,750
|
24.02.2022 12:18:58
| 18,000
|
88a38abf3efaa5d44d91dc7b412545fb36ba37d1
|
feat(test-runner-core): allow http2/ssl opts in config
|
[
{
"change_type": "ADD",
"diff": "+---\n+'@web/test-runner-core': patch\n+---\n+\n+Allow http2/ssl options to be set in WTR config\n",
"new_path": ".changeset/unlucky-radios-peel.md",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -33,6 +33,10 @@ export interface TestRunnerCoreConfig {\nhostname: string;\nport: number;\n+ http2?: boolean;\n+ sslKey?: string;\n+ sslCert?: string;\n+\nbrowsers: BrowserLauncher[];\ntestFramework?: TestFramework;\nlogger: Logger;\n",
"new_path": "packages/test-runner-core/src/config/TestRunnerCoreConfig.ts",
"old_path": "packages/test-runner-core/src/config/TestRunnerCoreConfig.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -40,6 +40,10 @@ export class TestRunnerServer {\nrootDir,\ninjectWebSocket: true,\n+ http2: config.http2,\n+ sslKey: config.sslKey,\n+ sslCert: config.sslCert,\n+\nmimeTypes: config.mimeTypes,\nmiddleware: [\nwatchFilesMiddleware({ runSessions, sessions, rootDir, fileWatcher: this.fileWatcher }),\n",
"new_path": "packages/test-runner-core/src/server/TestRunnerServer.ts",
"old_path": "packages/test-runner-core/src/server/TestRunnerServer.ts"
}
] |
TypeScript
|
MIT License
|
modernweb-dev/web
|
feat(test-runner-core): allow http2/ssl opts in config
| 1
|
feat
|
test-runner-core
|
711,597
|
24.02.2022 12:37:39
| -3,600
|
16e099f18ee00534a81c4a1dd9e97cb354c73e97
|
feat(core): Add OrderLineEvent, to notify on changes to Order.lines
Closes
|
[
{
"change_type": "ADD",
"diff": "+import { RequestContext } from '../../api/common/request-context';\n+import { Order, OrderLine } from '../../entity';\n+import { VendureEvent } from '../vendure-event';\n+\n+/**\n+ * @description\n+ * This event is fired whenever an {@link OrderLine} is added, updated\n+ * or deleted.\n+ *\n+ * @docsCategory events\n+ * @docsPage Event Types\n+ */\n+export class OrderLineEvent extends VendureEvent {\n+ constructor(\n+ public ctx: RequestContext,\n+ public order: Order,\n+ public orderLine: OrderLine,\n+ public type: 'created' | 'updated' | 'deleted',\n+ ) {\n+ super();\n+ }\n+}\n",
"new_path": "packages/core/src/event-bus/events/order-line-event.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -28,6 +28,8 @@ export * from './events/identifier-change-event';\nexport * from './events/identifier-change-request-event';\nexport * from './events/login-event';\nexport * from './events/logout-event';\n+export * from './events/order-event';\n+export * from './events/order-line-event';\nexport * from './events/order-placed-event';\nexport * from './events/order-state-transition-event';\nexport * from './events/password-reset-event';\n",
"new_path": "packages/core/src/event-bus/index.ts",
"old_path": "packages/core/src/event-bus/index.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -28,6 +28,8 @@ import { ProductVariant } from '../../../entity/product-variant/product-variant.\nimport { Promotion } from '../../../entity/promotion/promotion.entity';\nimport { ShippingLine } from '../../../entity/shipping-line/shipping-line.entity';\nimport { Surcharge } from '../../../entity/surcharge/surcharge.entity';\n+import { EventBus } from '../../../event-bus/event-bus';\n+import { OrderLineEvent } from '../../../event-bus/index';\nimport { CountryService } from '../../services/country.service';\nimport { PaymentService } from '../../services/payment.service';\nimport { ProductVariantService } from '../../services/product-variant.service';\n@@ -59,6 +61,7 @@ export class OrderModifier {\nprivate stockMovementService: StockMovementService,\nprivate productVariantService: ProductVariantService,\nprivate customFieldRelationService: CustomFieldRelationService,\n+ private eventBus: EventBus,\n) {}\n/**\n@@ -139,6 +142,7 @@ export class OrderModifier {\n);\norder.lines.push(lineWithRelations);\nawait this.connection.getRepository(ctx, Order).save(order, { reload: false });\n+ this.eventBus.publish(new OrderLineEvent(ctx, order, lineWithRelations, 'created'));\nreturn lineWithRelations;\n}\n@@ -216,6 +220,7 @@ export class OrderModifier {\n}\n}\nawait this.connection.getRepository(ctx, OrderLine).save(orderLine);\n+ this.eventBus.publish(new OrderLineEvent(ctx, order, orderLine, 'updated'));\nreturn orderLine;\n}\n",
"new_path": "packages/core/src/service/helpers/order-modifier/order-modifier.ts",
"old_path": "packages/core/src/service/helpers/order-modifier/order-modifier.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -89,10 +89,11 @@ import { ShippingLine } from '../../entity/shipping-line/shipping-line.entity';\nimport { Surcharge } from '../../entity/surcharge/surcharge.entity';\nimport { User } from '../../entity/user/user.entity';\nimport { EventBus } from '../../event-bus/event-bus';\n-import { CouponCodeEvent } from '../../event-bus/events/coupon-code-event';\n-import { OrderEvent } from '../../event-bus/events/order-event';\n-import { OrderStateTransitionEvent } from '../../event-bus/events/order-state-transition-event';\n-import { RefundStateTransitionEvent } from '../../event-bus/events/refund-state-transition-event';\n+import { CouponCodeEvent } from '../../event-bus/index';\n+import { OrderEvent } from '../../event-bus/index';\n+import { OrderStateTransitionEvent } from '../../event-bus/index';\n+import { RefundStateTransitionEvent } from '../../event-bus/index';\n+import { OrderLineEvent } from '../../event-bus/index';\nimport { CustomFieldRelationService } from '../helpers/custom-field-relation/custom-field-relation.service';\nimport { FulfillmentState } from '../helpers/fulfillment-state-machine/fulfillment-state';\nimport { ListQueryBuilder } from '../helpers/list-query-builder/list-query-builder';\n@@ -513,6 +514,7 @@ export class OrderService {\nif (correctedQuantity === 0) {\norder.lines = order.lines.filter(l => !idsAreEqual(l.id, orderLine.id));\nawait this.connection.getRepository(ctx, OrderLine).remove(orderLine);\n+ this.eventBus.publish(new OrderLineEvent(ctx, order, orderLine, 'deleted'));\nupdatedOrderLines = [];\n} else {\nawait this.orderModifier.updateOrderLineQuantity(ctx, orderLine, correctedQuantity, order);\n@@ -544,6 +546,7 @@ export class OrderService {\norder.lines = order.lines.filter(line => !idsAreEqual(line.id, orderLineId));\nconst updatedOrder = await this.applyPriceAdjustments(ctx, order);\nawait this.connection.getRepository(ctx, OrderLine).remove(orderLine);\n+ this.eventBus.publish(new OrderLineEvent(ctx, order, orderLine, 'deleted'));\nreturn updatedOrder;\n}\n",
"new_path": "packages/core/src/service/services/order.service.ts",
"old_path": "packages/core/src/service/services/order.service.ts"
}
] |
TypeScript
|
MIT License
|
vendure-ecommerce/vendure
|
feat(core): Add OrderLineEvent, to notify on changes to Order.lines
Closes #1316
| 1
|
feat
|
core
|
722,013
|
24.02.2022 12:44:42
| 21,600
|
916a8331c80193ebc70236fc18091b883091316b
|
chore: update homepage badge
|
[
{
"change_type": "MODIFY",
"diff": "**Isolated Vue component development environment with a living style guide**\n<div>\n-<a href=\"https://travis-ci.com/github/vue-styleguidist/vue-styleguidist\">\n- <img src=\"https://travis-ci.com/vue-styleguidist/vue-styleguidist.svg?branch=dev\" alt=\"Travis CI (unit & lint)\">\n-</a>\n+\n+[](https://github.com/vue-styleguidist/vue-styleguidist/actions/workflows/test.yml)\n+\n<a href=\"https://circleci.com/gh/vue-styleguidist/vue-styleguidist\">\n<img src=\"https://circleci.com/gh/vue-styleguidist/vue-styleguidist.svg?style=shield\" alt=\"Circle CI (integration)\">\n</a>\n",
"new_path": "README.md",
"old_path": "README.md"
}
] |
TypeScript
|
MIT License
|
vue-styleguidist/vue-styleguidist
|
chore: update homepage badge
| 1
|
chore
| null |
756,043
|
24.02.2022 13:50:06
| 28,800
|
34690b552adda168ac9603831eaccf064418478e
|
chore(swingset-vat): remove fake weakref leftover from Node 12 compatibility
|
[
{
"change_type": "MODIFY",
"diff": "// @ts-check\n-/* global globalThis */\n+/* global globalThis, WeakRef, FinalizationRegistry */\nimport fs from 'fs';\nimport process from 'process';\n@@ -16,7 +16,6 @@ import { xsnap, recordXSnap } from '@agoric/xsnap';\nimport { computeBundleID } from './validate-archive.js';\nimport { createSHA256 } from './hasher.js';\nimport engineGC from './engine-gc.js';\n-import { WeakRef, FinalizationRegistry } from './weakref.js';\nimport { startSubprocessWorker } from './spawnSubprocessWorker.js';\nimport { waitUntilQuiescent } from './waitUntilQuiescent.js';\nimport { makeGcAndFinalize } from './gc-and-finalize.js';\n",
"new_path": "packages/SwingSet/src/controller.js",
"old_path": "packages/SwingSet/src/controller.js"
},
{
"change_type": "MODIFY",
"diff": "// @ts-check\n+/* global WeakRef, FinalizationRegistry */\n// this file is loaded at the start of a new Worker, which makes it a new JS\n// environment (with it's own Realm), so we must install-ses too.\nimport '@endo/init';\n@@ -10,7 +11,6 @@ import { assert, details as X } from '@agoric/assert';\nimport { importBundle } from '@endo/import-bundle';\nimport { makeMarshal } from '@endo/marshal';\nimport engineGC from '../../engine-gc.js';\n-import { WeakRef, FinalizationRegistry } from '../../weakref.js';\nimport { makeGcAndFinalize } from '../../gc-and-finalize.js';\nimport { waitUntilQuiescent } from '../../waitUntilQuiescent.js';\nimport { makeDummyMeterControl } from '../dummyMeterControl.js';\n",
"new_path": "packages/SwingSet/src/kernel/vatManager/supervisor-nodeworker.js",
"old_path": "packages/SwingSet/src/kernel/vatManager/supervisor-nodeworker.js"
},
{
"change_type": "MODIFY",
"diff": "// @ts-check\n+/* global WeakRef, FinalizationRegistry */\n// this file is loaded at the start of a new subprocess\nimport '@endo/init';\n@@ -10,7 +11,6 @@ import { assert, details as X } from '@agoric/assert';\nimport { importBundle } from '@endo/import-bundle';\nimport { makeMarshal } from '@endo/marshal';\nimport engineGC from '../../engine-gc.js';\n-import { WeakRef, FinalizationRegistry } from '../../weakref.js';\nimport { makeGcAndFinalize } from '../../gc-and-finalize.js';\nimport { makeDummyMeterControl } from '../dummyMeterControl.js';\nimport {\n",
"new_path": "packages/SwingSet/src/kernel/vatManager/supervisor-subprocess-node.js",
"old_path": "packages/SwingSet/src/kernel/vatManager/supervisor-subprocess-node.js"
},
{
"change_type": "DELETE",
"diff": "-/* global globalThis */\n-import { assert, details as X } from '@agoric/assert';\n-import { isObject } from '@endo/marshal';\n-\n-const { defineProperties } = Object;\n-\n-/*\n- * We retain a measure of compatibility with Node.js v12, which does not\n- * expose WeakRef or FinalizationRegistry (there is a --flag for it, but it's\n- * not clear how stable it is). When running on a platform without these\n- * tools, vats cannot do GC, and the tools they get will be no-ops. WeakRef\n- * instances will hold a strong reference, and the FinalizationRegistry will\n- * never invoke the callbacks.\n- *\n- * Modules should do:\n- *\n- * import { WeakRef, FinalizationRegistry } from '.../weakref';\n- *\n- */\n-\n-// TODO We need to migrate this into a ses-level tame-weakref.js, to happen\n-// as part of `lockdown`. In anticipation, this uses some of the patterns\n-// followed by the other tamings there.\n-\n-// Emulate the internal [[WeakRefTarget]] slot. Despite the term \"Weak\" in the\n-// \"WeakMap\" used in the emulation, this map holds the target strongly. The only\n-// weakness here is that the weakref,target pair can go away together if the\n-// weakref is not reachable.\n-const weakRefTarget = new WeakMap();\n-\n-const FakeWeakRef = function WeakRef(target) {\n- assert(\n- new.target !== undefined,\n- X`WeakRef Constructor requires 'new'`,\n- TypeError,\n- );\n- assert(isObject(target), X`WeakRef target must be an object`, TypeError);\n- weakRefTarget.set(this, target);\n-};\n-\n-const InertWeakRef = function WeakRef(_target) {\n- throw new TypeError('Not available');\n-};\n-\n-const FakeWeakRefPrototype = {\n- deref() {\n- return weakRefTarget.get(this);\n- },\n- [Symbol.toStringTag]: 'WeakRef',\n-};\n-\n-defineProperties(FakeWeakRef, {\n- prototype: { value: FakeWeakRefPrototype },\n-});\n-\n-const WeakRef = globalThis.WeakRef || FakeWeakRef;\n-\n-// If there is a real WeakRef constructor, we still make it safe before\n-// exporting it. Unlike https://github.com/tc39/ecma262/issues/2214\n-// rather than deleting the `constructor` property, we follow the other\n-// taming patterns and point it at a throw-only inert one.\n-defineProperties(WeakRef.prototype, {\n- constructor: { value: InertWeakRef },\n-});\n-\n-harden(WeakRef);\n-\n-export { WeakRef };\n-\n-// /////////////////////////////////////////////////////////////////////////////\n-\n-const FakeFinalizationRegistry = function FinalizationRegistry(\n- cleanupCallback,\n-) {\n- assert(\n- new.target !== undefined,\n- X`FinalizationRegistry Constructor requires 'new'`,\n- TypeError,\n- );\n- assert.typeof(\n- cleanupCallback,\n- 'function',\n- X`cleanupCallback must be a function`,\n- );\n- // fall off the end with an empty instance\n-};\n-\n-const InertFinalizationRegistry = function FinalizationRegistry(\n- _cleanupCallback,\n-) {\n- throw new TypeError('Not available');\n-};\n-\n-const FakeFinalizationRegistryPrototype = {\n- register() {},\n- unregister() {},\n- [Symbol.toStringTag]: 'FinalizationRegistry',\n-};\n-\n-defineProperties(FakeFinalizationRegistry, {\n- prototype: { value: FakeFinalizationRegistryPrototype },\n-});\n-\n-const FinalizationRegistry =\n- globalThis.FinalizationRegistry || FakeFinalizationRegistry;\n-\n-// If there is a real FinalizationRegistry constructor, we still make it safe\n-// before exporting it. Rather than deleting the `constructor` property, we\n-// follow the other taming patterns and point it at a throw-only inert one.\n-defineProperties(FinalizationRegistry.prototype, {\n- constructor: { value: InertFinalizationRegistry },\n-});\n-\n-harden(FinalizationRegistry);\n-\n-export { FinalizationRegistry };\n",
"new_path": null,
"old_path": "packages/SwingSet/src/weakref.js"
},
{
"change_type": "MODIFY",
"diff": "+/* global WeakRef, FinalizationRegistry */\nimport engineGC from '../src/engine-gc.js';\n-import { WeakRef, FinalizationRegistry } from '../src/weakref.js';\nimport { waitUntilQuiescent } from '../src/waitUntilQuiescent.js';\nimport { makeGcAndFinalize } from '../src/gc-and-finalize.js';\nimport { makeDummyMeterControl } from '../src/kernel/dummyMeterControl.js';\n",
"new_path": "packages/SwingSet/test/liveslots-helpers.js",
"old_path": "packages/SwingSet/test/liveslots-helpers.js"
},
{
"change_type": "DELETE",
"diff": "-import { test } from '../tools/prepare-test-env-ava.js';\n-\n-import { WeakRef, FinalizationRegistry } from '../src/weakref.js';\n-\n-// We don't test that WeakRefs actually work, we only make sure we can\n-// interact with them without crashing. This exercises the fake no-op WeakRef\n-// and FinalizationRegistry that our `src/weakref.js` creates on Node.js v12.\n-// On v14 we get real constructors.\n-\n-test('weakref is callable', async t => {\n- const obj = {};\n- const wr = new WeakRef(obj);\n- t.is(obj, wr.deref());\n-\n- const callback = () => 0;\n- const fr = new FinalizationRegistry(callback);\n- fr.register(obj);\n-\n- const obj2 = {};\n- const handle = {};\n- fr.register(obj2, handle);\n- fr.unregister(handle);\n-});\n",
"new_path": null,
"old_path": "packages/SwingSet/test/test-fake-weakref.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -38,16 +38,7 @@ async function provokeGC(myGC) {\nreturn { wrState, finalizerState };\n}\n-let ltest = test;\n-if (\n- typeof WeakRef !== 'function' ||\n- typeof FinalizationRegistry !== 'function'\n-) {\n- // Node-12.x lacks both, but we can still test xsnap below\n- ltest = test.skip;\n-}\n-\n-ltest(`can provoke gc on Node.js`, async t => {\n+test(`can provoke gc on Node.js`, async t => {\nconst { wrState, finalizerState } = await provokeGC(engineGC);\nt.is(wrState, 'weakref is dead');\nt.is(finalizerState, 'finalizer was called');\n",
"new_path": "packages/SwingSet/test/test-gc-and-finalize.js",
"old_path": "packages/SwingSet/test/test-gc-and-finalize.js"
},
{
"change_type": "MODIFY",
"diff": "+/* global WeakRef, FinalizationRegistry */\n// eslint-disable-next-line import/order\nimport anylogger from 'anylogger';\nimport { test } from '../tools/prepare-test-env-ava.js';\n-import { WeakRef, FinalizationRegistry } from '../src/weakref.js';\nimport { waitUntilQuiescent } from '../src/waitUntilQuiescent.js';\nimport { createSHA256 } from '../src/hasher.js';\n",
"new_path": "packages/SwingSet/test/test-gc-kernel.js",
"old_path": "packages/SwingSet/test/test-gc-kernel.js"
},
{
"change_type": "MODIFY",
"diff": "-/* global setImmediate */\n+/* global setImmediate, WeakRef, FinalizationRegistry */\n// eslint-disable-next-line import/order\nimport { test } from '../tools/prepare-test-env-ava.js';\nimport { Far } from '@endo/marshal';\nimport { makePromiseKit } from '@endo/promise-kit';\n-import { WeakRef, FinalizationRegistry } from '../src/weakref.js';\nimport { makeDummyMeterControl } from '../src/kernel/dummyMeterControl.js';\nimport { makeMarshaller } from '../src/kernel/liveSlots.js';\n",
"new_path": "packages/SwingSet/test/test-marshal.js",
"old_path": "packages/SwingSet/test/test-marshal.js"
},
{
"change_type": "MODIFY",
"diff": "+/* global WeakRef, FinalizationRegistry */\n// eslint-disable-next-line import/order\nimport { test } from '../tools/prepare-test-env-ava.js';\nimport anylogger from 'anylogger';\nimport { assert, details as X } from '@agoric/assert';\n-import { WeakRef, FinalizationRegistry } from '../src/weakref.js';\nimport { waitUntilQuiescent } from '../src/waitUntilQuiescent.js';\nimport { createSHA256 } from '../src/hasher.js';\nimport { provideHostStorage } from '../src/hostStorage.js';\n",
"new_path": "packages/SwingSet/test/test-vpid-kernel.js",
"old_path": "packages/SwingSet/test/test-vpid-kernel.js"
},
{
"change_type": "MODIFY",
"diff": "+/* global WeakRef, FinalizationRegistry */\nimport anylogger from 'anylogger';\nimport { waitUntilQuiescent } from '../src/waitUntilQuiescent.js';\nimport { provideHostStorage } from '../src/hostStorage.js';\n-import { WeakRef, FinalizationRegistry } from '../src/weakref.js';\nimport { createSHA256 } from '../src/hasher.js';\nimport { extractMessage, capdata, capargs, ignore } from './vat-util.js';\n",
"new_path": "packages/SwingSet/test/util.js",
"old_path": "packages/SwingSet/test/util.js"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
chore(swingset-vat): remove fake weakref leftover from Node 12 compatibility
| 1
|
chore
|
swingset-vat
|
756,043
|
24.02.2022 14:00:11
| 28,800
|
18c268e60246e30dcd82b0b735ee4e4783294158
|
test: rely on npm 'engines' field to enforce Node version
|
[
{
"change_type": "DELETE",
"diff": "-// eslint-disable-next-line no-redeclare\n-/* global process */\n-import { test } from '../tools/prepare-test-env-ava.js';\n-\n-// eslint-disable-next-line import/order\n-import semver from 'semver';\n-\n-test('Node version for IO queue priority', t => {\n- t.true(\n- semver.satisfies(process.version, '>=11.0'),\n- 'we need Node 11 where the IO queue is higher priority than the Promise queue',\n- );\n-});\n-\n-test('Node version', t => {\n- t.true(\n- semver.satisfies(process.version, '>=12.14.1'),\n- 'we only test against Node 12.14.1 (LTS)',\n- );\n-});\n",
"new_path": null,
"old_path": "packages/SwingSet/test/test-node-version.js"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
test: rely on npm 'engines' field to enforce Node version
| 1
|
test
| null |
942,613
|
24.02.2022 14:08:13
| 25,200
|
6e10f4ff5f471f70a73a8f582815f037ed6abebe
|
fix: Fix Box valid prop passing
Fixes:
[category:Components]
|
[
{
"change_type": "MODIFY",
"diff": "import * as React from 'react';\nimport styled from '@emotion/styled';\nimport isPropValid from '@emotion/is-prop-valid';\n-import {createComponent, StyledType} from '@workday/canvas-kit-react/common';\n+import {createComponent, StyledType, useConstant} from '@workday/canvas-kit-react/common';\n// style props\nimport {border, BorderStyleProps} from './utils/border';\n@@ -28,7 +28,8 @@ const shouldForwardProp = (prop: string) => {\nreturn isPropValid(prop) && !omittedProps.includes(prop);\n};\n-const StyledBox = styled('div', {shouldForwardProp})<StyledType & BoxProps>(\n+// Meant to be used with elements. The `shouldForwardProps` will remove all style props\n+const StyledBoxElement = styled('div', {shouldForwardProp})<StyledType & BoxProps>(\n{\nboxSizing: 'border-box',\n},\n@@ -41,6 +42,19 @@ const StyledBox = styled('div', {shouldForwardProp})<StyledType & BoxProps>(\nspace\n);\n+// Meant to be used with components. There is no `shouldForwardProps` - all props will be forwarded to the component\n+const StyledBoxComponent = styled('div')<StyledType & BoxProps>(\n+ {\n+ boxSizing: 'border-box',\n+ },\n+ border,\n+ color,\n+ depth,\n+ flexItem,\n+ layout,\n+ position,\n+ space\n+);\n/**\n* `Box` is a primitive component that provides a common, ergonomic API around Canvas design tokens.\n* It is highly flexible, and its primary purpose is to build other components.\n@@ -61,10 +75,13 @@ const StyledBox = styled('div', {shouldForwardProp})<StyledType & BoxProps>(\nexport const Box = createComponent('div')({\ndisplayName: 'Box',\nComponent: ({children, ...elemProps}: BoxProps, ref, Element) => {\n+ const BoxComponent = useConstant(() =>\n+ typeof Element === 'string' ? StyledBoxElement : StyledBoxComponent\n+ );\nreturn (\n- <StyledBox as={Element} ref={ref} {...elemProps}>\n+ <BoxComponent as={Element} ref={ref} {...elemProps}>\n{children}\n- </StyledBox>\n+ </BoxComponent>\n);\n},\n});\n",
"new_path": "modules/labs-react/common/lib/Box.tsx",
"old_path": "modules/labs-react/common/lib/Box.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -10,6 +10,7 @@ export * from './useMount';\nexport * from './components';\nexport * from './models';\nexport * from './elements';\n+export * from './useConstant';\nexport * from './useIsFullscreen';\nexport * from './useWindowSize';\nexport * from './useResizeObserver';\n",
"new_path": "modules/react/common/lib/utils/index.ts",
"old_path": "modules/react/common/lib/utils/index.ts"
}
] |
TypeScript
|
Apache License 2.0
|
workday/canvas-kit
|
fix: Fix Box valid prop passing (#1488)
Fixes: #1482
[category:Components]
| 1
|
fix
| null |
711,597
|
24.02.2022 14:38:17
| -3,600
|
67f60accb70639478c14c32f5e3999c967979b01
|
feat(core): Include Customer in CustomerAddressEvent
Closes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -697,6 +697,7 @@ export class CustomerService {\ntype: HistoryEntryType.CUSTOMER_ADDRESS_CREATED,\ndata: { address: addressToLine(createdAddress) },\n});\n+ createdAddress.customer = customer;\nthis.eventBus.publish(new CustomerAddressEvent(ctx, createdAddress, 'created', input));\nreturn createdAddress;\n}\n@@ -733,6 +734,7 @@ export class CustomerService {\ninput,\n},\n});\n+ updatedAddress.customer = customer;\nthis.eventBus.publish(new CustomerAddressEvent(ctx, updatedAddress, 'updated', input));\nreturn updatedAddress;\n}\n@@ -761,6 +763,7 @@ export class CustomerService {\n},\n});\nawait this.connection.getRepository(ctx, Address).remove(address);\n+ address.customer = customer;\nthis.eventBus.publish(new CustomerAddressEvent(ctx, address, 'deleted', id));\nreturn true;\n}\n",
"new_path": "packages/core/src/service/services/customer.service.ts",
"old_path": "packages/core/src/service/services/customer.service.ts"
}
] |
TypeScript
|
MIT License
|
vendure-ecommerce/vendure
|
feat(core): Include Customer in CustomerAddressEvent
Closes #1369
| 1
|
feat
|
core
|
711,597
|
24.02.2022 14:39:16
| -3,600
|
4a81f7c57d87ad0b46d19d7f84af54c7d2185f95
|
feat(admin-ui): Implement deletion of addresses from customer detail
|
[
{
"change_type": "MODIFY",
"diff": "@@ -5893,6 +5893,16 @@ export type UpdateCustomerAddressMutation = { updateCustomerAddress: (\n& AddressFragment\n) };\n+export type DeleteCustomerAddressMutationVariables = Exact<{\n+ id: Scalars['ID'];\n+}>;\n+\n+\n+export type DeleteCustomerAddressMutation = { deleteCustomerAddress: (\n+ { __typename?: 'Success' }\n+ & Pick<Success, 'success'>\n+ ) };\n+\nexport type CreateCustomerGroupMutationVariables = Exact<{\ninput: CreateCustomerGroupInput;\n}>;\n@@ -9366,6 +9376,12 @@ export namespace UpdateCustomerAddress {\nexport type UpdateCustomerAddress = (NonNullable<UpdateCustomerAddressMutation['updateCustomerAddress']>);\n}\n+export namespace DeleteCustomerAddress {\n+ export type Variables = DeleteCustomerAddressMutationVariables;\n+ export type Mutation = DeleteCustomerAddressMutation;\n+ export type DeleteCustomerAddress = (NonNullable<DeleteCustomerAddressMutation['deleteCustomerAddress']>);\n+}\n+\nexport namespace CreateCustomerGroup {\nexport type Variables = CreateCustomerGroupMutationVariables;\nexport type Mutation = CreateCustomerGroupMutation;\n",
"new_path": "packages/admin-ui/src/lib/core/src/common/generated-types.ts",
"old_path": "packages/admin-ui/src/lib/core/src/common/generated-types.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -151,6 +151,14 @@ export const UPDATE_CUSTOMER_ADDRESS = gql`\n${ADDRESS_FRAGMENT}\n`;\n+export const DELETE_CUSTOMER_ADDRESS = gql`\n+ mutation DeleteCustomerAddress($id: ID!) {\n+ deleteCustomerAddress(id: $id) {\n+ success\n+ }\n+ }\n+`;\n+\nexport const CREATE_CUSTOMER_GROUP = gql`\nmutation CreateCustomerGroup($input: CreateCustomerGroupInput!) {\ncreateCustomerGroup(input: $input) {\n",
"new_path": "packages/admin-ui/src/lib/core/src/data/definitions/customer-definitions.ts",
"old_path": "packages/admin-ui/src/lib/core/src/data/definitions/customer-definitions.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -10,6 +10,7 @@ import {\nCustomerGroupListOptions,\nCustomerListOptions,\nDeleteCustomer,\n+ DeleteCustomerAddress,\nDeleteCustomerGroup,\nDeleteCustomerNote,\nGetCustomer,\n@@ -36,11 +37,12 @@ import {\nCREATE_CUSTOMER_ADDRESS,\nCREATE_CUSTOMER_GROUP,\nDELETE_CUSTOMER,\n+ DELETE_CUSTOMER_ADDRESS,\nDELETE_CUSTOMER_GROUP,\nDELETE_CUSTOMER_NOTE,\nGET_CUSTOMER,\n- GET_CUSTOMER_GROUP_WITH_CUSTOMERS,\nGET_CUSTOMER_GROUPS,\n+ GET_CUSTOMER_GROUP_WITH_CUSTOMERS,\nGET_CUSTOMER_HISTORY,\nGET_CUSTOMER_LIST,\nREMOVE_CUSTOMERS_FROM_GROUP,\n@@ -129,6 +131,13 @@ export class CustomerDataService {\n);\n}\n+ deleteCustomerAddress(id: string) {\n+ return this.baseDataService.mutate<DeleteCustomerAddress.Mutation, DeleteCustomerAddress.Variables>(\n+ DELETE_CUSTOMER_ADDRESS,\n+ { id },\n+ );\n+ }\n+\ncreateCustomerGroup(input: CreateCustomerGroupInput) {\nreturn this.baseDataService.mutate<CreateCustomerGroup.Mutation, CreateCustomerGroup.Variables>(\nCREATE_CUSTOMER_GROUP,\n",
"new_path": "packages/admin-ui/src/lib/core/src/data/providers/customer-data.service.ts",
"old_path": "packages/admin-ui/src/lib/core/src/data/providers/customer-data.service.ts"
},
{
"change_type": "MODIFY",
"diff": ">\n{{ 'customer.set-as-default-billing-address' | translate }}\n</button>\n+ <div class=\"dropdown-divider\"></div>\n+ <button\n+ type=\"button\"\n+ class=\"delete-button\"\n+ (click)=\"delete()\"\n+ vdrDropdownItem\n+ >\n+ <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\n+ {{ 'common.delete' | translate }}\n+ </button>\n</vdr-dropdown-menu>\n</vdr-dropdown>\n</ng-container>\n",
"new_path": "packages/admin-ui/src/lib/customer/src/components/address-card/address-card.component.html",
"old_path": "packages/admin-ui/src/lib/customer/src/components/address-card/address-card.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -31,6 +31,7 @@ export class AddressCardComponent implements OnInit, OnChanges {\n@Input() editable = true;\n@Output() setAsDefaultShipping = new EventEmitter<string>();\n@Output() setAsDefaultBilling = new EventEmitter<string>();\n+ @Output() deleteAddress = new EventEmitter<string>();\nprivate dataDependenciesPopulated = new BehaviorSubject<boolean>(false);\nconstructor(private modalService: ModalService, private changeDetector: ChangeDetectorRef) {}\n@@ -75,6 +76,11 @@ export class AddressCardComponent implements OnInit, OnChanges {\nthis.addressForm.markAsDirty();\n}\n+ delete() {\n+ this.deleteAddress.emit(this.addressForm.value.id);\n+ this.addressForm.markAsDirty();\n+ }\n+\neditAddress() {\nthis.modalService\n.fromComponent(AddressDetailDialogComponent, {\n",
"new_path": "packages/admin-ui/src/lib/customer/src/components/address-card/address-card.component.ts",
"old_path": "packages/admin-ui/src/lib/customer/src/components/address-card/address-card.component.ts"
},
{
"change_type": "MODIFY",
"diff": "<h3>{{ 'customer.addresses' | translate }}</h3>\n<vdr-address-card\n*ngFor=\"let addressForm of getAddressFormControls()\"\n+ [class.to-delete]=\"addressesToDeleteIds.has(addressForm.value.id)\"\n[availableCountries]=\"availableCountries$ | async\"\n[isDefaultBilling]=\"defaultBillingAddressId === addressForm.value.id\"\n[isDefaultShipping]=\"defaultShippingAddressId === addressForm.value.id\"\n[addressForm]=\"addressForm\"\n[customFields]=\"addressCustomFields\"\n- [editable]=\"['UpdateCustomer'] | hasPermission\"\n+ [editable]=\"(['UpdateCustomer'] | hasPermission) && !addressesToDeleteIds.has(addressForm.value.id)\"\n(setAsDefaultBilling)=\"setDefaultBillingAddressId($event)\"\n(setAsDefaultShipping)=\"setDefaultShippingAddressId($event)\"\n+ (deleteAddress)=\"toggleDeleteAddress($event)\"\n></vdr-address-card>\n<button class=\"btn btn-secondary\" (click)=\"addAddress()\" *vdrIfPermissions=\"'UpdateCustomer'\">\n<clr-icon shape=\"plus\"></clr-icon>\n",
"new_path": "packages/admin-ui/src/lib/customer/src/components/customer-detail/customer-detail.component.html",
"old_path": "packages/admin-ui/src/lib/customer/src/components/customer-detail/customer-detail.component.html"
},
{
"change_type": "MODIFY",
"diff": "margin-left: 6px;\ncolor: var(--color-grey-500);\n}\n+\n+.to-delete {\n+ opacity: 0.5;\n+}\n",
"new_path": "packages/admin-ui/src/lib/customer/src/components/customer-detail/customer-detail.component.scss",
"old_path": "packages/admin-ui/src/lib/customer/src/components/customer-detail/customer-detail.component.scss"
},
{
"change_type": "MODIFY",
"diff": "@@ -11,6 +11,7 @@ import {\nCustomer,\nCustomFieldConfig,\nDataService,\n+ DeleteCustomerAddress,\nEditNoteDialogComponent,\nGetAvailableCountries,\nGetCustomer,\n@@ -27,7 +28,7 @@ import {\nUpdateCustomerInput,\nUpdateCustomerMutation,\n} from '@vendure/admin-ui/core';\n-import { notNullOrUndefined } from '@vendure/common/lib/shared-utils';\n+import { assertNever, notNullOrUndefined } from '@vendure/common/lib/shared-utils';\nimport { EMPTY, forkJoin, from, Observable, Subject } from 'rxjs';\nimport {\nconcatMap,\n@@ -65,6 +66,7 @@ export class CustomerDetailComponent\nfetchHistory = new Subject<void>();\ndefaultShippingAddressId: string;\ndefaultBillingAddressId: string;\n+ addressesToDeleteIds = new Set<string>();\naddressDefaultsUpdated = false;\nordersPerPage = 10;\ncurrentOrdersPage = 1;\n@@ -144,6 +146,14 @@ export class CustomerDetailComponent\nthis.addressDefaultsUpdated = true;\n}\n+ toggleDeleteAddress(id: string) {\n+ if (this.addressesToDeleteIds.has(id)) {\n+ this.addressesToDeleteIds.delete(id);\n+ } else {\n+ this.addressesToDeleteIds.add(id);\n+ }\n+ }\n+\naddAddress() {\nconst addressFormArray = this.detailForm.get('addresses') as FormArray;\nconst newAddress = this.formBuilder.group({\n@@ -231,6 +241,7 @@ export class CustomerDetailComponent\n| UpdateCustomer.UpdateCustomer\n| CreateCustomerAddress.CreateCustomerAddress\n| UpdateCustomerAddress.UpdateCustomerAddress\n+ | DeleteCustomerAddress.DeleteCustomerAddress\n>\n> = [];\nconst customerForm = this.detailForm.get('customer');\n@@ -277,6 +288,13 @@ export class CustomerDetailComponent\n.createCustomerAddress(id, input)\n.pipe(map(res => res.createCustomerAddress)),\n);\n+ } else {\n+ if (this.addressesToDeleteIds.has(address.id)) {\n+ saveOperations.push(\n+ this.dataService.customer\n+ .deleteCustomerAddress(address.id)\n+ .pipe(map(res => res.deleteCustomerAddress)),\n+ );\n} else {\nsaveOperations.push(\nthis.dataService.customer\n@@ -290,22 +308,29 @@ export class CustomerDetailComponent\n}\n}\n}\n+ }\nreturn forkJoin(saveOperations);\n}),\n)\n.subscribe(\ndata => {\n+ let notified = false;\nfor (const result of data) {\nswitch (result.__typename) {\ncase 'Customer':\ncase 'Address':\n+ case 'Success':\n+ if (!notified) {\nthis.notificationService.success(_('common.notify-update-success'), {\nentity: 'Customer',\n});\n+ notified = true;\nthis.detailForm.markAsPristine();\nthis.addressDefaultsUpdated = false;\nthis.changeDetector.markForCheck();\nthis.fetchHistory.next();\n+ this.dataService.customer.getCustomer(this.id).single$.subscribe();\n+ }\nbreak;\ncase 'EmailAddressConflictError':\nthis.notificationService.error(result.message);\n",
"new_path": "packages/admin-ui/src/lib/customer/src/components/customer-detail/customer-detail.component.ts",
"old_path": "packages/admin-ui/src/lib/customer/src/components/customer-detail/customer-detail.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -1622,7 +1622,7 @@ export type Mutation = {\n/**\n* Verify a Customer email address with the token sent to that address. Only applicable if `authOptions.requireVerification` is set to true.\n*\n- * If the Customer was not registered with a password in the `registerCustomerAccount` mutation, the a password _must_ be\n+ * If the Customer was not registered with a password in the `registerCustomerAccount` mutation, the password _must_ be\n* provided here.\n*/\nverifyCustomerAccount: VerifyCustomerAccountResult;\n@@ -2834,7 +2834,7 @@ export type SearchResult = {\nfacetValueIds: Array<Scalars['ID']>;\n/** An array of ids of the Collections in which this result appears */\ncollectionIds: Array<Scalars['ID']>;\n- /** A relevence score for the result. Differs between database implementations */\n+ /** A relevance score for the result. Differs between database implementations */\nscore: Scalars['Float'];\n};\n",
"new_path": "packages/common/src/generated-shop-types.ts",
"old_path": "packages/common/src/generated-shop-types.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -1568,7 +1568,7 @@ export type Mutation = {\n/**\n* Verify a Customer email address with the token sent to that address. Only applicable if `authOptions.requireVerification` is set to true.\n*\n- * If the Customer was not registered with a password in the `registerCustomerAccount` mutation, the a password _must_ be\n+ * If the Customer was not registered with a password in the `registerCustomerAccount` mutation, the password _must_ be\n* provided here.\n*/\nverifyCustomerAccount: VerifyCustomerAccountResult;\n@@ -2736,7 +2736,7 @@ export type SearchResult = {\nfacetValueIds: Array<Scalars['ID']>;\n/** An array of ids of the Collections in which this result appears */\ncollectionIds: Array<Scalars['ID']>;\n- /** A relevence score for the result. Differs between database implementations */\n+ /** A relevance score for the result. Differs between database implementations */\nscore: Scalars['Float'];\n};\n",
"new_path": "packages/core/e2e/graphql/generated-e2e-shop-types.ts",
"old_path": "packages/core/e2e/graphql/generated-e2e-shop-types.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -1568,7 +1568,7 @@ export type Mutation = {\n/**\n* Verify a Customer email address with the token sent to that address. Only applicable if `authOptions.requireVerification` is set to true.\n*\n- * If the Customer was not registered with a password in the `registerCustomerAccount` mutation, the a password _must_ be\n+ * If the Customer was not registered with a password in the `registerCustomerAccount` mutation, the password _must_ be\n* provided here.\n*/\nverifyCustomerAccount: VerifyCustomerAccountResult;\n@@ -2736,7 +2736,7 @@ export type SearchResult = {\nfacetValueIds: Array<Scalars['ID']>;\n/** An array of ids of the Collections in which this result appears */\ncollectionIds: Array<Scalars['ID']>;\n- /** A relevence score for the result. Differs between database implementations */\n+ /** A relevance score for the result. Differs between database implementations */\nscore: Scalars['Float'];\n};\n",
"new_path": "packages/payments-plugin/e2e/graphql/generated-shop-types.ts",
"old_path": "packages/payments-plugin/e2e/graphql/generated-shop-types.ts"
}
] |
TypeScript
|
MIT License
|
vendure-ecommerce/vendure
|
feat(admin-ui): Implement deletion of addresses from customer detail
| 1
|
feat
|
admin-ui
|
711,597
|
24.02.2022 14:45:12
| -3,600
|
2960a09c28959784e6ac3de9c5960968f768052f
|
fix(core): Use sessionDuration when creating anonymous sessions
Relates to
|
[
{
"change_type": "MODIFY",
"diff": "@@ -107,10 +107,9 @@ export class SessionService implements EntitySubscriberInterface {\n*/\nasync createAnonymousSession(): Promise<CachedSession> {\nconst token = await this.generateSessionToken();\n- const anonymousSessionDurationInMs = ms('1y');\nconst session = new AnonymousSession({\ntoken,\n- expires: this.getExpiryDate(anonymousSessionDurationInMs),\n+ expires: this.getExpiryDate(this.sessionDurationInMs),\ninvalidated: false,\n});\n// save the new session\n",
"new_path": "packages/core/src/service/services/session.service.ts",
"old_path": "packages/core/src/service/services/session.service.ts"
}
] |
TypeScript
|
MIT License
|
vendure-ecommerce/vendure
|
fix(core): Use sessionDuration when creating anonymous sessions
Relates to #1425
| 1
|
fix
|
core
|
667,713
|
24.02.2022 14:45:56
| -28,800
|
8e5754e317d43b0c6bdeb3d6ea1bf28c88311523
|
fix(android): use context.getResources() get windowDisplayMetrics
|
[
{
"change_type": "MODIFY",
"diff": "@@ -175,10 +175,7 @@ public class DimensionsUtil {\nreturn null;\n}\n- DisplayMetrics windowDisplayMetrics = PixelUtil.getMetrics();\n- if (windowDisplayMetrics == null) {\n- windowDisplayMetrics = context.getResources().getDisplayMetrics();\n- }\n+ DisplayMetrics windowDisplayMetrics = context.getResources().getDisplayMetrics();\nDisplayMetrics screenDisplayMetrics = new DisplayMetrics();\nscreenDisplayMetrics.setTo(windowDisplayMetrics);\nWindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);\n",
"new_path": "android/sdk/src/main/java/com/tencent/mtt/hippy/utils/DimensionsUtil.java",
"old_path": "android/sdk/src/main/java/com/tencent/mtt/hippy/utils/DimensionsUtil.java"
}
] |
C++
|
Apache License 2.0
|
tencent/hippy
|
fix(android): use context.getResources() get windowDisplayMetrics
| 1
|
fix
|
android
|
777,353
|
24.02.2022 14:54:54
| 21,600
|
acf080a7fb5809d3b9e50757c476d37b502645c0
|
fix: allow modal width to shrink on mobile
|
[
{
"change_type": "MODIFY",
"diff": "@@ -34,7 +34,7 @@ export enum ModalCloseReason {\nconst DEFAULT_MODAL_PROPS: Partial<ModalFuncProps> = {\nmaskClosable: true,\n- style: { minWidth: 600 },\n+ style: { minWidth: 280 },\nvisible: true,\n};\n",
"new_path": "webui/react/src/hooks/useModal/useModal.tsx",
"old_path": "webui/react/src/hooks/useModal/useModal.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -292,7 +292,6 @@ const useModalExperimentCreate = (props?: Props): ModalHooks => {\nokText: type,\nonCancel: handleCancel,\nonOk: handleOk,\n- style: { minWidth: 600 },\ntitle: (\n<div className={css.title}>\n<Icon name=\"fork\" /> {titleLabel}\n",
"new_path": "webui/react/src/hooks/useModal/useModalExperimentCreate.tsx",
"old_path": "webui/react/src/hooks/useModal/useModalExperimentCreate.tsx"
}
] |
Python
|
Apache License 2.0
|
determined-ai/determined
|
fix: allow modal width to shrink on mobile [DET-6443] (#3642)
| 1
|
fix
| null |
847,143
|
24.02.2022 14:56:02
| -28,800
|
810102f98ba19364d7bbf93f5669e8540a7a37ab
|
fix(theme): key timeline transition
|
[
{
"change_type": "MODIFY",
"diff": "@@ -47,8 +47,12 @@ export default defineComponent({\nDropTransition,\n{ delay: 0.08 * (index + 1), type: \"group\" },\n() => [\n- h(\"h3\", { id: year, class: \"year\" }, h(\"span\", year)),\n- h(\"li\", { class: \"year-list\" }, [\n+ h(\n+ \"h3\",\n+ { key: \"title\", id: year, class: \"year\" },\n+ h(\"span\", year)\n+ ),\n+ h(\"li\", { key: \"content\", class: \"year-list\" }, [\nh(\n\"ul\",\n{ class: \"year-wrapper\" },\n",
"new_path": "packages/theme/src/client/module/blog/components/TimelineItems.ts",
"old_path": "packages/theme/src/client/module/blog/components/TimelineItems.ts"
}
] |
TypeScript
|
MIT License
|
vuepress-theme-hope/vuepress-theme-hope
|
fix(theme): key timeline transition
| 1
|
fix
|
theme
|
419,604
|
24.02.2022 14:57:29
| -3,600
|
2d26a631ebcc2bb1d1315f40f95594dca0abe9fc
|
fix(knex): respect explicit transaction in `em.count()`
|
[
{
"change_type": "MODIFY",
"diff": "@@ -182,10 +182,10 @@ export abstract class AbstractSqlDriver<C extends AbstractSqlConnection = Abstra\n}\n}\n- async count<T extends AnyEntity<T>>(entityName: string, where: any, options: CountOptions<T> = {}, ctx?: Transaction<Knex.Transaction>): Promise<number> {\n+ async count<T extends AnyEntity<T>>(entityName: string, where: any, options: CountOptions<T> = {}): Promise<number> {\nconst meta = this.metadata.find(entityName)!;\nconst pks = meta.primaryKeys;\n- const qb = this.createQueryBuilder(entityName, ctx, !!ctx, false)\n+ const qb = this.createQueryBuilder(entityName, options.ctx, !!options.ctx, false)\n.groupBy(options.groupBy!)\n.having(options.having!)\n.populate(options.populate as unknown as PopulateOptions<T>[] ?? [])\n",
"new_path": "packages/knex/src/AbstractSqlDriver.ts",
"old_path": "packages/knex/src/AbstractSqlDriver.ts"
}
] |
TypeScript
|
MIT License
|
mikro-orm/mikro-orm
|
fix(knex): respect explicit transaction in `em.count()` (#2818)
Co-authored-by: Asi Farran <asi@schmallo.com>
| 1
|
fix
|
knex
|
126,276
|
24.02.2022 15:02:39
| 10,800
|
c3cfd9f18078e836f704f0704473a7a12d4291d9
|
chore(embedded/tbtree): checksum-based snapshot consistency validation
|
[
{
"change_type": "MODIFY",
"diff": "@@ -15,7 +15,10 @@ limitations under the License.\n*/\npackage appendable\n-import \"compress/flate\"\n+import (\n+ \"compress/flate\"\n+ \"crypto/sha256\"\n+)\nconst DefaultCompressionFormat = NoCompression\nconst DefaultCompressionLevel = BestSpeed\n@@ -44,6 +47,7 @@ type Appendable interface {\nFlush() error\nSync() error\nReadAt(bs []byte, off int64) (int, error)\n+ Checksum(off, len int64) ([sha256.Size]byte, error)\nClose() error\nCopy(dstPath string) error\nCompressionFormat() int\n",
"new_path": "embedded/appendable/appendable.go",
"old_path": "embedded/appendable/appendable.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -15,6 +15,8 @@ limitations under the License.\n*/\npackage mocked\n+import \"crypto/sha256\"\n+\ntype MockedAppendable struct {\nMetadataFn func() []byte\nSizeFn func() (int64, error)\n@@ -24,6 +26,7 @@ type MockedAppendable struct {\nFlushFn func() error\nSyncFn func() error\nReadAtFn func(bs []byte, off int64) (int, error)\n+ ChecksumFn func(off, len int64) ([sha256.Size]byte, error)\nCopyFn func(dstPath string) error\nCloseFn func() error\nCompressionFormatFn func() int\n@@ -66,6 +69,10 @@ func (a *MockedAppendable) ReadAt(bs []byte, off int64) (int, error) {\nreturn a.ReadAtFn(bs, off)\n}\n+func (a *MockedAppendable) Checksum(off, len int64) ([sha256.Size]byte, error) {\n+ return a.ChecksumFn(off, len)\n+}\n+\nfunc (a *MockedAppendable) Close() error {\nreturn a.CloseFn()\n}\n",
"new_path": "embedded/appendable/mocked/mocked.go",
"old_path": "embedded/appendable/mocked/mocked.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -16,6 +16,7 @@ limitations under the License.\npackage multiapp\nimport (\n+ \"crypto/sha256\"\n\"errors\"\n\"fmt\"\n\"io\"\n@@ -495,6 +496,24 @@ func (mf *MultiFileAppendable) ReadAt(bs []byte, off int64) (int, error) {\nreturn r, nil\n}\n+func (mf *MultiFileAppendable) Checksum(off, len int64) (checksum [sha256.Size]byte, err error) {\n+ var size int64\n+\n+ size, err = mf.Size()\n+ if err != nil {\n+ return\n+ }\n+\n+ if size < off+len {\n+ err = fmt.Errorf(\"%w: appendable size is smaller than required for checksum calculation\", io.EOF)\n+ return\n+ }\n+\n+ // TODO: TO BE IMPLEMENTED\n+\n+ return\n+}\n+\nfunc (mf *MultiFileAppendable) Flush() error {\nmf.mutex.Lock()\ndefer mf.mutex.Unlock()\n",
"new_path": "embedded/appendable/multiapp/multi_app.go",
"old_path": "embedded/appendable/multiapp/multi_app.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -2,6 +2,7 @@ package remoteapp\nimport (\n\"context\"\n+ \"crypto/sha256\"\n\"encoding/binary\"\n\"io\"\n\"io/ioutil\"\n@@ -124,6 +125,10 @@ func (r *remoteStorageReader) ReadAt(bs []byte, off int64) (int, error) {\n// return n, nil\n}\n+func (r *remoteStorageReader) Checksum(off, len int64) ([sha256.Size]byte, error) {\n+ panic(\"unimplemented\")\n+}\n+\nfunc (r *remoteStorageReader) Close() error {\nreturn nil\n}\n",
"new_path": "embedded/appendable/remoteapp/remote_storage_reader.go",
"old_path": "embedded/appendable/remoteapp/remote_storage_reader.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -22,8 +22,10 @@ import (\n\"compress/gzip\"\n\"compress/lzw\"\n\"compress/zlib\"\n+ \"crypto/sha256\"\n\"encoding/binary\"\n\"errors\"\n+ \"fmt\"\n\"io\"\n\"os\"\n\"sync\"\n@@ -424,6 +426,24 @@ func (aof *AppendableFile) ReadAt(bs []byte, off int64) (n int, err error) {\nreturn\n}\n+func (aof *AppendableFile) Checksum(off, len int64) (checksum [sha256.Size]byte, err error) {\n+ var size int64\n+\n+ size, err = aof.Size()\n+ if err != nil {\n+ return\n+ }\n+\n+ if size < off+len {\n+ err = fmt.Errorf(\"%w: appendable size is smaller than required for checksum calculation\", io.EOF)\n+ return\n+ }\n+\n+ // TODO: TO BE IMPLEMENTED\n+\n+ return\n+}\n+\nfunc (aof *AppendableFile) Flush() error {\naof.mutex.Lock()\ndefer aof.mutex.Unlock()\n",
"new_path": "embedded/appendable/singleapp/single_app.go",
"old_path": "embedded/appendable/singleapp/single_app.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -257,7 +257,7 @@ func (s *Snapshot) Close() error {\nreturn nil\n}\n-func (s *Snapshot) WriteTo(nw, hw io.Writer, writeOpts *WriteOpts) (nOff int64, wN, wH int64, err error) {\n+func (s *Snapshot) WriteTo(nw, hw io.Writer, writeOpts *WriteOpts) (rootOffset int64, wN, wH int64, err error) {\ns.mutex.Lock()\ndefer s.mutex.Unlock()\n@@ -283,7 +283,7 @@ func (n *innerNode) writeTo(nw, hw io.Writer, writeOpts *WriteOpts) (nOff int64,\nno, wn, wh, err := c.writeTo(nw, hw, wopts)\nif err != nil {\n- return 0, wn, wh, err\n+ return 0, cnw, chw, err\n}\noffsets[i] = no\n@@ -291,7 +291,10 @@ func (n *innerNode) writeTo(nw, hw io.Writer, writeOpts *WriteOpts) (nOff int64,\nchw += wh\n}\n- size := n.size()\n+ size, err := n.size()\n+ if err != nil {\n+ return 0, cnw, chw, err\n+ }\nbuf := make([]byte, size)\nbi := 0\n@@ -346,7 +349,11 @@ func (l *leafNode) writeTo(nw, hw io.Writer, writeOpts *WriteOpts) (nOff int64,\nreturn l.off, 0, 0, nil\n}\n- size := l.size()\n+ size, err := l.size()\n+ if err != nil {\n+ return 0, 0, 0, err\n+ }\n+\nbuf := make([]byte, size)\nbi := 0\n",
"new_path": "embedded/tbtree/snapshot.go",
"old_path": "embedded/tbtree/snapshot.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -17,6 +17,7 @@ package tbtree\nimport (\n\"bytes\"\n+ \"crypto/sha256\"\n\"encoding/binary\"\n\"errors\"\n\"fmt\"\n@@ -55,8 +56,6 @@ var ErrIncompatibleDataFormat = errors.New(\"incompatible data format\")\nconst Version = 2\n-const cLogEntrySize = 16 // root node offset and history size\n-\nconst (\nMetaVersion = \"VERSION\"\nMetaMaxNodeSize = \"MAX_NODE_SIZE\"\n@@ -70,6 +69,97 @@ const (\nhistoryFolder = \"history\" // history data is snapshot-agnostic / compaction-agnostic i.e. history(t) = history(compact(t))\n)\n+// initial and final nLog size, root node size, nLog digest since initial and final points\n+// initial and final hLog size, hLog digest since initial and final points\n+const cLogEntrySize = 8 + 8 + 4 + sha256.Size + 8 + 8 + sha256.Size\n+\n+type cLogEntry struct {\n+ synced bool\n+\n+ initialNLogSize int64\n+ finalNLogSize int64\n+ rootNodeSize int\n+ nLogChecksum [sha256.Size]byte\n+\n+ initialHLogSize int64\n+ finalHLogSize int64\n+ hLogChecksum [sha256.Size]byte\n+}\n+\n+func (e *cLogEntry) serialize() []byte {\n+ var b [cLogEntrySize]byte\n+\n+ i := 0\n+\n+ binary.BigEndian.PutUint64(b[i:], uint64(e.initialNLogSize))\n+ if !e.synced {\n+ b[i] |= 0x80 // async flag in the msb is set\n+ }\n+ i += 8\n+\n+ binary.BigEndian.PutUint64(b[i:], uint64(e.finalNLogSize))\n+ i += 8\n+\n+ binary.BigEndian.PutUint32(b[i:], uint32(e.rootNodeSize))\n+ i += 4\n+\n+ copy(b[i:], e.nLogChecksum[:])\n+ i += sha256.Size\n+\n+ binary.BigEndian.PutUint64(b[i:], uint64(e.initialHLogSize))\n+ i += 8\n+\n+ binary.BigEndian.PutUint64(b[i:], uint64(e.finalHLogSize))\n+ i += 8\n+\n+ copy(b[i:], e.hLogChecksum[:])\n+ i += sha256.Size\n+\n+ return b[:]\n+}\n+\n+func (e *cLogEntry) deserialize(b []byte) (int, error) {\n+ if len(b) < cLogEntrySize {\n+ return 0, fmt.Errorf(\"%w: not enough data to read cLogEntry\", ErrIllegalArguments)\n+ }\n+\n+ e.synced = b[0]&0x80 == 0\n+ b[0] &= 0x7F // remove syncing flag\n+\n+ i := 0\n+\n+ e.initialNLogSize = int64(binary.BigEndian.Uint64(b[i:]))\n+ i += 8\n+\n+ e.finalNLogSize = int64(binary.BigEndian.Uint64(b[i:]))\n+ i += 8\n+\n+ e.rootNodeSize = int(binary.BigEndian.Uint32(b[i:]))\n+ i += 4\n+\n+ if e.initialHLogSize > e.finalNLogSize || e.rootNodeSize < 1 || int64(e.rootNodeSize) > e.finalNLogSize {\n+ return i, fmt.Errorf(\"%w: while deserializing index commit log entry\", ErrCorruptedCLog)\n+ }\n+\n+ copy(e.nLogChecksum[:], b[i:])\n+ i += sha256.Size\n+\n+ e.initialHLogSize = int64(binary.BigEndian.Uint64(b[i:]))\n+ i += 8\n+\n+ e.finalHLogSize = int64(binary.BigEndian.Uint64(b[i:]))\n+ i += 8\n+\n+ if e.initialHLogSize > e.finalHLogSize {\n+ return i, fmt.Errorf(\"%w: while deserializing index commit log entry\", ErrCorruptedCLog)\n+ }\n+\n+ copy(e.hLogChecksum[:], b[i:])\n+ i += sha256.Size\n+\n+ return i, nil\n+}\n+\n// TBTree implements a timed-btree\ntype TBtree struct {\npath string\n@@ -134,7 +224,7 @@ type node interface {\nminKey() []byte\nts() uint64\nsetTs(ts uint64) (node, error)\n- size() int\n+ size() (int, error)\nmutated() bool\noffset() int64\nwriteTo(nw, hw io.Writer, writeOpts *WriteOpts) (nOff int64, wN, wH int64, err error)\n@@ -239,13 +329,13 @@ func Open(path string, opts *Options) (*TBtree, error) {\nsnapPath := filepath.Join(path, cFolder)\n- opts.log.Infof(\"Reading snapshot at '%s'...\", snapPath)\n+ opts.log.Infof(\"Reading snapshots at '%s'...\", snapPath)\nappendableOpts.WithFileExt(\"n\")\nappendableOpts.WithMaxOpenedFiles(opts.nodesLogMaxOpenedFiles)\nnLog, err := appFactory(path, nFolder, appendableOpts)\nif err != nil {\n- opts.log.Infof(\"Skipping snapshot at '%s', reading node data returned: %v\", snapPath, err)\n+ opts.log.Infof(\"Skipping snapshots at '%s', reading node data returned: %v\", snapPath, err)\ncontinue\n}\n@@ -254,28 +344,28 @@ func Open(path string, opts *Options) (*TBtree, error) {\ncLog, err := appFactory(path, cFolder, appendableOpts)\nif err != nil {\nnLog.Close()\n- opts.log.Infof(\"Skipping snapshot at '%s', reading commit data returned: %v\", snapPath, err)\n+ opts.log.Infof(\"Skipping snapshots at '%s', reading commit data returned: %v\", snapPath, err)\ncontinue\n}\nvar t *TBtree\n- var discardSnapshot bool\n+ var discardSnapshotsFolder bool\ncLogSize, err := cLog.Size()\nif err == nil && cLogSize < cLogEntrySize {\n- opts.log.Infof(\"Skipping snapshot at '%s', reading commit data returned: %s\", snapPath, \"empty snapshot\")\n- discardSnapshot = true\n+ opts.log.Infof(\"Skipping snapshots at '%s', reading commit data returned: %s\", snapPath, \"empty clog\")\n+ discardSnapshotsFolder = true\n}\n- if err == nil && !discardSnapshot {\n+ if err == nil && !discardSnapshotsFolder {\n// TODO: semantic validation and further amendment procedures may be done instead of a full initialization\nt, err = OpenWith(path, nLog, hLog, cLog, opts)\n}\nif err != nil {\n- opts.log.Infof(\"Skipping snapshot at '%s', opening btree returned: %v\", snapPath, err)\n- discardSnapshot = true\n+ opts.log.Infof(\"Skipping snapshots at '%s', opening btree returned: %v\", snapPath, err)\n+ discardSnapshotsFolder = true\n}\n- if discardSnapshot {\n+ if discardSnapshotsFolder {\nnLog.Close()\ncLog.Close()\n@@ -287,7 +377,7 @@ func Open(path string, opts *Options) (*TBtree, error) {\ncontinue\n}\n- opts.log.Infof(\"Successfully read snapshot at '%s'\", snapPath)\n+ opts.log.Infof(\"Successfully read snapshots at '%s'\", snapPath)\n// Discard older snapshots upon successful validation\nerr = discardSnapshots(path, snapIDs[:i-1], opts.log)\n@@ -364,7 +454,7 @@ func discardSnapshots(path string, snapIDs []uint64, log logger.Logger) error {\nnPath := filepath.Join(path, nFolder)\ncPath := filepath.Join(path, cFolder)\n- log.Infof(\"Discarding snapshot at '%s'...\", cPath)\n+ log.Infof(\"Discarding snapshots at '%s'...\", cPath)\nerr := os.RemoveAll(nPath) // TODO: nLog.Remove()\nif err != nil {\n@@ -376,7 +466,7 @@ func discardSnapshots(path string, snapIDs []uint64, log logger.Logger) error {\nreturn err\n}\n- log.Infof(\"Snapshot at '%s' has been discarded\", cPath)\n+ log.Infof(\"Snapshots at '%s' has been discarded\", cPath)\n}\nreturn nil\n@@ -416,11 +506,6 @@ func OpenWith(path string, nLog, hLog, cLog appendable.Appendable, opts *Options\n}\n}\n- hLogSize, err := hLog.Size()\n- if err != nil {\n- return nil, err\n- }\n-\ncache, err := cache.NewLRUCache(opts.cacheSize)\nif err != nil {\nreturn nil, err\n@@ -452,43 +537,71 @@ func OpenWith(path string, nLog, hLog, cLog appendable.Appendable, opts *Options\nsnapshots: make(map[uint64]*Snapshot),\n}\n- t.committedLogSize = cLogSize\n- discardedRoots := 0\n+ var validatedCLogEntry *cLogEntry\n+ discardedCLogEntries := 0\n- for t.committedLogSize > 0 {\n+ // checksum validation up to latest synced entry\n+ for cLogSize > 0 {\nvar b [cLogEntrySize]byte\n- n, err := cLog.ReadAt(b[:], t.committedLogSize-cLogEntrySize)\n+ n, err := cLog.ReadAt(b[:], cLogSize-cLogEntrySize)\nif err == io.EOF {\n- t.committedLogSize -= int64(n)\n+ cLogSize -= int64(n)\nbreak\n}\nif err != nil {\n- return nil, fmt.Errorf(\"%w: while loading index commit log at '%s'\", err, path)\n+ return nil, fmt.Errorf(\"%w: while reading index index commit log entry at '%s'\", err, path)\n}\n- committedRootOffset := int64(binary.BigEndian.Uint64(b[:]))\n- committedHLogSize := int64(binary.BigEndian.Uint64(b[8:]))\n+ cLogEntry := &cLogEntry{}\n+ _, err = cLogEntry.deserialize(b[:])\n+ if err != nil {\n+ return nil, fmt.Errorf(\"%w: while deserializing index commit log entry at '%s'\", err, path)\n+ }\n- root, err := t.readNodeAt(committedRootOffset)\n- if err == io.EOF || hLogSize < committedHLogSize {\n- // incomplete snapshot\n- t.committedLogSize -= cLogEntrySize\n- discardedRoots++\n- continue\n+ nLogChecksum, nerr := t.nLog.Checksum(cLogEntry.initialNLogSize, cLogEntry.finalNLogSize-cLogEntry.initialNLogSize)\n+ if nerr != nil && nerr != io.EOF {\n+ return nil, fmt.Errorf(\"%w: while calculating nodes log checksum at '%s'\", err, path)\n}\n- if err != nil {\n- return nil, fmt.Errorf(\"%w: while loading index at '%s'\", err, path)\n+\n+ hLogChecksum, herr := t.hLog.Checksum(cLogEntry.initialHLogSize, cLogEntry.finalHLogSize-cLogEntry.initialHLogSize)\n+ if herr != nil && herr != io.EOF {\n+ return nil, fmt.Errorf(\"%w: while calculating history log checksum at '%s'\", err, path)\n}\n- t.root = root\n- t.committedNLogSize = committedRootOffset + int64(t.root.size())\n- t.committedHLogSize = committedHLogSize\n+ mustDiscard := nerr == io.EOF ||\n+ herr == io.EOF ||\n+ nLogChecksum != cLogEntry.nLogChecksum ||\n+ hLogChecksum != cLogEntry.hLogChecksum\n+\n+ if mustDiscard {\n+ discardedCLogEntries += int(t.committedLogSize/cLogEntrySize) + 1\n+ validatedCLogEntry = nil\n+ t.committedLogSize = 0\n+ }\n+\n+ if !mustDiscard && t.committedLogSize == 0 {\n+ validatedCLogEntry = cLogEntry\n+ t.committedLogSize = cLogSize\n+ }\n+\n+ if !mustDiscard && cLogEntry.synced {\nbreak\n}\n- if t.root == nil {\n+ cLogSize -= cLogEntrySize\n+ }\n+\n+ if validatedCLogEntry == nil {\nt.root = &leafNode{t: t, mut: true}\n+ } else {\n+ t.root, err = t.readNodeAt(validatedCLogEntry.finalNLogSize - int64(validatedCLogEntry.rootNodeSize))\n+ if err != nil {\n+ return nil, fmt.Errorf(\"%w: while loading index at '%s'\", err, path)\n+ }\n+\n+ t.committedNLogSize = validatedCLogEntry.finalNLogSize\n+ t.committedHLogSize = validatedCLogEntry.finalHLogSize\n}\nerr = t.hLog.SetOffset(t.committedHLogSize)\n@@ -501,7 +614,7 @@ func OpenWith(path string, nLog, hLog, cLog appendable.Appendable, opts *Options\nreturn nil, fmt.Errorf(\"%w: while setting initial offset of commit log for index '%s'\", err, path)\n}\n- opts.log.Infof(\"Index '%s' {ts=%d, discarded_snapshots=%d} successfully loaded\", path, t.Ts(), discardedRoots)\n+ opts.log.Infof(\"Index '%s' {ts=%d, discarded_snapshots=%d} successfully loaded\", path, t.Ts(), discardedCLogEntries)\nreturn t, nil\n}\n@@ -807,10 +920,15 @@ func (t *TBtree) Sync() error {\nreturn ErrAlreadyClosed\n}\n- return t.sync()\n+ _, _, err := t.flushTree(true)\n+ if err != nil {\n+ return err\n+ }\n+\n+ return t.ensureSync()\n}\n-func (t *TBtree) sync() error {\n+func (t *TBtree) ensureSync() error {\nerr := t.nLog.Sync()\nif err != nil {\nreturn err\n@@ -837,7 +955,7 @@ func (t *TBtree) Flush() (wN, wH int64, err error) {\nreturn 0, 0, ErrAlreadyClosed\n}\n- return t.flushTree()\n+ return t.flushTree(false)\n}\ntype appendableWriter struct {\n@@ -854,7 +972,7 @@ func (t *TBtree) wrapNwarn(formattedMessage string, args ...interface{}) error {\nreturn fmt.Errorf(formattedMessage, args...)\n}\n-func (t *TBtree) flushTree() (wN int64, wH int64, err error) {\n+func (t *TBtree) flushTree(synced bool) (wN int64, wH int64, err error) {\nt.log.Infof(\"Flushing index '%s' {ts=%d}...\", t.path, t.root.ts())\nmetricsFlushingNodesProgress.WithLabelValues(t.path).Set(float64(0))\n@@ -864,7 +982,7 @@ func (t *TBtree) flushTree() (wN int64, wH int64, err error) {\nreturn 0, 0, nil\n}\n- sync := t.insertionCountSinceSync >= t.syncThld\n+ sync := synced || t.insertionCountSinceSync >= t.syncThld\nsnapshot := t.newSnapshot(0, t.root)\n@@ -892,27 +1010,61 @@ func (t *TBtree) flushTree() (wN int64, wH int64, err error) {\nreturn 0, 0, t.wrapNwarn(\"Flushing index '%s' {ts=%d} returned: %v\", t.path, t.root.ts(), err)\n}\n+ err = t.hLog.Flush()\n+ if err != nil {\n+ return 0, 0, t.wrapNwarn(\"Flushing index '%s' {ts=%d} returned: %v\", t.path, t.root.ts(), err)\n+ }\n+\n+ err = t.nLog.Flush()\n+ if err != nil {\n+ return 0, 0, t.wrapNwarn(\"Flushing index '%s' {ts=%d} returned: %v\", t.path, t.root.ts(), err)\n+ }\n+\n+ if sync {\n+ err = t.hLog.Sync()\n+ if err != nil {\n+ return 0, 0, t.wrapNwarn(\"Syncing index '%s' {ts=%d} returned: %v\", t.path, t.root.ts(), err)\n+ }\n+\n+ err = t.nLog.Sync()\n+ if err != nil {\n+ return 0, 0, t.wrapNwarn(\"Syncing index '%s' {ts=%d} returned: %v\", t.path, t.root.ts(), err)\n+ }\n+ }\n+\n// will overwrite partially written and uncommitted data\nerr = t.cLog.SetOffset(t.committedLogSize)\nif err != nil {\nreturn 0, 0, err\n}\n- var cb [cLogEntrySize]byte\n- binary.BigEndian.PutUint64(cb[:], uint64(t.root.offset()))\n- binary.BigEndian.PutUint64(cb[8:], uint64(t.committedHLogSize+wH))\n+ rootSize, err := t.root.size()\n+ if err != nil {\n+ return 0, 0, err\n+ }\n+\n+ cLogEntry := &cLogEntry{\n+ synced: sync,\n+\n+ initialNLogSize: t.committedNLogSize,\n+ finalNLogSize: t.committedNLogSize + wN,\n+ rootNodeSize: rootSize,\n- _, _, err = t.cLog.Append(cb[:])\n+ initialHLogSize: t.committedHLogSize,\n+ finalHLogSize: t.committedHLogSize + wH,\n+ }\n+\n+ cLogEntry.nLogChecksum, err = t.nLog.Checksum(t.committedNLogSize, wN)\nif err != nil {\nreturn 0, 0, t.wrapNwarn(\"Flushing index '%s' {ts=%d} returned: %v\", t.path, t.root.ts(), err)\n}\n- err = t.hLog.Flush()\n+ cLogEntry.hLogChecksum, err = t.hLog.Checksum(t.committedHLogSize, wH)\nif err != nil {\nreturn 0, 0, t.wrapNwarn(\"Flushing index '%s' {ts=%d} returned: %v\", t.path, t.root.ts(), err)\n}\n- err = t.nLog.Flush()\n+ _, _, err = t.cLog.Append(cLogEntry.serialize())\nif err != nil {\nreturn 0, 0, t.wrapNwarn(\"Flushing index '%s' {ts=%d} returned: %v\", t.path, t.root.ts(), err)\n}\n@@ -926,16 +1078,6 @@ func (t *TBtree) flushTree() (wN int64, wH int64, err error) {\nt.log.Infof(\"Index '%s' {ts=%d} successfully flushed\", t.path, t.root.ts())\nif sync {\n- err = t.hLog.Sync()\n- if err != nil {\n- return 0, 0, t.wrapNwarn(\"Syncing index '%s' {ts=%d} returned: %v\", t.path, t.root.ts(), err)\n- }\n-\n- err = t.nLog.Sync()\n- if err != nil {\n- return 0, 0, t.wrapNwarn(\"Syncing index '%s' {ts=%d} returned: %v\", t.path, t.root.ts(), err)\n- }\n-\nerr = t.cLog.Sync()\nif err != nil {\nreturn 0, 0, t.wrapNwarn(\"Syncing index '%s' {ts=%d} returned: %v\", t.path, t.root.ts(), err)\n@@ -976,15 +1118,6 @@ func (t *TBtree) snapshotCount() uint64 {\nreturn uint64(t.committedLogSize / cLogEntrySize)\n}\n-func (t *TBtree) currentSnapshot() (*Snapshot, error) {\n- _, _, err := t.flushTree()\n- if err != nil {\n- return nil, err\n- }\n-\n- return t.newSnapshot(0, t.root), nil\n-}\n-\nfunc (t *TBtree) Compact() (uint64, error) {\nt.rwmutex.Lock()\ndefer t.rwmutex.Unlock()\n@@ -1001,7 +1134,12 @@ func (t *TBtree) Compact() (uint64, error) {\nreturn 0, ErrCompactionThresholdNotReached\n}\n- snap, err := t.currentSnapshot()\n+ _, _, err := t.flushTree(false)\n+ if err != nil {\n+ return 0, err\n+ }\n+\n+ snap := t.newSnapshot(0, t.root)\nif err != nil {\nreturn 0, err\n}\n@@ -1070,7 +1208,7 @@ func (t *TBtree) fullDumpTo(snapshot *Snapshot, nLog, cLog appendable.Appendable\nBaseHLogOffset: 0,\n}\n- offset, _, _, err := snapshot.WriteTo(&appendableWriter{nLog}, nil, wopts)\n+ _, wN, _, err := snapshot.WriteTo(&appendableWriter{nLog}, nil, wopts)\nif err != nil {\nreturn err\n}\n@@ -1085,11 +1223,44 @@ func (t *TBtree) fullDumpTo(snapshot *Snapshot, nLog, cLog appendable.Appendable\nreturn err\n}\n- var cb [cLogEntrySize]byte\n- binary.BigEndian.PutUint64(cb[:], uint64(offset))\n- binary.BigEndian.PutUint64(cb[8:], uint64(t.committedHLogSize))\n+ // history log is not dumped but to ensure it's fully synced\n+ err = t.hLog.Sync()\n+ if err != nil {\n+ return err\n+ }\n+\n+ hLogSize, err := t.hLog.Size()\n+ if err != nil {\n+ return err\n+ }\n+\n+ rootSize, err := snapshot.root.size()\n+ if err != nil {\n+ return err\n+ }\n+\n+ // initial and final sizes are set to the same value so to avoid calculating digests of everything\n+ // it's safe as node and history log files are already synced\n+ cLogEntry := &cLogEntry{\n+ initialNLogSize: wN,\n+ finalNLogSize: wN,\n+ rootNodeSize: rootSize,\n+\n+ initialHLogSize: hLogSize,\n+ finalHLogSize: hLogSize,\n+ }\n+\n+ cLogEntry.nLogChecksum, err = nLog.Checksum(cLogEntry.initialNLogSize, cLogEntry.finalNLogSize-cLogEntry.initialNLogSize)\n+ if err != nil {\n+ return err\n+ }\n- _, _, err = cLog.Append(cb[:])\n+ cLogEntry.hLogChecksum, err = t.hLog.Checksum(cLogEntry.initialHLogSize, cLogEntry.finalHLogSize-cLogEntry.initialHLogSize)\n+ if err != nil {\n+ return err\n+ }\n+\n+ _, _, err = cLog.Append(cLogEntry.serialize())\nif err != nil {\nreturn err\n}\n@@ -1125,7 +1296,10 @@ func (t *TBtree) Close() error {\nmerrors := multierr.NewMultiErr()\n- _, _, err := t.flushTree()\n+ _, _, err := t.flushTree(true)\n+ merrors.Append(err)\n+\n+ err = t.ensureSync()\nmerrors.Append(err)\nerr = t.nLog.Close()\n@@ -1165,7 +1339,7 @@ func (t *TBtree) IncreaseTs(ts uint64) error {\nt.insertionCountSinceSync++\nif t.insertionCountSinceFlush >= t.flushThld {\n- _, _, err := t.flushTree()\n+ _, _, err := t.flushTree(false)\nreturn err\n}\n@@ -1256,7 +1430,7 @@ func (t *TBtree) BulkInsert(kvs []*KV) error {\n}\nif t.insertionCountSinceFlush >= t.flushThld {\n- _, _, err := t.flushTree()\n+ _, _, err := t.flushTree(false)\nreturn err\n}\n@@ -1289,7 +1463,7 @@ func (t *TBtree) SnapshotSince(ts uint64) (*Snapshot, error) {\nif t.lastSnapRoot == nil || t.lastSnapRoot.ts() < ts ||\n(t.renewSnapRootAfter > 0 && time.Since(t.lastSnapRootAt) >= t.renewSnapRootAfter) {\n- _, _, err := t.flushTree()\n+ _, _, err := t.flushTree(false)\nif err != nil {\nreturn nil, err\n}\n@@ -1489,7 +1663,7 @@ func (n *innerNode) setTs(ts uint64) (node, error) {\nreturn n, nil\n}\n-func (n *innerNode) size() int {\n+func (n *innerNode) size() (int, error) {\nsize := 1 // Node type\nsize += 2 // Child count\n@@ -1501,7 +1675,7 @@ func (n *innerNode) size() int {\nsize += 8 // Offset\n}\n- return size\n+ return size, nil\n}\nfunc (n *innerNode) mutated() bool {\n@@ -1548,7 +1722,12 @@ func (n *innerNode) indexOf(key []byte) int {\n}\nfunc (n *innerNode) split() (node, error) {\n- if n.size() <= n.t.maxNodeSize {\n+ size, err := n.size()\n+ if err != nil {\n+ return nil, err\n+ }\n+\n+ if size <= n.t.maxNodeSize {\nmetricsBtreeInnerNodeEntries.WithLabelValues(n.t.path).Observe(float64(len(n.nodes)))\nreturn nil, nil\n}\n@@ -1632,8 +1811,13 @@ func (r *nodeRef) setTs(ts uint64) (node, error) {\nreturn n.setTs(ts)\n}\n-func (r *nodeRef) size() int {\n- panic(\"nodeRef.size() is not meant to be called\")\n+func (r *nodeRef) size() (int, error) {\n+ n, err := r.t.nodeAt(r.off, false)\n+ if err != nil {\n+ return 0, err\n+ }\n+\n+ return n.size()\n}\nfunc (r *nodeRef) mutated() bool {\n@@ -1955,7 +2139,7 @@ func (l *leafNode) setTs(ts uint64) (node, error) {\nreturn l, nil\n}\n-func (l *leafNode) size() int {\n+func (l *leafNode) size() (int, error) {\nsize := 1 // Node type\nsize += 2 // kv count\n@@ -1970,7 +2154,7 @@ func (l *leafNode) size() int {\nsize += 8 // hCount\n}\n- return size\n+ return size, nil\n}\nfunc (l *leafNode) mutated() bool {\n@@ -1982,7 +2166,12 @@ func (l *leafNode) offset() int64 {\n}\nfunc (l *leafNode) split() (node, error) {\n- if l.size() <= l.t.maxNodeSize {\n+ size, err := l.size()\n+ if err != nil {\n+ return nil, err\n+ }\n+\n+ if size <= l.t.maxNodeSize {\nmetricsBtreeLeafNodeEntries.WithLabelValues(l.t.path).Observe(float64(len(l.values)))\nreturn nil, nil\n}\n",
"new_path": "embedded/tbtree/tbtree.go",
"old_path": "embedded/tbtree/tbtree.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -17,6 +17,7 @@ package tbtree\nimport (\n\"bytes\"\n+ \"crypto/sha256\"\n\"encoding/binary\"\n\"errors\"\n\"fmt\"\n@@ -47,8 +48,16 @@ func TestEdgeCases(t *testing.T) {\n_, err = OpenWith(path, nil, nil, nil, nil)\nrequire.ErrorIs(t, err, ErrIllegalArguments)\n- nLog := &mocked.MockedAppendable{}\n- hLog := &mocked.MockedAppendable{}\n+ nLog := &mocked.MockedAppendable{\n+ ChecksumFn: func(off, len int64) (checksum [sha256.Size]byte, err error) {\n+ return\n+ },\n+ }\n+ hLog := &mocked.MockedAppendable{\n+ ChecksumFn: func(off, len int64) (checksum [sha256.Size]byte, err error) {\n+ return\n+ },\n+ }\ncLog := &mocked.MockedAppendable{}\ninjectedError := errors.New(\"error\")\n@@ -142,6 +151,8 @@ func TestEdgeCases(t *testing.T) {\nfor i := range bs {\nbs[i] = 0\n}\n+ binary.BigEndian.PutUint64(bs[8:], 1) // set final size\n+ binary.BigEndian.PutUint32(bs[16:], 1) // set a min node size\nreturn len(bs), nil\n}\nnLog.ReadAtFn = func(bs []byte, off int64) (int, error) {\n@@ -653,7 +664,11 @@ func TestTBTreeCompactionEdgeCases(t *testing.T) {\ninjectedError := errors.New(\"error\")\n- nLog := &mocked.MockedAppendable{}\n+ nLog := &mocked.MockedAppendable{\n+ ChecksumFn: func(off, len int64) (checksum [sha256.Size]byte, err error) {\n+ return\n+ },\n+ }\ncLog := &mocked.MockedAppendable{}\nt.Run(\"Should fail while dumping the snapshot\", func(t *testing.T) {\n",
"new_path": "embedded/tbtree/tbtree_test.go",
"old_path": "embedded/tbtree/tbtree_test.go"
}
] |
Go
|
Apache License 2.0
|
codenotary/immudb
|
chore(embedded/tbtree): checksum-based snapshot consistency validation
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
| 1
|
chore
|
embedded/tbtree
|
472,065
|
24.02.2022 15:40:33
| -32,400
|
ae1526b6ee23cb1b9d6eb1af72438903c520c474
|
feat(spindle-ui): fix HeroCarousel design
|
[
{
"change_type": "MODIFY",
"diff": ".spui-HeroCarousel-container {\nalign-items: center;\ndisplay: flex;\n- height: 11.6em;\n+ height: 12.5em;\njustify-content: center;\noverflow: hidden;\n- padding: 0.6rem 0;\n}\n.spui-HeroCarousel-list {\nmargin-right: 0.88em;\npadding: 0 0.44em;\ntransition: transform 0.5s;\n- width: 16.7em;\n+ width: 17.5em;\n}\n.spui-HeroCarousel-controls {\nborder: 1px solid var(--color-border-low-emphasis);\nborder-radius: 100px;\ndisplay: flex;\n+ height: 2.5em;\nmargin: 0.88em auto 0;\n- width: fit-content;\n+ width: 7.63em;\n}\n.spui-HeroCarousel-control {\nbackground-color: transparent;\nborder: none;\ndisplay: flex;\n- height: 3em;\n+ font-size: 1em;\n+ height: 100%;\njustify-content: center;\npadding: 0;\n- width: 3em;\n+ width: calc(100% / 3);\n}\n.spui-HeroCarousel-control:hover {\n@media screen and (min-width: 768px) {\n.spui-HeroCarousel-container {\n- height: 13em;\n+ height: 14.3em;\n}\n.spui-HeroCarousel-list {\nmargin-right: 1.5em;\npadding: 0 0.75em;\n- width: 18.5em;\n+ width: 20em;\n}\n.spui-HeroCarousel-controls {\n+ height: 2.75em;\nmargin-top: 1.25em;\n- }\n-\n- .spui-HeroCarousel-control {\n- height: 3.3em;\n- width: 3.3em;\n+ width: 8.38em;\n}\n}\n/* stylelint-disable plugin/selector-bem-pattern */\n.spui-HeroCarousel-control > svg {\ncolor: var(--color-text-low-emphasis);\n- height: 1.35em;\n- width: 1.35em;\n+ height: 1.13em;\n+ width: 1.13em;\n}\n@media screen and (min-width: 768px) {\n.spui-HeroCarousel-control > svg {\n- height: 1.5em;\n- width: 1.5em;\n+ height: 1.25em;\n+ width: 1.25em;\n}\n}\n",
"new_path": "packages/spindle-ui/src/HeroCarousel/HeroCarousel.css",
"old_path": "packages/spindle-ui/src/HeroCarousel/HeroCarousel.css"
},
{
"change_type": "MODIFY",
"diff": "flex-direction: column;\nheight: 12em;\ntext-decoration: none;\n+ width: 17.5em;\n}\n.spui-HeroCarouselItem-link:focus {\n.spui-HeroCarouselItem-link {\nheight: 13.8em;\n+ width: 20em;\n}\n.spui-HeroCarouselItem-titleContainer {\n",
"new_path": "packages/spindle-ui/src/HeroCarousel/HeroCarouselItem.css",
"old_path": "packages/spindle-ui/src/HeroCarousel/HeroCarouselItem.css"
}
] |
TypeScript
|
MIT License
|
openameba/spindle
|
feat(spindle-ui): fix HeroCarousel design
| 1
|
feat
|
spindle-ui
|
847,143
|
24.02.2022 15:40:37
| -28,800
|
74f08989736cb494749eabe84c0a7d186fd9fc5f
|
fix(md-enhance): fix presentation tree-shaking
|
[
{
"change_type": "MODIFY",
"diff": "@@ -61,8 +61,9 @@ export default [\n/^reveal\\.js/,\n\"vue\",\n/\\.scss$/,\n+ /\\.css$/,\n],\n- dtsExternal: [/\\.scss$/],\n+ dtsExternal: [/\\.scss$/, /\\.css$/],\n}),\n...rollupTypescript(\"client/SlidePage\", {\nexternal: [\n",
"new_path": "packages/md-enhance/rollup.config.js",
"old_path": "packages/md-enhance/rollup.config.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -27,14 +27,7 @@ export default defineClientAppEnhance(({ app }) => {\nif (Mermaid.name) app.component(\"MermaidChart\", Mermaid);\n- if (Presentation.name) {\n- app.component(\"PresentationViewer\", Presentation);\n- void import(\"./styles/slides/index.scss\");\n- void import(\"./styles/slides/theme/fonts/league-gothic/league-gothic.css\");\n- void import(\n- \"./styles/slides/theme/fonts/source-sans-pro/source-sans-pro.css\"\n- );\n- }\n+ if (Presentation.name) app.component(\"PresentationViewer\", Presentation);\nif (MARKDOWN_ENHANCE_TASKLIST) void import(\"./styles/tasklist.scss\");\n",
"new_path": "packages/md-enhance/src/client/appEnhance.ts",
"old_path": "packages/md-enhance/src/client/appEnhance.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -28,6 +28,10 @@ type ThemeType =\n| \"blood\"\n| \"moon\";\n+import \"../styles/slides/index.scss\";\n+import \"../styles/slides/theme/fonts/league-gothic/league-gothic.css\";\n+import \"../styles/slides/theme/fonts/source-sans-pro/source-sans-pro.css\";\n+\nexport default defineComponent({\nname: \"PresentationViewer\",\n",
"new_path": "packages/md-enhance/src/client/components/Presentation.ts",
"old_path": "packages/md-enhance/src/client/components/Presentation.ts"
}
] |
TypeScript
|
MIT License
|
vuepress-theme-hope/vuepress-theme-hope
|
fix(md-enhance): fix presentation tree-shaking
| 1
|
fix
|
md-enhance
|
826,703
|
24.02.2022 15:45:58
| -19,080
|
d9fa618922164bb28ab96eff673745373b5d6962
|
chore: use live mailchimp list ids
|
[
{
"change_type": "MODIFY",
"diff": "@@ -199,8 +199,8 @@ jobs:\nsteps:\n- uses: ory/ci/newsletter@master\nwith:\n- mailchimp_list_id: 058a056618\n- mailchmip_segment_id: 11398953\n+ mailchimp_list_id: f605a41b53\n+ mailchmip_segment_id: 6479489\nmailchimp_api_key: ${{ secrets.MAILCHIMP_API_KEY }}\ndraft: 'true'\nssh_key: ${{ secrets.ORY_BOT_SSH_KEY }}\n@@ -226,8 +226,8 @@ jobs:\nsteps:\n- uses: ory/ci/newsletter@master\nwith:\n- mailchimp_list_id: 058a056618\n- mailchmip_segment_id: 11398953\n+ mailchimp_list_id: f605a41b53\n+ mailchmip_segment_id: 6479489\nmailchimp_api_key: ${{ secrets.MAILCHIMP_API_KEY }}\ndraft: 'false'\nssh_key: ${{ secrets.ORY_BOT_SSH_KEY }}\n",
"new_path": ".github/workflows/ci.yaml",
"old_path": ".github/workflows/ci.yaml"
}
] |
Go
|
Apache License 2.0
|
ory/keto
|
chore: use live mailchimp list ids (#846)
| 1
|
chore
| null |
915,307
|
24.02.2022 15:46:04
| -19,080
|
0343fde5f4c1bda859ac8333a51076a8db4f03f1
|
chore: use live mailchimp list ids
|
[
{
"change_type": "MODIFY",
"diff": "@@ -170,8 +170,8 @@ jobs:\nsteps:\n- uses: ory/ci/newsletter@master\nwith:\n- mailchimp_list_id: 058a056618\n- mailchmip_segment_id: 11398953\n+ mailchimp_list_id: f605a41b53\n+ mailchmip_segment_id: 6479485\nmailchimp_api_key: ${{ secrets.MAILCHIMP_API_KEY }}\ndraft: 'true'\nssh_key: ${{ secrets.ORY_BOT_SSH_KEY }}\n@@ -197,8 +197,8 @@ jobs:\nsteps:\n- uses: ory/ci/newsletter@master\nwith:\n- mailchimp_list_id: 058a056618\n- mailchmip_segment_id: 11398953\n+ mailchimp_list_id: f605a41b53\n+ mailchmip_segment_id: 6479485\nmailchimp_api_key: ${{ secrets.MAILCHIMP_API_KEY }}\ndraft: 'false'\nssh_key: ${{ secrets.ORY_BOT_SSH_KEY }}\n",
"new_path": ".github/workflows/ci.yml",
"old_path": ".github/workflows/ci.yml"
}
] |
Go
|
Apache License 2.0
|
ory/oathkeeper
|
chore: use live mailchimp list ids (#932)
| 1
|
chore
| null |
777,354
|
24.02.2022 15:49:31
| 28,800
|
119877ba199044d2de92a09e2d24305ba167d912
|
feat: add `accelerator` field for resource pool
|
[
{
"change_type": "MODIFY",
"diff": "Binary files a/harness/determined/common/api/bindings.py and b/harness/determined/common/api/bindings.py differ\n",
"new_path": "harness/determined/common/api/bindings.py",
"old_path": "harness/determined/common/api/bindings.py"
},
{
"change_type": "MODIFY",
"diff": "@@ -294,6 +294,7 @@ func (a *agentResourceManager) createResourcePoolSummary(\ninstanceType := \"\"\nslotsPerAgent := -1\nslotType := device.ZeroSlot\n+ accelerator := \"\"\nif pool.Provider != nil {\nif pool.Provider.AWS != nil {\n@@ -304,6 +305,7 @@ func (a *agentResourceManager) createResourcePoolSummary(\ninstanceType = string(pool.Provider.AWS.InstanceType)\nslotsPerAgent = pool.Provider.AWS.SlotsPerInstance()\nslotType = pool.Provider.AWS.SlotType()\n+ accelerator = pool.Provider.AWS.Accelerator()\n}\nif pool.Provider.GCP != nil {\npoolType = resourcepoolv1.ResourcePoolType_RESOURCE_POOL_TYPE_GCP\n@@ -312,6 +314,7 @@ func (a *agentResourceManager) createResourcePoolSummary(\nimageID = pool.Provider.GCP.BootDiskSourceImage\nslotsPerAgent = pool.Provider.GCP.SlotsPerInstance()\nslotType = pool.Provider.GCP.SlotType()\n+ accelerator = pool.Provider.GCP.Accelerator()\nif pool.Provider.GCP.InstanceType.GPUNum == 0 {\ninstanceType = pool.Provider.GCP.InstanceType.MachineType\n} else {\n@@ -359,6 +362,7 @@ func (a *agentResourceManager) createResourcePoolSummary(\nInstanceType: instanceType,\nDetails: &resourcepoolv1.ResourcePoolDetail{},\nSlotType: slotType.Proto(),\n+ Accelerator: accelerator,\n}\nif pool.Provider != nil {\nresp.MinAgents = int32(pool.Provider.MinInstances)\n",
"new_path": "master/internal/resourcemanagers/agent_resource_manager.go",
"old_path": "master/internal/resourcemanagers/agent_resource_manager.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -185,6 +185,11 @@ func (c AWSClusterConfig) SlotType() device.Type {\nreturn device.ZeroSlot\n}\n+// Accelerator returns the GPU accelerator for the instance.\n+func (c AWSClusterConfig) Accelerator() string {\n+ return c.InstanceType.Accelerator()\n+}\n+\nfunc validateMaxSpotPrice(spotMaxPriceInput string) error {\n// Must have 1 or 0 decimalPoints. All other characters must be digits\nnumDecimalPoints := strings.Count(spotMaxPriceInput, \".\")\n@@ -233,6 +238,33 @@ func (t ec2InstanceType) Slots() int {\nreturn 0\n}\n+// source: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/accelerated-computing-instances.html\n+func (t ec2InstanceType) Accelerator() string {\n+ instanceType := t.name()\n+ if strings.HasPrefix(instanceType, \"p2\") {\n+ return \"NVIDIA Tesla K80\"\n+ }\n+ if strings.HasPrefix(instanceType, \"p3\") {\n+ return \"NVIDIA Tesla V100\"\n+ }\n+ if strings.HasPrefix(instanceType, \"p4d\") {\n+ return \"NVIDIA A100\"\n+ }\n+ if strings.HasPrefix(instanceType, \"g3\") {\n+ return \"NVIDIA Tesla M60\"\n+ }\n+ if strings.HasPrefix(instanceType, \"g5g\") {\n+ return \"NVIDIA T4G\"\n+ }\n+ if strings.HasPrefix(instanceType, \"g5\") {\n+ return \"NVIDIA A10G\"\n+ }\n+ if strings.HasPrefix(instanceType, \"g4dn\") {\n+ return \"NVIDIA T4 Tensor Core\"\n+ }\n+ return \"\"\n+}\n+\n// This map tracks how many slots are available in each instance type. It also\n// serves as the list of instance types that the provisioner may provision - if\n// the master.yaml is configured with an instance type and instance slots are\n",
"new_path": "master/internal/resourcemanagers/provisioner/aws_config.go",
"old_path": "master/internal/resourcemanagers/provisioner/aws_config.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -223,6 +223,11 @@ func (c GCPClusterConfig) SlotType() device.Type {\nreturn device.ZeroSlot\n}\n+// Accelerator returns the GPU accelerator for the instance.\n+func (c GCPClusterConfig) Accelerator() string {\n+ return c.InstanceType.GPUType\n+}\n+\nfunc (c GCPClusterConfig) buildDockerLogString() string {\nif c.UseCloudLogging {\nreturn \"--log-driver gcplogs\"\n",
"new_path": "master/internal/resourcemanagers/provisioner/gcp_config.go",
"old_path": "master/internal/resourcemanagers/provisioner/gcp_config.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -171,6 +171,8 @@ message ResourcePool {\n// GCP, AWS and Priority Scheduler details\ndetermined.resourcepool.v1.ResourcePoolDetail details = 31;\n+ // GCP, AWS accelerator information\n+ string accelerator = 33;\n}\n// Detailed information about the resource pool\n",
"new_path": "proto/src/determined/resourcepool/v1/resourcepool.proto",
"old_path": "proto/src/determined/resourcepool/v1/resourcepool.proto"
},
{
"change_type": "MODIFY",
"diff": "Binary files a/webui/react/src/services/api-ts-sdk/api.ts and b/webui/react/src/services/api-ts-sdk/api.ts differ\n",
"new_path": "webui/react/src/services/api-ts-sdk/api.ts",
"old_path": "webui/react/src/services/api-ts-sdk/api.ts"
}
] |
Python
|
Apache License 2.0
|
determined-ai/determined
|
feat: add `accelerator` field for resource pool [DET-6755] (#3659)
| 1
|
feat
| null |
126,276
|
24.02.2022 15:52:50
| 10,800
|
6bffc9fc9a54b551f8db2ed0e3cf95756287b4b4
|
chore(embedded/appendable): appendable checksum calculation
chore(embedded/appendable): appendable checksum calculation
|
[
{
"change_type": "MODIFY",
"diff": "@@ -18,6 +18,7 @@ package appendable\nimport (\n\"compress/flate\"\n\"crypto/sha256\"\n+ \"io\"\n)\nconst DefaultCompressionFormat = NoCompression\n@@ -47,9 +48,22 @@ type Appendable interface {\nFlush() error\nSync() error\nReadAt(bs []byte, off int64) (int, error)\n- Checksum(off, len int64) ([sha256.Size]byte, error)\nClose() error\nCopy(dstPath string) error\nCompressionFormat() int\nCompressionLevel() int\n}\n+\n+func Checksum(rAt io.ReaderAt, off, n int64) (checksum [sha256.Size]byte, err error) {\n+ h := sha256.New()\n+ r := io.NewSectionReader(rAt, off, n)\n+\n+ _, err = io.Copy(h, r)\n+ if err != nil {\n+ return\n+ }\n+\n+ copy(checksum[:], h.Sum(nil))\n+\n+ return checksum, nil\n+}\n",
"new_path": "embedded/appendable/appendable.go",
"old_path": "embedded/appendable/appendable.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -16,7 +16,6 @@ limitations under the License.\npackage multiapp\nimport (\n- \"crypto/sha256\"\n\"errors\"\n\"fmt\"\n\"io\"\n@@ -496,24 +495,6 @@ func (mf *MultiFileAppendable) ReadAt(bs []byte, off int64) (int, error) {\nreturn r, nil\n}\n-func (mf *MultiFileAppendable) Checksum(off, len int64) (checksum [sha256.Size]byte, err error) {\n- var size int64\n-\n- size, err = mf.Size()\n- if err != nil {\n- return\n- }\n-\n- if size < off+len {\n- err = fmt.Errorf(\"%w: appendable size is smaller than required for checksum calculation\", io.EOF)\n- return\n- }\n-\n- // TODO: TO BE IMPLEMENTED\n-\n- return\n-}\n-\nfunc (mf *MultiFileAppendable) Flush() error {\nmf.mutex.Lock()\ndefer mf.mutex.Unlock()\n",
"new_path": "embedded/appendable/multiapp/multi_app.go",
"old_path": "embedded/appendable/multiapp/multi_app.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -2,7 +2,6 @@ package remoteapp\nimport (\n\"context\"\n- \"crypto/sha256\"\n\"encoding/binary\"\n\"io\"\n\"io/ioutil\"\n@@ -125,10 +124,6 @@ func (r *remoteStorageReader) ReadAt(bs []byte, off int64) (int, error) {\n// return n, nil\n}\n-func (r *remoteStorageReader) Checksum(off, len int64) ([sha256.Size]byte, error) {\n- panic(\"unimplemented\")\n-}\n-\nfunc (r *remoteStorageReader) Close() error {\nreturn nil\n}\n",
"new_path": "embedded/appendable/remoteapp/remote_storage_reader.go",
"old_path": "embedded/appendable/remoteapp/remote_storage_reader.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -22,10 +22,8 @@ import (\n\"compress/gzip\"\n\"compress/lzw\"\n\"compress/zlib\"\n- \"crypto/sha256\"\n\"encoding/binary\"\n\"errors\"\n- \"fmt\"\n\"io\"\n\"os\"\n\"sync\"\n@@ -426,24 +424,6 @@ func (aof *AppendableFile) ReadAt(bs []byte, off int64) (n int, err error) {\nreturn\n}\n-func (aof *AppendableFile) Checksum(off, len int64) (checksum [sha256.Size]byte, err error) {\n- var size int64\n-\n- size, err = aof.Size()\n- if err != nil {\n- return\n- }\n-\n- if size < off+len {\n- err = fmt.Errorf(\"%w: appendable size is smaller than required for checksum calculation\", io.EOF)\n- return\n- }\n-\n- // TODO: TO BE IMPLEMENTED\n-\n- return\n-}\n-\nfunc (aof *AppendableFile) Flush() error {\naof.mutex.Lock()\ndefer aof.mutex.Unlock()\n",
"new_path": "embedded/appendable/singleapp/single_app.go",
"old_path": "embedded/appendable/singleapp/single_app.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -558,14 +558,14 @@ func OpenWith(path string, nLog, hLog, cLog appendable.Appendable, opts *Options\nreturn nil, fmt.Errorf(\"%w: while deserializing index commit log entry at '%s'\", err, path)\n}\n- nLogChecksum, nerr := t.nLog.Checksum(cLogEntry.initialNLogSize, cLogEntry.finalNLogSize-cLogEntry.initialNLogSize)\n+ nLogChecksum, nerr := appendable.Checksum(t.nLog, cLogEntry.initialNLogSize, cLogEntry.finalNLogSize-cLogEntry.initialNLogSize)\nif nerr != nil && nerr != io.EOF {\n- return nil, fmt.Errorf(\"%w: while calculating nodes log checksum at '%s'\", err, path)\n+ return nil, fmt.Errorf(\"%w: while calculating nodes log checksum at '%s'\", nerr, path)\n}\n- hLogChecksum, herr := t.hLog.Checksum(cLogEntry.initialHLogSize, cLogEntry.finalHLogSize-cLogEntry.initialHLogSize)\n+ hLogChecksum, herr := appendable.Checksum(t.hLog, cLogEntry.initialHLogSize, cLogEntry.finalHLogSize-cLogEntry.initialHLogSize)\nif herr != nil && herr != io.EOF {\n- return nil, fmt.Errorf(\"%w: while calculating history log checksum at '%s'\", err, path)\n+ return nil, fmt.Errorf(\"%w: while calculating history log checksum at '%s'\", herr, path)\n}\nmustDiscard := nerr == io.EOF ||\n@@ -574,6 +574,8 @@ func OpenWith(path string, nLog, hLog, cLog appendable.Appendable, opts *Options\nhLogChecksum != cLogEntry.hLogChecksum\nif mustDiscard {\n+ t.log.Infof(\"Discarding snapshots due to checksum mismatch at '%s'\", path)\n+\ndiscardedCLogEntries += int(t.committedLogSize/cLogEntrySize) + 1\nvalidatedCLogEntry = nil\n@@ -1054,12 +1056,12 @@ func (t *TBtree) flushTree(synced bool) (wN int64, wH int64, err error) {\nfinalHLogSize: t.committedHLogSize + wH,\n}\n- cLogEntry.nLogChecksum, err = t.nLog.Checksum(t.committedNLogSize, wN)\n+ cLogEntry.nLogChecksum, err = appendable.Checksum(t.nLog, t.committedNLogSize, wN)\nif err != nil {\nreturn 0, 0, t.wrapNwarn(\"Flushing index '%s' {ts=%d} returned: %v\", t.path, t.root.ts(), err)\n}\n- cLogEntry.hLogChecksum, err = t.hLog.Checksum(t.committedHLogSize, wH)\n+ cLogEntry.hLogChecksum, err = appendable.Checksum(t.hLog, t.committedHLogSize, wH)\nif err != nil {\nreturn 0, 0, t.wrapNwarn(\"Flushing index '%s' {ts=%d} returned: %v\", t.path, t.root.ts(), err)\n}\n@@ -1250,12 +1252,12 @@ func (t *TBtree) fullDumpTo(snapshot *Snapshot, nLog, cLog appendable.Appendable\nfinalHLogSize: hLogSize,\n}\n- cLogEntry.nLogChecksum, err = nLog.Checksum(cLogEntry.initialNLogSize, cLogEntry.finalNLogSize-cLogEntry.initialNLogSize)\n+ cLogEntry.nLogChecksum, err = appendable.Checksum(nLog, cLogEntry.initialNLogSize, cLogEntry.finalNLogSize-cLogEntry.initialNLogSize)\nif err != nil {\nreturn err\n}\n- cLogEntry.hLogChecksum, err = t.hLog.Checksum(cLogEntry.initialHLogSize, cLogEntry.finalHLogSize-cLogEntry.initialHLogSize)\n+ cLogEntry.hLogChecksum, err = appendable.Checksum(t.hLog, cLogEntry.initialHLogSize, cLogEntry.finalHLogSize-cLogEntry.initialHLogSize)\nif err != nil {\nreturn err\n}\n",
"new_path": "embedded/tbtree/tbtree.go",
"old_path": "embedded/tbtree/tbtree.go"
}
] |
Go
|
Apache License 2.0
|
codenotary/immudb
|
chore(embedded/appendable): appendable checksum calculation
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
chore(embedded/appendable): appendable checksum calculation
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
| 1
|
chore
|
embedded/appendable
|
841,385
|
24.02.2022 16:04:10
| -10,800
|
8512719e126d4041133a78e106bce6c7eca30154
|
feat(css/minifier): Compress `display`
|
[
{
"change_type": "MODIFY",
"diff": "@@ -43,6 +43,197 @@ impl VisitMut for CompressDeclaration {\nif let DeclarationName::Ident(Ident { value, .. }) = &declaration.name {\nmatch &*value.to_lowercase() {\n+ \"display\" if declaration.value.len() > 1 => {\n+ let mut outside = None;\n+ let mut inside = None;\n+ let mut list_item = None;\n+\n+ for value in declaration.value.iter() {\n+ match value {\n+ outside_node @ Value::Ident(Ident { value, .. })\n+ if matches!(\n+ &*value.to_lowercase(),\n+ \"block\" | \"inline\" | \"run-in\"\n+ ) =>\n+ {\n+ outside = Some(outside_node);\n+ }\n+ inside_node @ Value::Ident(Ident { value, .. })\n+ if matches!(\n+ &*value.to_lowercase(),\n+ \"flow\" | \"flow-root\" | \"table\" | \"flex\" | \"grid\" | \"ruby\"\n+ ) =>\n+ {\n+ inside = Some(inside_node);\n+ }\n+ list_item_node @ Value::Ident(Ident { value, .. })\n+ if &*value.to_lowercase() == \"list-item\" =>\n+ {\n+ if let Some(Value::Ident(Ident { value, .. })) = inside {\n+ if !matches!(&*value.to_lowercase(), \"flow\" | \"flow-root\") {\n+ continue;\n+ }\n+ }\n+\n+ list_item = Some(list_item_node)\n+ }\n+ _ => {}\n+ }\n+ }\n+\n+ match (outside, inside, list_item) {\n+ // `block flow` -> `block`\n+ // `inline flow` -> `inline`\n+ // `run-in flow` -> `run-in`\n+ (\n+ Some(outside),\n+ Some(Value::Ident(Ident {\n+ value: inside_value,\n+ ..\n+ })),\n+ None,\n+ ) if &*inside_value.to_lowercase() == \"flow\" => {\n+ declaration.value = vec![outside.clone()];\n+ }\n+ // `block flow-root` -> `flow-root`\n+ (\n+ Some(Value::Ident(Ident {\n+ value: outside_value,\n+ ..\n+ })),\n+ Some(\n+ inside @ Value::Ident(Ident {\n+ value: inside_value,\n+ ..\n+ }),\n+ ),\n+ None,\n+ ) if &*outside_value.to_lowercase() == \"block\"\n+ && &*inside_value.to_lowercase() == \"flow-root\" =>\n+ {\n+ declaration.value = vec![inside.clone()];\n+ }\n+ // `inline flow-root` -> `inline-block`\n+ (\n+ Some(Value::Ident(Ident {\n+ value: outside_value,\n+ span,\n+ ..\n+ })),\n+ Some(Value::Ident(Ident {\n+ value: inside_value,\n+ ..\n+ })),\n+ None,\n+ ) if &*outside_value.to_lowercase() == \"inline\"\n+ && &*inside_value.to_lowercase() == \"flow-root\" =>\n+ {\n+ declaration.value = vec![Value::Ident(Ident {\n+ span: *span,\n+ value: \"inline-block\".into(),\n+ raw: \"inline-block\".into(),\n+ })];\n+ }\n+ // `block flow list-item` -> `list-item`\n+ (\n+ Some(Value::Ident(Ident {\n+ value: outside_value,\n+ ..\n+ })),\n+ Some(Value::Ident(Ident {\n+ value: inside_value,\n+ ..\n+ })),\n+ Some(list_item),\n+ ) if &*outside_value.to_lowercase() == \"block\"\n+ && &*inside_value.to_lowercase() == \"flow\" =>\n+ {\n+ declaration.value = vec![list_item.clone()];\n+ }\n+ // `block list-item` -> `list-item`\n+ (\n+ Some(Value::Ident(Ident {\n+ value: outside_value,\n+ ..\n+ })),\n+ None,\n+ Some(list_item),\n+ ) if &*outside_value.to_lowercase() == \"block\" => {\n+ declaration.value = vec![list_item.clone()];\n+ }\n+ // `flow list-item` -> `list-item`\n+ (\n+ None,\n+ Some(Value::Ident(Ident {\n+ value: inside_value,\n+ ..\n+ })),\n+ Some(list_item),\n+ ) if &*inside_value.to_lowercase() == \"flow\" => {\n+ declaration.value = vec![list_item.clone()];\n+ }\n+ // `inline flow list-item` -> `inline list-item`\n+ (\n+ Some(\n+ outside @ Value::Ident(Ident {\n+ value: outside_value,\n+ ..\n+ }),\n+ ),\n+ Some(Value::Ident(Ident {\n+ value: inside_value,\n+ ..\n+ })),\n+ Some(list_item),\n+ ) if &*outside_value.to_lowercase() == \"inline\"\n+ && &*inside_value.to_lowercase() == \"flow\" =>\n+ {\n+ declaration.value = vec![outside.clone(), list_item.clone()];\n+ }\n+ // `block flex` -> `flex`\n+ // `block grid` -> `grid`\n+ // `block table` -> `table`\n+ (\n+ Some(Value::Ident(Ident {\n+ value: outside_value,\n+ ..\n+ })),\n+ Some(\n+ inside @ Value::Ident(Ident {\n+ value: inside_value,\n+ ..\n+ }),\n+ ),\n+ None,\n+ ) if &*outside_value.to_lowercase() == \"block\"\n+ && matches!(\n+ &*inside_value.to_lowercase(),\n+ \"flex\" | \"grid\" | \"table\"\n+ ) =>\n+ {\n+ declaration.value = vec![inside.clone()];\n+ }\n+ // `inline ruby` -> `ruby`\n+ (\n+ Some(Value::Ident(Ident {\n+ value: outside_value,\n+ ..\n+ })),\n+ Some(\n+ inside @ Value::Ident(Ident {\n+ value: inside_value,\n+ ..\n+ }),\n+ ),\n+ None,\n+ ) if &*outside_value.to_lowercase() == \"inline\"\n+ && inside_value.to_lowercase() == \"ruby\" =>\n+ {\n+ declaration.value = vec![inside.clone()];\n+ }\n+ _ => {}\n+ }\n+ }\n\"padding\" | \"margin\" | \"inset\" | \"scroll-margin\" | \"scroll-padding\"\nif declaration.value.len() > 1 =>\n{\n",
"new_path": "crates/swc_css_minifier/src/compress/declaration.rs",
"old_path": "crates/swc_css_minifier/src/compress/declaration.rs"
},
{
"change_type": "ADD",
"diff": "+.class1 {\n+ display: block flow;\n+}\n+\n+.class2 {\n+ DISPLAY: BLOCK FLOW;\n+}\n+\n+.class3 {\n+ display: flow block;\n+}\n+\n+.class4 {\n+ display: FLOW BLOCK;\n+}\n+\n+.class5 {\n+ display: block flow-root;\n+}\n+\n+.class6 {\n+ display: inline flow;\n+}\n+\n+.class7 {\n+ display: inline flow-root;\n+}\n+\n+.class8 {\n+ display: run-in flow;\n+}\n+\n+.class9 {\n+ display: block flow list-item;\n+}\n+\n+.class10 {\n+ display: flow list-item;\n+}\n+\n+.class11 {\n+ display: block list-item;\n+}\n+\n+.class12 {\n+ display: inline flow list-item;\n+}\n+\n+.class13 {\n+ display: inline flow-root list-item;\n+}\n+\n+.class14 {\n+ display: inline list-item;\n+}\n+\n+.class15 {\n+ display: flow-root list-item;\n+}\n+\n+.class16 {\n+ display: block flex;\n+}\n+\n+.class17 {\n+ display: inline flex;\n+}\n+\n+.class18 {\n+ display: block grid;\n+}\n+\n+.class19 {\n+ display: inline grid;\n+}\n+\n+.class20 {\n+ display: inline ruby;\n+}\n+\n+.class21 {\n+ display: block ruby;\n+}\n+\n+.class22 {\n+ display: block table;\n+}\n+\n+.class23 {\n+ display: inline table;\n+}\n+\n+.class23 {\n+ display: block;\n+}\n+\n+.class23 {\n+ display: inline;\n+}\n+\n+.class23 {\n+ display: inline-block;\n+}\n+\n+.class23 {\n+ display: flex;\n+}\n+\n+.class23 {\n+ display: inline-flex;\n+}\n+\n+.class23 {\n+ display: grid;\n+}\n+\n+.class23 {\n+ display: inline-grid;\n+}\n+\n+.class23 {\n+ display: flow-root;\n+}\n+\n+.class23 {\n+ display: none;\n+}\n+\n+.class23 {\n+ display: contents;\n+}\n+\n+.class23 {\n+ display: table-row;\n+}\n+\n+.class23 {\n+ display: inherit;\n+}\n+\n+.class23 {\n+ display: initial;\n+}\n+\n+.class23 {\n+ display: revert;\n+}\n+\n+.class23 {\n+ display: unset;\n+}\n+\n+.class24 {\n+ display: -webkit-flex;\n+}\n+\n+.class25 {\n+ display: -moz-box;\n+}\n",
"new_path": "crates/swc_css_minifier/tests/fixture/compress-declaration/display/input.css",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+.class1{display:block}.class2{DISPLAY:BLOCK}.class3{display:block}.class4{display:BLOCK}.class5{display:flow-root}.class6{display:inline}.class7{display:inline-block}.class8{display:run-in}.class9{display:list-item}.class10{display:list-item}.class11{display:list-item}.class12{display:inline list-item}.class13{display:inline flow-root list-item}.class14{display:inline list-item}.class15{display:flow-root list-item}.class16{display:flex}.class17{display:inline flex}.class18{display:grid}.class19{display:inline grid}.class20{display:ruby}.class21{display:block ruby}.class22{display:table}.class23{display:inline table}.class23{display:block}.class23{display:inline}.class23{display:inline-block}.class23{display:flex}.class23{display:inline-flex}.class23{display:grid}.class23{display:inline-grid}.class23{display:flow-root}.class23{display:none}.class23{display:contents}.class23{display:table-row}.class23{display:inherit}.class23{display:initial}.class23{display:revert}.class23{display:unset}.class24{display:-webkit-flex}.class25{display:-moz-box}\n",
"new_path": "crates/swc_css_minifier/tests/fixture/compress-declaration/display/output.min.css",
"old_path": null
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
feat(css/minifier): Compress `display` (#3706)
| 1
|
feat
|
css/minifier
|
847,143
|
24.02.2022 16:06:24
| -28,800
|
1b5b24a9cfe5d76280746ffed4bc5eb6760cdcbc
|
chore(demo): update README
|
[
{
"change_type": "MODIFY",
"diff": "-# Test for vuepress-plugin-theme\n+# vuepress-plugin-theme Demo\nThis is a demo and test for vuepress-theme-hope.\n+\n+You can use this demo directly via:\n+\n+```bash\n+npm init vuepress-theme-hope@next [dir]\n+```\n+\n+where `[dir]` is the folder you want to put the demo in.\n",
"new_path": "demo/README.md",
"old_path": "demo/README.md"
}
] |
TypeScript
|
MIT License
|
vuepress-theme-hope/vuepress-theme-hope
|
chore(demo): update README
| 1
|
chore
|
demo
|
756,031
|
24.02.2022 16:10:59
| 10,800
|
d44c803ec0af33a9c859783eb97da0de6f390cd9
|
ci: disable loadgen integration
|
[
{
"change_type": "MODIFY",
"diff": "@@ -28,7 +28,7 @@ DOCKER_VOLUMES=\"$(cd \"$thisdir/../../..\" > /dev/null && pwd -P):/usr/src/agoric-\nAG_COSMOS_START_ARGS=\"--log_level=info --trace-store=.ag-chain-cosmos/data/kvstore.trace\" \\\n\"$thisdir/setup.sh\" bootstrap ${1+\"$@\"}\n-if [ -d /usr/src/testnet-load-generator ]\n+if false && [ -d /usr/src/testnet-load-generator ]\nthen\n/usr/src/agoric-sdk/packages/deployment/scripts/setup.sh show-config > \"$RESULTSDIR/network-config\"\ncp ag-chain-cosmos/data/genesis.json \"$RESULTSDIR/genesis.json\"\n",
"new_path": "packages/deployment/scripts/integration-test.sh",
"old_path": "packages/deployment/scripts/integration-test.sh"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
ci: disable loadgen integration (#4661)
| 1
|
ci
| null |
304,908
|
24.02.2022 16:13:35
| 0
|
e32e142f600fa2bb90771630afee9136318246d8
|
fix: reclasify csv decoding errors as user errors
Added a note about using the mode: "raw" for csv that is not expected to have annotations.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -367,7 +367,8 @@ func readMetadata(r *bufferedCSVReader, c ResultDecoderConfig) (tableMetadata, e\n}\nswitch {\ncase datatypes == nil:\n- return tableMetadata{}, fmt.Errorf(\"missing expected annotation datatype\")\n+ return tableMetadata{}, errors.New(codes.FailedPrecondition, \"missing expected annotation datatype. \"+\n+ \"Consider using the mode: \\\"raw\\\" for csv that is not expected to have annotations.\")\ncase groups == nil:\nreturn tableMetadata{}, fmt.Errorf(\"missing expected annotation group\")\ncase defaults == nil:\n@@ -407,7 +408,8 @@ func readMetadata(r *bufferedCSVReader, c ResultDecoderConfig) (tableMetadata, e\nif !strings.HasPrefix(line[annotationIdx], commentPrefix) {\nswitch {\ncase datatypes == nil:\n- return tableMetadata{}, fmt.Errorf(\"missing expected annotation datatype\")\n+ return tableMetadata{}, errors.New(codes.FailedPrecondition, \"missing expected annotation datatype. \"+\n+ \"consider using the mode: \\\"raw\\\" for csv that is not expected to have annotations.\")\ncase groups == nil:\nreturn tableMetadata{}, fmt.Errorf(\"missing expected annotation group\")\ncase defaults == nil:\n",
"new_path": "csv/result.go",
"old_path": "csv/result.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -1447,7 +1447,7 @@ data1,data2,data3\nencoderConfig: csv.DefaultEncoderConfig(),\nencoded: toCRLF(`1,2`),\nresult: &executetest.Result{\n- Err: errors.New(\"failed to read metadata: missing expected annotation datatype\"),\n+ Err: errors.New(\"failed to read metadata: missing expected annotation datatype. consider using the mode: \\\"raw\\\" for csv that is not expected to have annotations.\"),\n},\n},\n",
"new_path": "csv/result_test.go",
"old_path": "csv/result_test.go"
}
] |
Go
|
MIT License
|
influxdata/flux
|
fix: reclasify csv decoding errors as user errors (#4504)
Added a note about using the mode: "raw" for csv that is not expected to have annotations.
| 1
|
fix
| null |
847,143
|
24.02.2022 16:16:35
| -28,800
|
8e54ad879cb7cc914d30c08937a214f3b8d0893b
|
fix(components): key pagination number
|
[
{
"change_type": "MODIFY",
"diff": "@@ -120,6 +120,7 @@ export default defineComponent({\nh(\n\"div\",\n{\n+ key: num,\nclass: { active: props.currentPage === num },\nrole: \"navigation\",\nonClick: () => navigate(num),\n",
"new_path": "packages/components/src/client/components/Pagination.ts",
"old_path": "packages/components/src/client/components/Pagination.ts"
}
] |
TypeScript
|
MIT License
|
vuepress-theme-hope/vuepress-theme-hope
|
fix(components): key pagination number
| 1
|
fix
|
components
|
841,421
|
24.02.2022 16:23:53
| -32,400
|
8b87bb48702f22e270574a0a67206b0dcc0b8058
|
fix(es/parser): Don't attach comments to `;`
|
[
{
"change_type": "ADD",
"diff": "+{\n+ \"jsc\": {\n+ \"parser\": {\n+ \"syntax\": \"typescript\",\n+ \"tsx\": false,\n+ \"decorators\": false,\n+ \"dynamicImport\": false\n+ }\n+ },\n+ \"sourceMaps\": true\n+}\n\\ No newline at end of file\n",
"new_path": "crates/swc/tests/fixture/issue-3715/1/input/.swcrc",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+a() /* IMPORTANT_DO_NOT_REMOVE */;\n",
"new_path": "crates/swc/tests/fixture/issue-3715/1/input/index.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+a() /* IMPORTANT_DO_NOT_REMOVE */ ;\n",
"new_path": "crates/swc/tests/fixture/issue-3715/1/output/index.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"mappings\": \"AAAAA,CAAC,EAAG,CAA6B,AAA7B,EAA6B,AAA7B,yBAA6B,AAA7B,EAA6B\",\n+ \"names\": [\n+ \"a\"\n+ ],\n+ \"sources\": [\n+ \"../../input/index.js\"\n+ ],\n+ \"sourcesContent\": [\n+ \"a() /* IMPORTANT_DO_NOT_REMOVE */;\\n\"\n+ ],\n+ \"version\": 3\n+}\n",
"new_path": "crates/swc/tests/fixture/issue-3715/1/output/index.map",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"jsc\": {\n+ \"target\": \"es2021\",\n+ \"parser\": {\n+ \"syntax\": \"typescript\",\n+ \"tsx\": false,\n+ \"decorators\": false,\n+ \"dynamicImport\": false\n+ }\n+ },\n+ \"sourceMaps\": true\n+}\n\\ No newline at end of file\n",
"new_path": "crates/swc/tests/fixture/issue-3715/2/input/.swcrc",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+a() /* IMPORTANT_DO_NOT_REMOVE */;\n",
"new_path": "crates/swc/tests/fixture/issue-3715/2/input/index.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+a() /* IMPORTANT_DO_NOT_REMOVE */ ;\n",
"new_path": "crates/swc/tests/fixture/issue-3715/2/output/index.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"mappings\": \"AAAAA,CAAC,EAAG,CAA6B,AAA7B,EAA6B,AAA7B,yBAA6B,AAA7B,EAA6B\",\n+ \"names\": [\n+ \"a\"\n+ ],\n+ \"sources\": [\n+ \"../../input/index.js\"\n+ ],\n+ \"sourcesContent\": [\n+ \"a() /* IMPORTANT_DO_NOT_REMOVE */;\\n\"\n+ ],\n+ \"version\": 3\n+}\n",
"new_path": "crates/swc/tests/fixture/issue-3715/2/output/index.map",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "-/* not comment*/ ;\n+;\na-- > 1;\n",
"new_path": "crates/swc_ecma_codegen/tests/test262/f2142c1dabd961c1.js",
"old_path": "crates/swc_ecma_codegen/tests/test262/f2142c1dabd961c1.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -3,20 +3,20 @@ use std::{iter::Rev, rc::Rc, vec::IntoIter};\nuse swc_common::{comments::Comment, BytePos};\n#[derive(Clone)]\n-pub struct BufferedComment {\n+pub(crate) struct BufferedComment {\npub kind: BufferedCommentKind,\npub pos: BytePos,\npub comment: Comment,\n}\n#[derive(Clone)]\n-pub enum BufferedCommentKind {\n+pub(crate) enum BufferedCommentKind {\nLeading,\nTrailing,\n}\n#[derive(Clone)]\n-pub struct CommentsBuffer {\n+pub(crate) struct CommentsBuffer {\ncomments: OneDirectionalList<BufferedComment>,\npending_leading: OneDirectionalList<Comment>,\n}\n",
"new_path": "crates/swc_ecma_parser/src/lexer/comments_buffer.rs",
"old_path": "crates/swc_ecma_parser/src/lexer/comments_buffer.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -375,7 +375,7 @@ impl<'a, I: Input> Lexer<'a, I> {\nif self.state.had_line_break && c == '-' && self.eat(b'>') {\nself.emit_module_mode_error(start, SyntaxError::LegacyCommentInModule);\nself.skip_line_comment(0);\n- self.skip_space()?;\n+ self.skip_space(true)?;\nreturn self.read_token();\n}\n@@ -623,7 +623,7 @@ impl<'a, I: Input> Lexer<'a, I> {\n// XML style comment. `<!--`\nif c == '<' && self.is(b'!') && self.peek() == Some('-') && self.peek_ahead() == Some('-') {\nself.skip_line_comment(3);\n- self.skip_space()?;\n+ self.skip_space(true)?;\nself.emit_module_mode_error(start, SyntaxError::LegacyCommentInModule);\nreturn self.read_token();\n",
"new_path": "crates/swc_ecma_parser/src/lexer/mod.rs",
"old_path": "crates/swc_ecma_parser/src/lexer/mod.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -187,7 +187,7 @@ impl<'a, I: Input> Iterator for Lexer<'a, I> {\n// skip spaces before getting next character, if we are allowed to.\nif self.state.can_skip_space() {\n- self.skip_space()?;\n+ self.skip_space(true)?;\nstart = self.input.cur_pos();\n};\n",
"new_path": "crates/swc_ecma_parser/src/lexer/state.rs",
"old_path": "crates/swc_ecma_parser/src/lexer/state.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -179,7 +179,7 @@ impl<'a, I: Input> Lexer<'a, I> {\n/// Skip comments or whitespaces.\n///\n/// See https://tc39.github.io/ecma262/#sec-white-space\n- pub(super) fn skip_space(&mut self) -> LexResult<()> {\n+ pub(super) fn skip_space(&mut self, lex_comments: bool) -> LexResult<()> {\nloop {\nif self.input.eat_byte(b'\\n') || self.input.eat_byte(b'\\r') {\nself.state.had_line_break = true;\n@@ -195,6 +195,17 @@ impl<'a, I: Input> Lexer<'a, I> {\ncontinue;\n}\n+ if lex_comments && self.input.is_byte(b'/') {\n+ if self.peek() == Some('/') {\n+ self.skip_line_comment(2);\n+ continue;\n+ } else if self.peek() == Some('*') {\n+ self.skip_block_comment()?;\n+ continue;\n+ }\n+ break;\n+ }\n+\nlet c = self.cur();\nlet c = match c {\nSome(v) => v,\n@@ -209,17 +220,6 @@ impl<'a, I: Input> Lexer<'a, I> {\nself.state.had_line_break = true;\n}\n- '/' => {\n- if self.peek() == Some('/') {\n- self.skip_line_comment(2);\n- continue;\n- } else if self.peek() == Some('*') {\n- self.skip_block_comment()?;\n- continue;\n- }\n- break;\n- }\n-\n_ if c.is_whitespace() => {}\n_ => break,\n@@ -299,7 +299,7 @@ impl<'a, I: Input> Lexer<'a, I> {\nfalse\n};\n- let is_for_next = self.state.had_line_break || !self.state.can_have_trailing_comment();\n+ let mut is_for_next = self.state.had_line_break || !self.state.can_have_trailing_comment();\nwhile let Some(c) = self.cur() {\nif was_star && c == '/' {\n@@ -308,6 +308,12 @@ impl<'a, I: Input> Lexer<'a, I> {\nlet end = self.cur_pos();\n+ self.skip_space(false)?;\n+\n+ if self.input.is_byte(b';') {\n+ is_for_next = false;\n+ }\n+\nif let Some(comments) = self.comments_buffer.as_mut() {\nlet src = self.input.slice(slice_start, end);\nlet s = &src[..src.len() - 2];\n",
"new_path": "crates/swc_ecma_parser/src/lexer/util.rs",
"old_path": "crates/swc_ecma_parser/src/lexer/util.rs"
},
{
"change_type": "ADD",
"diff": "+a() /* IMPORTANT_DO_NOT_REMOVE */;\n",
"new_path": "crates/swc_ecma_parser/tests/comments/issue-3715/input.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+note: Trailing (hi)\n+ |\n+note: IMPORTANT_DO_NOT_REMOVE\n+ --> $DIR/tests/comments/issue-3715/input.js:1:4\n+ |\n+1 | a() /* IMPORTANT_DO_NOT_REMOVE */;\n+ | ^\n+\n",
"new_path": "crates/swc_ecma_parser/tests/comments/issue-3715/input.js.stderr",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+#!/usr/bin/env bash\n+set -u\n+\n+export UPDATE=1\n+export DIFF=0\n+\n+cargo test -p swc -p swc_ecma_codegen -p swc_ecma_parser -p swc_bundler -p swc_node_bundler --no-fail-fast\n+\n+git add -A\n+git commit -m 'Update test refs'\n+git push -u origin \"$(git rev-parse --abbrev-ref HEAD)\" --no-verify\n\\ No newline at end of file\n",
"new_path": "scripts/update-all.sh",
"old_path": null
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
fix(es/parser): Don't attach comments to `;` (#3720)
| 1
|
fix
|
es/parser
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.