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
⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
126,276
|
24.02.2022 16:32:46
| 10,800
|
62b6ea728cf856aaa891b3330fc81f411685bed9
|
test(embedded/tbtree): edge cases considering checksum validation
|
[
{
"change_type": "MODIFY",
"diff": "@@ -15,8 +15,6 @@ limitations under the License.\n*/\npackage mocked\n-import \"crypto/sha256\"\n-\ntype MockedAppendable struct {\nMetadataFn func() []byte\nSizeFn func() (int64, error)\n@@ -26,7 +24,6 @@ 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@@ -69,10 +66,6 @@ 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": "@@ -48,16 +48,8 @@ func TestEdgeCases(t *testing.T) {\n_, err = OpenWith(path, nil, nil, nil, nil)\nrequire.ErrorIs(t, err, ErrIllegalArguments)\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- }\n+ nLog := &mocked.MockedAppendable{}\n+ hLog := &mocked.MockedAppendable{}\ncLog := &mocked.MockedAppendable{}\ninjectedError := errors.New(\"error\")\n@@ -169,6 +161,18 @@ func TestEdgeCases(t *testing.T) {\nl := copy(bs, nLogBuffer[off:])\nreturn l, nil\n}\n+ cLog.ReadAtFn = func(bs []byte, off int64) (int, error) {\n+ binary.BigEndian.PutUint64(bs[8:], 1) // set final size\n+ binary.BigEndian.PutUint32(bs[16:], 1) // set a min node size\n+\n+ nLogChecksum, err := appendable.Checksum(nLog, 0, 1)\n+ copy(bs[20:], nLogChecksum[:])\n+\n+ hLogChecksum := sha256.Sum256(nil)\n+ copy(bs[68:], hLogChecksum[:])\n+\n+ return len(bs), err\n+ }\n_, err = OpenWith(path, nLog, hLog, cLog, DefaultOptions())\nrequire.ErrorIs(t, err, ErrReadingFileContent)\n})\n@@ -664,11 +668,7 @@ func TestTBTreeCompactionEdgeCases(t *testing.T) {\ninjectedError := errors.New(\"error\")\n- nLog := &mocked.MockedAppendable{\n- ChecksumFn: func(off, len int64) (checksum [sha256.Size]byte, err error) {\n- return\n- },\n- }\n+ nLog := &mocked.MockedAppendable{}\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
|
test(embedded/tbtree): edge cases considering checksum validation
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
| 1
|
test
|
embedded/tbtree
|
342,861
|
24.02.2022 16:35:53
| -3,600
|
aad7bfdc31b47301809813f591e73f463d49d22e
|
fix(ChoiceGroup): add forwardRef
|
[
{
"change_type": "MODIFY",
"diff": "@@ -31,5 +31,5 @@ export interface Props extends Common.Global {\nreadonly onChange: Common.Event<React.SyntheticEvent<HTMLInputElement>>;\n}\n-declare const ChoiceGroup: React.FunctionComponent<Props>;\n+declare const ChoiceGroup: React.ForwardRefRenderFunction<HTMLDivElement, Props>;\nexport { ChoiceGroup, ChoiceGroup as default };\n",
"new_path": "packages/orbit-components/src/ChoiceGroup/index.d.ts",
"old_path": "packages/orbit-components/src/ChoiceGroup/index.d.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -38,7 +38,9 @@ StyledChoiceGroup.defaultProps = {\ntheme: defaultTheme,\n};\n-const ChoiceGroup = ({\n+const ChoiceGroup: React.AbstractComponent<Props, HTMLDivElement> = React.forwardRef(\n+ (\n+ {\ndataTest,\nlabel,\nlabelSize = LABEL_SIZES.NORMAL,\n@@ -49,7 +51,9 @@ const ChoiceGroup = ({\nonOnlySelection,\nonlySelectionText,\nonChange,\n-}: Props): React.Node => {\n+ },\n+ ref,\n+ ): React.Node => {\nconst groupID = useRandomId();\nconst theme = useTheme();\n@@ -66,7 +70,7 @@ const ChoiceGroup = ({\n};\nreturn (\n- <StyledChoiceGroup data-test={dataTest} role=\"group\" aria-labelledby={groupID}>\n+ <StyledChoiceGroup ref={ref} data-test={dataTest} role=\"group\" aria-labelledby={groupID}>\n{label && (\n<Heading id={groupID} type={getHeadingSize(labelSize)} as={labelAs} spaceAfter=\"medium\">\n{label}\n@@ -112,6 +116,7 @@ const ChoiceGroup = ({\n{error && <Feedback>{error}</Feedback>}\n</StyledChoiceGroup>\n);\n-};\n+ },\n+);\nexport default ChoiceGroup;\n",
"new_path": "packages/orbit-components/src/ChoiceGroup/index.jsx",
"old_path": "packages/orbit-components/src/ChoiceGroup/index.jsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -33,4 +33,4 @@ export type Props = {|\nonChange: (SyntheticInputEvent<HTMLInputElement>) => void | Promise<any>,\n|};\n-declare export default React.ComponentType<Props>;\n+declare export default React.AbstractComponent<Props, HTMLDivElement>;\n",
"new_path": "packages/orbit-components/src/ChoiceGroup/index.jsx.flow",
"old_path": "packages/orbit-components/src/ChoiceGroup/index.jsx.flow"
}
] |
JavaScript
|
MIT License
|
kiwicom/orbit
|
fix(ChoiceGroup): add forwardRef
| 1
|
fix
|
ChoiceGroup
|
342,861
|
24.02.2022 16:36:26
| -3,600
|
a5884f3a6e2f8411929b8e70af2d21512b6523f2
|
fix(InputGroup): add forwardRef
|
[
{
"change_type": "MODIFY",
"diff": "@@ -23,5 +23,5 @@ interface Props extends Common.Global, Common.SpaceAfter {\nreadonly onBlur?: Event;\n}\n-declare const InputGroup: React.FC<Props>;\n+declare const InputGroup: React.ForwardRefRenderFunction<HTMLDivElement, Props>;\nexport { InputGroup, InputGroup as default };\n",
"new_path": "packages/orbit-components/src/InputGroup/index.d.ts",
"old_path": "packages/orbit-components/src/InputGroup/index.d.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -97,10 +97,10 @@ StyledChild.defaultProps = {\n};\nconst StyledInputGroup = styled(\n- ({ children, className, dataTest, role, ariaLabelledby, labelRef, dataState }) => (\n+ ({ children, className, dataTest, role, ariaLabelledby, ref, dataState }) => (\n<div\ndata-state={dataState}\n- ref={labelRef}\n+ ref={ref}\nclassName={className}\ndata-test={dataTest}\nrole={role}\n@@ -178,7 +178,10 @@ const findPropInChild = (propToFind, children): any =>\nreturn null;\n}).filter(el => el != null);\n-const InputGroup = ({\n+// TODO: styled component type\n+const InputGroup: React.AbstractComponent<Props, any> = React.forwardRef(\n+ (\n+ {\nchildren,\nlabel,\nflex,\n@@ -193,7 +196,9 @@ const InputGroup = ({\nonBlur,\nonChange,\nonBlurGroup,\n-}: Props): React.Node => {\n+ },\n+ ref,\n+ ): React.Node => {\nconst [active, setActive] = React.useState(false);\nconst [filled, setFilled] = React.useState(false);\nconst [labelOffset, setLabelOffset] = React.useState(null);\n@@ -264,6 +269,7 @@ const InputGroup = ({\nerror={errorReal}\nactive={active}\nsize={size}\n+ ref={ref}\ndataTest={dataTest}\ndataState={getFieldDataState(!!errorReal)}\nspaceAfter={spaceAfter}\n@@ -287,7 +293,8 @@ const InputGroup = ({\n<StyledChildren onBlur={handleBlurGroup}>\n{React.Children.toArray(children).map((item, key) => {\n- const childFlex = Array.isArray(flex) && flex.length !== 1 ? flex[key] || flex[0] : flex;\n+ const childFlex =\n+ Array.isArray(flex) && flex.length !== 1 ? flex[key] || flex[0] : flex;\nreturn (\n<StyledChild flex={childFlex || \"0 1 auto\"} key={randomId(String(key))}>\n{React.cloneElement(item, {\n@@ -321,6 +328,7 @@ const InputGroup = ({\n/>\n</StyledInputGroup>\n);\n-};\n+ },\n+);\nexport default InputGroup;\n",
"new_path": "packages/orbit-components/src/InputGroup/index.jsx",
"old_path": "packages/orbit-components/src/InputGroup/index.jsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -32,4 +32,4 @@ export type Props = {|\n) => void | Promise<any>,\n|};\n-declare export default React.ComponentType<Props>;\n+declare export default React.AbstractComponent<Props, HTMLDivElement>;\n",
"new_path": "packages/orbit-components/src/InputGroup/index.jsx.flow",
"old_path": "packages/orbit-components/src/InputGroup/index.jsx.flow"
}
] |
JavaScript
|
MIT License
|
kiwicom/orbit
|
fix(InputGroup): add forwardRef
| 1
|
fix
|
InputGroup
|
160,196
|
24.02.2022 16:38:07
| -28,800
|
c58c147c172901604834dda1a0dbb62a5f653579
|
feat: support animation
|
[
{
"change_type": "MODIFY",
"diff": ".lf-edge-append {\ncursor: pointer;\n}\n-\n+.lf-edge-animation {\n+ stroke-dashoffset: 100%;\n+ animation: dash 5s linear infinite;\n+}\n+@keyframes dash {\n+ to {\n+ stroke-dashoffset: 0;\n+ }\n+}\n/* node */\n.lf-node-not-allow {\ncursor: not-allowed;\n",
"new_path": "packages/core/src/style/index.css",
"old_path": "packages/core/src/style/index.css"
},
{
"change_type": "MODIFY",
"diff": "@@ -28,6 +28,28 @@ export default class LineEdge extends BaseEdge {\n</g>\n);\n}\n+ getAnimation() {\n+ const { model } = this.props;\n+ const { stroke, className, strokeDasharray } = model.getAnimation();\n+ const { startPoint, endPoint } = model;\n+ const style = model.getEdgeStyle();\n+ return (\n+ <g>\n+ <Line\n+ {\n+ ...style\n+ }\n+ x1={startPoint.x}\n+ y1={startPoint.y}\n+ x2={endPoint.x}\n+ y2={endPoint.y}\n+ className={className}\n+ strokeDasharray={strokeDasharray.join(' ')}\n+ stroke={stroke}\n+ />\n+ </g>\n+ );\n+ }\ngetAppendWidth() {\nconst { model } = this.props;\nconst { startPoint, endPoint } = model;\n",
"new_path": "packages/core/src/view/edge/LineEdge.tsx",
"old_path": "packages/core/src/view/edge/LineEdge.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -97,6 +97,24 @@ export default class PolylineEdge extends BaseEdge {\n</g>\n);\n}\n+ getAnimation() {\n+ const { model } = this.props;\n+ const { stroke, className, strokeDasharray } = model.getAnimation();\n+ const style = model.getEdgeStyle();\n+ return (\n+ <g>\n+ <Polyline\n+ points={model.points}\n+ {\n+ ...style\n+ }\n+ className={className}\n+ strokeDasharray={strokeDasharray.join(' ')}\n+ stroke={stroke}\n+ />\n+ </g>\n+ );\n+ }\ngetArrowInfo(): ArrowInfo {\nconst { model } = this.props;\nconst { points, isSelected } = model;\n",
"new_path": "packages/core/src/view/edge/PolylineEdge.tsx",
"old_path": "packages/core/src/view/edge/PolylineEdge.tsx"
}
] |
TypeScript
|
Apache License 2.0
|
didi/logicflow
|
feat: support animation
| 1
|
feat
| null |
160,196
|
24.02.2022 16:39:20
| -28,800
|
e8895cc230fccf007638db2cdfd79b25f7cba1b9
|
fix: edge animation demo
|
[
{
"change_type": "ADD",
"diff": "+class CustomBezierModel extends BezierEdgeModel {\n+ setAttributes () {\n+ this.offset = 40;\n+ }\n+ getAnimation() {\n+ const animation = super.getAnimation();\n+ animation.stroke = \"blue\";\n+ return animation;\n+ }\n+ getEdgeStyle() {\n+ const style = super.getEdgeStyle();\n+ const { properties } = this;\n+ if (properties.isActived) {\n+ style.strokeDasharray = '4 4'\n+ }\n+ style.stroke = 'orange'\n+ style.adjustLine.stroke = 'orange'\n+ style.adjustAnchor.fill = 'orange'\n+ style.adjustAnchor.stroke = 'orange'\n+ return style;\n+ }\n+ getTextStyle() {\n+ const style = super.getTextStyle();\n+ style.color = \"red\";\n+ style.overflowMode = \"autoWrap\";\n+ style.textAlign = \"right\";\n+ style.fontSize = 40;\n+ return style;\n+ }\n+}\n+\n+class CustomBezier extends BezierEdge {}\n+\n+export default {\n+ type: \"custom-bezier\",\n+ model: CustomBezierModel,\n+ view: CustomBezier\n+}\n\\ No newline at end of file\n",
"new_path": "packages/core/examples/animation/customBezier.mjs",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+<!DOCTYPE html>\n+<html lang=\"en\">\n+ <head>\n+ <meta charset=\"UTF-8\">\n+ <meta name=\"format-detection\" content=\"telephone=no, email=no\">\n+ <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n+ <title>LOGIC FLOW</title>\n+ <link rel=\"stylesheet\" href=\"/src/style/index.css\" />\n+ </head>\n+ <body>\n+ <button id=\"js_save\">save</button>\n+ <div id=\"container\"></div>\n+ <script src=\"/logic-flow.js\"></script>\n+ <script type=\"module\" src=\"./index.mjs\">\n+ </script>\n+ </body>\n+</html>\n\\ No newline at end of file\n",
"new_path": "packages/core/examples/animation/index.html",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { baseData } from '../data.mjs'\n+import customBezier from './customBezier.mjs';\n+\n+const lf = new LogicFlow({\n+ container: document.querySelector('#container'),\n+ adjustEdgeStartAndEnd: true,\n+ width: 1000,\n+ grid: true,\n+ // edgeType: 'custom-polyline',\n+ animation: true,\n+ keyboard: {\n+ enabled: true,\n+ },\n+ height: 400\n+})\n+lf.register(customBezier);\n+lf.setDefaultEdgeType(\"bezier\");\n+baseData.edges.push({\n+ type: 'custom-bezier',\n+ sourceNodeId: '1',\n+ targetNodeId: '4',\n+ properties: {\n+ isActived: false\n+ }\n+});\n+const data = window.sessionStorage.getItem('custom-edge-data');\n+if (data) {\n+ lf.render(JSON.parse(data));\n+} else {\n+ lf.render(baseData);\n+}\n+\n+document.querySelector('#js_save').addEventListener('click', () => {\n+ const data = lf.getGraphData()\n+ window.sessionStorage.setItem('custom-edge-data', JSON.stringify(data));\n+})\n\\ No newline at end of file\n",
"new_path": "packages/core/examples/animation/index.mjs",
"old_path": null
}
] |
TypeScript
|
Apache License 2.0
|
didi/logicflow
|
fix: edge animation demo
| 1
|
fix
| null |
847,143
|
24.02.2022 16:40:40
| -28,800
|
c80592aa3bb4bdffe2d71da4cae7a65ef760f6ae
|
docs(theme): update blog intro
|
[
{
"change_type": "MODIFY",
"diff": "@@ -13,6 +13,8 @@ tag:\nThe theme provides blog feature, and it's not enabled by default.\n+You can enable blogging by setting `themeConfig.plugins.blog` to `true`.\n+\nFor instructions, please see [Blog Intro](../../guide/blog/intro.md);\n## Options\n",
"new_path": "docs/theme/src/config/plugins/blog.md",
"old_path": "docs/theme/src/config/plugins/blog.md"
}
] |
TypeScript
|
MIT License
|
vuepress-theme-hope/vuepress-theme-hope
|
docs(theme): update blog intro
| 1
|
docs
|
theme
|
71,080
|
24.02.2022 16:52:09
| 18,000
|
ed8918a32a8b3bdd44b2b103c2b91fa07413e46f
|
chore: add main and types to aws-cdk and remove linter rule against it. this is necessary for bundle dependencies to work on v2
|
[
{
"change_type": "MODIFY",
"diff": "\"name\": \"aws-cdk\",\n\"description\": \"CDK Toolkit, the command line tool for CDK apps\",\n\"version\": \"0.0.0\",\n+ \"main\": \"lib/index.js\",\n+ \"types\": \"lib/index.d.ts\",\n\"bin\": {\n\"cdk\": \"bin/cdk\"\n},\n",
"new_path": "packages/aws-cdk/package.json",
"old_path": "packages/aws-cdk/package.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -1843,32 +1843,6 @@ export class AwsCdkLibReadmeMatchesCore extends ValidationRule {\n}\n}\n-/**\n- * Enforces that the aws-cdk's package.json on the V2 branch does not have the \"main\"\n- * and \"types\" keys filled.\n- */\n-export class CdkCliV2MissesMainAndTypes extends ValidationRule {\n- public readonly name = 'aws-cdk/cli/v2/package.json/main';\n-\n- public validate(pkg: PackageJson): void {\n- // this rule only applies to the CLI\n- if (pkg.json.name !== 'aws-cdk') { return; }\n- // this only applies to V2\n- if (cdkMajorVersion() === 1) { return; }\n-\n- if (pkg.json.main || pkg.json.types) {\n- pkg.report({\n- ruleName: this.name,\n- message: 'The package.json file for the aws-cdk CLI package in V2 cannot have \"main\" and \"types\" keys',\n- fix: () => {\n- delete pkg.json.main;\n- delete pkg.json.types;\n- },\n- });\n- }\n- }\n-}\n-\n/**\n* Determine whether this is a JSII package\n*\n",
"new_path": "tools/@aws-cdk/pkglint/lib/rules.ts",
"old_path": "tools/@aws-cdk/pkglint/lib/rules.ts"
}
] |
TypeScript
|
Apache License 2.0
|
aws/aws-cdk
|
chore: add main and types to aws-cdk and remove linter rule against it. this is necessary for bundle dependencies to work on v2
| 1
|
chore
| null |
648,030
|
24.02.2022 16:56:42
| -3,600
|
c378d6300a936ac38d6592a537213746b30d69b9
|
fix(ProcessorCount): Guard against `ProcessorCount` reporting values lower then `1`
|
[
{
"change_type": "MODIFY",
"diff": "@@ -15,14 +15,19 @@ Reasons you might want to lower this setting:\n- You're running on a shared server\n- You are running stryker in the background while doing other work\";\n- public override int? Default => Environment.ProcessorCount / 2;\n+ public override int? Default => Math.Max(Environment.ProcessorCount / 2, 1);\npublic int Validate(ILogger<ConcurrencyInput> logger = null)\n{\nlogger ??= ApplicationLogging.LoggerFactory.CreateLogger<ConcurrencyInput>();\n- if (SuppliedInput == null)\n+ if (SuppliedInput is null)\n{\n+ if (Environment.ProcessorCount < 1)\n+ {\n+ logger.LogWarning(\"Processor count is not reported by the system, using concurrency of 1. Set a concurrency to remove this warning.\");\n+ }\n+\nreturn Default.Value;\n}\n",
"new_path": "src/Stryker.Core/Stryker.Core/Options/Inputs/ConcurrencyInput.cs",
"old_path": "src/Stryker.Core/Stryker.Core/Options/Inputs/ConcurrencyInput.cs"
}
] |
C#
|
Apache License 2.0
|
stryker-mutator/stryker-net
|
fix(ProcessorCount): Guard against `ProcessorCount` reporting values lower then `1` (#1930)
| 1
|
fix
|
ProcessorCount
|
304,860
|
24.02.2022 16:57:07
| -3,600
|
51f741340c7dab0574710fbeb52930c79723ec6d
|
feat: Expose the Record::fields iterator
Would be useful in the LSP
|
[
{
"change_type": "MODIFY",
"diff": "@@ -978,6 +978,18 @@ impl MonoType {\n}\n}\n+ /// Returns an iterator over the fields in the record (or an empty iterator of the type is not\n+ /// a record)\n+ pub fn fields(&self) -> impl Iterator<Item = &Property> {\n+ match self {\n+ MonoType::Record(r) => r.fields(),\n+ _ => {\n+ const RECORD: Record = Record::Empty;\n+ RECORD.fields()\n+ }\n+ }\n+ }\n+\nfn type_info(&self) -> &str {\nmatch self {\nMonoType::Fun(_) => \" (function)\",\n@@ -1494,7 +1506,8 @@ impl Record {\n}\n}\n- pub(crate) fn fields(&self) -> impl Iterator<Item = &Property> {\n+ /// Returns an iterator over the fields in the record\n+ pub fn fields(&self) -> impl Iterator<Item = &Property> {\nlet mut record = Some(self);\nstd::iter::from_fn(move || match record {\nSome(Record::Extension { head, tail }) => {\n",
"new_path": "libflux/flux-core/src/semantic/types.rs",
"old_path": "libflux/flux-core/src/semantic/types.rs"
},
{
"change_type": "MODIFY",
"diff": "Binary files a/libflux/go/libflux/buildinfo.gen.go and b/libflux/go/libflux/buildinfo.gen.go differ\n",
"new_path": "libflux/go/libflux/buildinfo.gen.go",
"old_path": "libflux/go/libflux/buildinfo.gen.go"
}
] |
Go
|
MIT License
|
influxdata/flux
|
feat: Expose the Record::fields iterator (#4509)
Would be useful in the LSP
| 1
|
feat
| null |
342,861
|
24.02.2022 16:57:41
| -3,600
|
e9d1a094b7a500e1e4affc1ac6fd811a565cc4cc
|
fix(Drawer): use focus trap
|
[
{
"change_type": "MODIFY",
"diff": "@@ -3,6 +3,7 @@ import * as React from \"react\";\nimport styled, { css } from \"styled-components\";\nimport { convertHexToRgba } from \"@kiwicom/orbit-design-tokens\";\n+import useFocusTrap from \"../hooks/useFocusTrap\";\nimport useLockScrolling from \"../hooks/useLockScrolling\";\nimport transition from \"../utils/transition\";\nimport mq from \"../utils/mediaQuery\";\n@@ -169,6 +170,7 @@ const Drawer = ({\n[onClose],\n);\n+ useFocusTrap(scrollableRef);\nuseLockScrolling(scrollableRef, lockScrolling && overlayShown);\nReact.useEffect(() => {\n",
"new_path": "packages/orbit-components/src/Drawer/index.jsx",
"old_path": "packages/orbit-components/src/Drawer/index.jsx"
},
{
"change_type": "MODIFY",
"diff": "// @flow\n-export type UseFocusTrap = (ref: {| current: ?HTMLElement |}) => void;\n+export type UseFocusTrap = (ref: {| current: HTMLElement | null |}) => void;\ndeclare export default UseFocusTrap;\n",
"new_path": "packages/orbit-components/src/hooks/useFocusTrap/index.js.flow",
"old_path": "packages/orbit-components/src/hooks/useFocusTrap/index.js.flow"
}
] |
JavaScript
|
MIT License
|
kiwicom/orbit
|
fix(Drawer): use focus trap
| 1
|
fix
|
Drawer
|
160,196
|
24.02.2022 16:59:02
| -28,800
|
dd9d42ed26da46558592124533954f23b28aade2
|
fix: change strokeDasharray type from array to string
|
[
{
"change_type": "MODIFY",
"diff": "@@ -5,7 +5,7 @@ export type AnimationConfig = {\nexport type Animation = {\nstroke: string;\n- strokeDasharray: number[];\n+ strokeDasharray: string;\nclassName: string;\n};\n@@ -23,6 +23,6 @@ export const defaultAnimationOpenConfig: AnimationConfig = {\nexport const defaultAnimationData: Animation = {\nstroke: 'red',\n- strokeDasharray: [40, 200],\n+ strokeDasharray: '40 200',\nclassName: 'lf-edge-animation',\n};\n",
"new_path": "packages/core/src/constant/DefaultAnimation.ts",
"old_path": "packages/core/src/constant/DefaultAnimation.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -37,7 +37,7 @@ export default class BezierEdge extends BaseEdge {\n...style\n}\nclassName={className}\n- strokeDasharray={strokeDasharray.join(' ')}\n+ strokeDasharray={strokeDasharray}\nstroke={stroke}\n/>\n</g>\n",
"new_path": "packages/core/src/view/edge/BezierEdge.tsx",
"old_path": "packages/core/src/view/edge/BezierEdge.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -44,7 +44,7 @@ export default class LineEdge extends BaseEdge {\nx2={endPoint.x}\ny2={endPoint.y}\nclassName={className}\n- strokeDasharray={strokeDasharray.join(' ')}\n+ strokeDasharray={strokeDasharray}\nstroke={stroke}\n/>\n</g>\n",
"new_path": "packages/core/src/view/edge/LineEdge.tsx",
"old_path": "packages/core/src/view/edge/LineEdge.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -109,7 +109,7 @@ export default class PolylineEdge extends BaseEdge {\n...style\n}\nclassName={className}\n- strokeDasharray={strokeDasharray.join(' ')}\n+ strokeDasharray={strokeDasharray}\nstroke={stroke}\n/>\n</g>\n",
"new_path": "packages/core/src/view/edge/PolylineEdge.tsx",
"old_path": "packages/core/src/view/edge/PolylineEdge.tsx"
}
] |
TypeScript
|
Apache License 2.0
|
didi/logicflow
|
fix: change strokeDasharray type from array to string
| 1
|
fix
| null |
865,939
|
24.02.2022 17:00:26
| -3,600
|
3e2a6b6fec0ec94bbe6f8cc589889915196f26c0
|
fix(deploy/start): clear overlay state when activeTab changes
Closes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -63,7 +63,11 @@ export default class DeploymentTool extends PureComponent {\ncomponentDidMount() {\nthis.props.subscribe('app.activeTabChanged', ({ activeTab }) => {\n- this.setState({ activeTab });\n+ this.setState({\n+ activeTab,\n+ overlayState: null,\n+ activeButton: false\n+ });\n});\nthis.props.subscribe('app.focus-changed', () => {\n",
"new_path": "client/src/plugins/camunda-plugin/deployment-tool/DeploymentTool.js",
"old_path": "client/src/plugins/camunda-plugin/deployment-tool/DeploymentTool.js"
},
{
"change_type": "MODIFY",
"diff": "import React from 'react';\n-import { shallow } from 'enzyme';\n+import { mount, shallow } from 'enzyme';\nimport {\nomit\n} from 'min-dash';\n@@ -23,7 +23,7 @@ import DeploymentTool from '../DeploymentTool';\nimport AuthTypes from '../../shared/AuthTypes';\nimport { DeploymentError,\nConnectionError } from '../../shared/CamundaAPI';\n-\n+import { Slot, SlotFillRoot } from '../../../../app/slot-fill';\nconst CONFIG_KEY = 'deployment-tool';\nconst ENGINE_ENDPOINTS_CONFIG_KEY = 'camundaEngineEndpoints';\n@@ -1221,6 +1221,68 @@ describe('<DeploymentTool>', () => {\nexpect(configSetSpy).to.not.have.been.called;\n});\n+\n+ describe('overlay', function() {\n+\n+ it('should open', async () => {\n+\n+ // given\n+ const activeTab = createTab({ type: 'bpmn' });\n+\n+ const {\n+ wrapper\n+ } = createDeploymentTool({\n+ activeTab,\n+ withFillSlot: true,\n+ keepOpen: true\n+ }, mount);\n+\n+ // when\n+ const statusBarBtn = wrapper.find(\"button[title='Deploy current diagram']\");\n+ statusBarBtn.simulate('click');\n+\n+ await new Promise(function(resolve) {\n+ setTimeout(resolve, 10);\n+ });\n+\n+ // then\n+ expect(wrapper.html().includes('form')).to.be.true;\n+ });\n+\n+\n+ it('should close when active tab changes', async () => {\n+\n+ // given\n+ const activeTab = createTab({ type: 'bpmn' });\n+ const { subscribe, callSubscriber } = createSubscribe(activeTab);\n+\n+ const {\n+ wrapper\n+ } = createDeploymentTool({\n+ activeTab,\n+ subscribe,\n+ withFillSlot: true,\n+ keepOpen: true\n+ }, mount);\n+\n+ // open overlay\n+ const statusBarBtn = wrapper.find(\"button[title='Deploy current diagram']\");\n+ statusBarBtn.simulate('click');\n+\n+ await new Promise(function(resolve) {\n+ setTimeout(resolve, 10);\n+ });\n+\n+ // assume\n+ expect(wrapper.html().includes('form')).to.be.true;\n+\n+ // then\n+ callSubscriber({ activeTab: createTab() });\n+\n+ // expect\n+ expect(wrapper.html().includes('form')).to.not.be.true;\n+ });\n+\n});\n@@ -1333,7 +1395,8 @@ class TestDeploymentTool extends DeploymentTool {\nconst {\nuserAction,\nendpoint,\n- deployment\n+ deployment,\n+ keepOpen\n} = this.props;\nif (overlayState) {\n@@ -1350,10 +1413,12 @@ class TestDeploymentTool extends DeploymentTool {\n}\n};\n+ if (!keepOpen) {\noverlayState.handleClose(action, configuration);\n}\n}\n}\n+ }\nfunction createDeploymentTool({\nactiveTab = createTab(),\n@@ -1379,21 +1444,34 @@ function createDeploymentTool({\n...props.config\n});\n- const wrapper = render(<TestDeploymentTool\n- subscribe={ subscribe }\n+ const DeploymentTool = (\n+ <TestDeploymentTool\n+ subscribe={ props.subcribe || subscribe }\ntriggerAction={ triggerAction }\ndisplayNotification={ noop }\nlog={ noop }\n_getGlobal={ (name) => (name === 'fileSystem' && createFileSystem(props.fileSystem)) }\n{ ...props }\nconfig={ config }\n- />);\n+ />\n+ );\n+\n+ const DeploymentToolWithFillSlot = (\n+ <SlotFillRoot>\n+ <Slot name=\"status-bar__file\" />\n+ {DeploymentTool}\n+ </SlotFillRoot>\n+ );\n+\n+ const wrapper = render(\n+ props.withFillSlot ? DeploymentToolWithFillSlot : DeploymentTool\n+ );\nreturn {\nwrapper,\ninstance: wrapper.instance()\n};\n-}\n+ }});\nfunction createTab(overrides = {}) {\nreturn {\n@@ -1449,3 +1527,26 @@ function noop() {}\nfunction withoutCredentials(endpoint) {\nreturn omit(endpoint, [ 'username', 'password', 'token' ]);\n}\n+\n+\n+function createSubscribe(activeTab) {\n+ let callback = null;\n+\n+ function subscribe(event, _callback) {\n+ if (event === 'app.activeTabChanged') {\n+ callback = _callback;\n+ callback({ activeTab });\n+ }\n+ }\n+\n+ async function callSubscriber(...args) {\n+ if (callback) {\n+ await callback(...args);\n+ }\n+ }\n+\n+ return {\n+ callSubscriber,\n+ subscribe\n+ };\n+}\n",
"new_path": "client/src/plugins/camunda-plugin/deployment-tool/__tests__/DeploymentToolSpec.js",
"old_path": "client/src/plugins/camunda-plugin/deployment-tool/__tests__/DeploymentToolSpec.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -62,7 +62,11 @@ export default class StartInstanceTool extends PureComponent {\n} = this.props;\nsubscribe('app.activeTabChanged', ({ activeTab }) => {\n- this.setState({ activeTab });\n+ this.setState({\n+ activeTab,\n+ overlayState: null,\n+ activeButton: false\n+ });\n});\n}\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": "@@ -933,6 +933,8 @@ describe('<StartInstanceTool>', () => {\n});\n+ describe('overlay', function() {\n+\ndescribe('overlay dropdown', () => {\nit('should open', async () => {\n@@ -947,13 +949,7 @@ describe('<StartInstanceTool>', () => {\nwithFillSlot: true\n}, mount);\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+ expectOverlayDropdown(wrapper);\n});\n@@ -968,12 +964,7 @@ describe('<StartInstanceTool>', () => {\nwithFillSlot: true\n}, mount);\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+ const statusBarBtn = expectOverlayDropdown(wrapper);\n// then\nstatusBarBtn.simulate('click');\n@@ -981,7 +972,6 @@ describe('<StartInstanceTool>', () => {\n// assume\nexpect(wrapper.find(\"button[title='Start process instance']\").exists()).to.be.false;\n-\n});\n@@ -997,12 +987,7 @@ describe('<StartInstanceTool>', () => {\nwithFillSlot: true\n}, mount);\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+ expectOverlayDropdown(wrapper);\n// when\ndocument.body.dispatchEvent(new MouseEvent('mousedown'));\n@@ -1010,9 +995,60 @@ describe('<StartInstanceTool>', () => {\n// then\nexpect(wrapper.find(\"button[title='Start process instance']\").exists()).to.be.false;\n+ });\n});\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+ keepOpen: true\n+ }, mount);\n+\n+ // open dropdown overlay\n+ expectOverlayDropdown(wrapper);\n+\n+ // open start instance overlay\n+ expectStartInstanceOverlay(wrapper);\n+ });\n+\n+\n+ it('should close when active tab changes', async () => {\n+\n+ // given\n+ const activeTab = createTab({ type: 'bpmn' });\n+ const { subscribe, callSubscriber } = createSubscribe(activeTab);\n+\n+ const {\n+ wrapper\n+ } = createStartInstanceTool({\n+ activeTab,\n+ subscribe,\n+ withFillSlot: true,\n+ keepOpen: true\n+ }, mount);\n+\n+ // open dropdown overlay\n+ expectOverlayDropdown(wrapper);\n+\n+ // open start instance overlay\n+ expectStartInstanceOverlay(wrapper);\n+\n+ // then\n+ callSubscriber({ activeTab: createTab() });\n+\n+ // expect\n+ expect(wrapper.html().includes('form')).to.not.be.true;\n+ });\n+\n});\n@@ -1149,7 +1185,8 @@ class TestStartInstanceTool extends StartInstanceTool {\nconst { overlayState } = this.state;\nconst {\nuserAction,\n- businessKey\n+ businessKey,\n+ keepOpen\n} = this.props;\nif (overlayState) {\n@@ -1159,9 +1196,11 @@ class TestStartInstanceTool extends StartInstanceTool {\nbusinessKey: businessKey || overlayState.configuration.businessKey\n};\n+ if (!keepOpen) {\noverlayState.handleClose(action, configuration);\n}\n}\n+ }\n}\n@@ -1206,7 +1245,7 @@ function createStartInstanceTool({\nconst StartInstance = (\n<TestStartInstanceTool\n- subscribe={ subscribe }\n+ subscribe={ props.subscribe || subscribe }\ntriggerAction={ triggerAction }\ndisplayNotification={ noop }\nlog={ props.log || noop }\n@@ -1249,3 +1288,51 @@ function createTab(overrides = {}) {\n}\nfunction noop() {}\n+\n+function createSubscribe(activeTab) {\n+ let callback = null;\n+\n+ function subscribe(event, _callback) {\n+ if (event === 'app.activeTabChanged') {\n+ callback = _callback;\n+ callback({ activeTab });\n+ }\n+ }\n+\n+ async function callSubscriber(...args) {\n+ if (callback) {\n+ await callback(...args);\n+ }\n+ }\n+\n+ return {\n+ callSubscriber,\n+ subscribe\n+ };\n+}\n+\n+function expectOverlayDropdown(wrapper) {\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+ return statusBarBtn;\n+}\n+\n+async function expectStartInstanceOverlay(wrapper) {\n+\n+ // open start instance overlay\n+ const dropDownButton = wrapper.find(\"button[title='Start process instance']\");\n+ dropDownButton.simulate('click');\n+\n+ await new Promise(function(resolve) {\n+ setTimeout(resolve, 10);\n+ });\n+\n+ // assume\n+ expect(wrapper.html().includes('form')).to.be.true;\n+}\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"
},
{
"change_type": "MODIFY",
"diff": "@@ -79,7 +79,8 @@ export default class DeploymentPlugin extends PureComponent {\ncomponentDidMount() {\nthis.props.subscribe('app.activeTabChanged', ({ activeTab }) => {\nthis.setState({\n- activeTab\n+ activeTab,\n+ overlayState: null\n});\n});\n",
"new_path": "client/src/plugins/zeebe-plugin/deployment-plugin/DeploymentPlugin.js",
"old_path": "client/src/plugins/zeebe-plugin/deployment-plugin/DeploymentPlugin.js"
},
{
"change_type": "MODIFY",
"diff": "import React from 'react';\n-import { shallow } from 'enzyme';\n+import { mount, shallow } from 'enzyme';\nimport { Config } from '../../../../app/__tests__/mocks';\nimport DeploymentPlugin from '../DeploymentPlugin';\nimport { CAMUNDA_CLOUD } from '../../shared/ZeebeTargetTypes';\n+import { Slot, SlotFillRoot } from '../../../../app/slot-fill';\nconst DEPLOYMENT_CONFIG_KEY = 'zeebe-deployment-tool';\nconst ZEEBE_ENDPOINTS_CONFIG_KEY = 'zeebeEndpoints';\n@@ -261,6 +262,70 @@ describe('<DeploymentPlugin> (Zeebe)', () => {\n// then\nexpect(wrapper.find(BUTTON_SELECTOR)).to.have.lengthOf(0);\n});\n+\n+\n+ describe('overlay', function() {\n+\n+ it('should open', async () => {\n+\n+ // given\n+ const activeTab = createTab({ type: 'cloud-bpmn' });\n+\n+ const {\n+ wrapper\n+ } = createDeploymentPlugin({\n+ activeTab,\n+ withFillSlot: true,\n+ keepOpen: true\n+ }, mount);\n+\n+ // when\n+ const statusBarBtn = wrapper.find(\"button[title='Deploy current diagram']\");\n+ statusBarBtn.simulate('click');\n+\n+ await new Promise(function(resolve) {\n+ setTimeout(resolve, 10);\n+ });\n+\n+ // then\n+ expect(wrapper.html().includes('form')).to.be.true;\n+ });\n+\n+\n+ it('should close when active tab changes', async () => {\n+\n+ // given\n+ const activeTab = createTab({ type: 'cloud-bpmn' });\n+ const { subscribe, callSubscriber } = createSubscribe(activeTab);\n+\n+ const {\n+ wrapper\n+ } = createDeploymentPlugin({\n+ activeTab,\n+ subscribe,\n+ withFillSlot: true,\n+ keepOpen: true\n+ }, mount);\n+\n+ // open overlay\n+ const statusBarBtn = wrapper.find(\"button[title='Deploy current diagram']\");\n+ statusBarBtn.simulate('click');\n+\n+ await new Promise(function(resolve) {\n+ setTimeout(resolve, 10);\n+ });\n+\n+ // assume\n+ expect(wrapper.html().includes('form')).to.be.true;\n+\n+ // then\n+ callSubscriber({ activeTab: createTab() });\n+\n+ // expect\n+ expect(wrapper.html().includes('form')).to.not.be.true;\n+ });\n+\n+ });\n});\n@@ -1136,7 +1201,8 @@ class TestDeploymentPlugin extends DeploymentPlugin {\nuserAction,\nuserActionSpy,\nendpoint,\n- deployment\n+ deployment,\n+ keepOpen\n} = this.props;\nif (overlayState) {\n@@ -1157,17 +1223,19 @@ class TestDeploymentPlugin extends DeploymentPlugin {\n}\n};\n+ if (!keepOpen) {\noverlayState.onClose(config);\n}\n}\n}\n+}\nfunction createDeploymentPlugin({\nzeebeAPI = new MockZeebeAPI(),\nactiveTab = createTab(),\n...props\n-} = {}) {\n+} = {}, render = shallow) {\nconst subscribe = (type, callback) => {\nif (type === 'app.activeTabChanged') {\ncallback({\n@@ -1192,7 +1260,8 @@ function createDeploymentPlugin({\n...props.config\n});\n- const wrapper = shallow(<TestDeploymentPlugin\n+ const DeploymentPlugin = (\n+ <TestDeploymentPlugin\nbroadcastMessage={ noop }\nsubscribeToMessaging={ noop }\nunsubscribeFromMessaging={ noop }\n@@ -1200,10 +1269,21 @@ function createDeploymentPlugin({\nlog={ noop }\ndisplayNotification={ noop }\n_getGlobal={ key => key === 'zeebeAPI' && zeebeAPI }\n- subscribe={ subscribe }\n+ subscribe={ props.subcribe || subscribe }\n{ ...props }\n- config={ config }\n- />);\n+ config={ config } />\n+ );\n+\n+ const DeploymentPluginWithFillSlot = (\n+ <SlotFillRoot>\n+ <Slot name=\"status-bar__file\" />\n+ {DeploymentPlugin}\n+ </SlotFillRoot>\n+ );\n+\n+ const wrapper = render(\n+ props.withFillSlot ? DeploymentPluginWithFillSlot : DeploymentPlugin\n+ );\nconst instance = wrapper.instance();\n@@ -1275,3 +1355,25 @@ function createTab(overrides = {}) {\n...overrides\n};\n}\n+\n+function createSubscribe(activeTab) {\n+ let callback = null;\n+\n+ function subscribe(event, _callback) {\n+ if (event === 'app.activeTabChanged') {\n+ callback = _callback;\n+ callback({ activeTab });\n+ }\n+ }\n+\n+ async function callSubscriber(...args) {\n+ if (callback) {\n+ await callback(...args);\n+ }\n+ }\n+\n+ return {\n+ callSubscriber,\n+ subscribe\n+ };\n+}\n",
"new_path": "client/src/plugins/zeebe-plugin/deployment-plugin/__tests__/DeploymentPluginSpec.js",
"old_path": "client/src/plugins/zeebe-plugin/deployment-plugin/__tests__/DeploymentPluginSpec.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -45,7 +45,9 @@ export default class StartInstancePlugin extends PureComponent {\ncomponentDidMount() {\nthis.props.subscribe('app.activeTabChanged', ({ activeTab }) => {\nthis.setState({\n- activeTab\n+ activeTab,\n+ overlayState: null,\n+ activeButton: false\n});\n});\n}\n",
"new_path": "client/src/plugins/zeebe-plugin/start-instance-plugin/StartInstancePlugin.js",
"old_path": "client/src/plugins/zeebe-plugin/start-instance-plugin/StartInstancePlugin.js"
},
{
"change_type": "MODIFY",
"diff": "import React from 'react';\n-import { shallow } from 'enzyme';\n+import { mount, shallow } from 'enzyme';\nimport { Config } from '../../../../app/__tests__/mocks';\nimport StartInstancePlugin from '../StartInstancePlugin';\nimport { CAMUNDA_CLOUD } from '../../shared/ZeebeTargetTypes';\n+import { Slot, SlotFillRoot } from '../../../../app/slot-fill';\nconst BUTTON_SELECTOR = '[title=\"Start current diagram\"]';\n@@ -251,6 +252,70 @@ describe('<StartInstancePlugin> (Zeebe)', () => {\n});\n+ describe('overlay', function() {\n+\n+ it('should open', async () => {\n+\n+ // given\n+ const activeTab = createTab({ type: 'cloud-bpmn' });\n+\n+ const {\n+ wrapper\n+ } = createStartInstancePlugin({\n+ activeTab,\n+ withFillSlot: true,\n+ keepOpen: true\n+ }, mount);\n+\n+ // when\n+ const statusBarBtn = wrapper.find(\"button[title='Start current diagram']\");\n+ statusBarBtn.simulate('click');\n+\n+ await new Promise(function(resolve) {\n+ setTimeout(resolve, 10);\n+ });\n+\n+ // then\n+ expect(wrapper.html().includes('form')).to.be.true;\n+ });\n+\n+\n+ it('should close when active tab changes', async () => {\n+\n+ // given\n+ const activeTab = createTab({ type: 'cloud-bpmn' });\n+ const { subscribe, callSubscriber } = createSubscribe(activeTab);\n+\n+ const {\n+ wrapper\n+ } = createStartInstancePlugin({\n+ activeTab,\n+ subscribe,\n+ withFillSlot: true,\n+ keepOpen: true\n+ }, mount);\n+\n+ // open overlay\n+ const statusBarBtn = wrapper.find(\"button[title='Start current diagram']\");\n+ statusBarBtn.simulate('click');\n+\n+ await new Promise(function(resolve) {\n+ setTimeout(resolve, 10);\n+ });\n+\n+ // assume\n+ expect(wrapper.html().includes('form')).to.be.true;\n+\n+ // then\n+ callSubscriber({ activeTab: createTab() });\n+\n+ // expect\n+ expect(wrapper.html().includes('form')).to.not.be.true;\n+ });\n+\n+ });\n+\n+\ndescribe('Operate link', () => {\nit('should display notification without link after starting process instance', async () => {\n@@ -324,7 +389,7 @@ function createStartInstancePlugin({\n},\ndeploymentEndpoint = {},\n...props\n-} = {}) {\n+} = {}, render = shallow) {\nconst subscribe = (key, callback) => {\nif (key === 'app.activeTabChanged') {\ncallback({\n@@ -352,8 +417,9 @@ function createStartInstancePlugin({\n}\n};\n- const wrapper = shallow(<TestStartInstancePlugin\n- subscribe={ subscribe }\n+ const StartInstancePlugin = (\n+ <TestStartInstancePlugin\n+ subscribe={ props.subscribe || subscribe }\n_getGlobal={ key => key === 'zeebeAPI' && zeebeAPI }\ndisplayNotification={ noop }\nlog={ noop }\n@@ -363,7 +429,20 @@ function createStartInstancePlugin({\nbroadcastMessage={ broadcastMessage }\n{ ...props }\nconfig={ config }\n- />);\n+ />\n+ );\n+\n+ const StartInstancePluginWithFillSlot = (\n+ <SlotFillRoot>\n+ <Slot name=\"status-bar__file\" />\n+ {StartInstancePlugin}\n+ </SlotFillRoot>\n+ );\n+\n+ const wrapper = render(\n+ props.withFillSlot ? StartInstancePluginWithFillSlot : StartInstancePlugin\n+ );\n+\nconst instance = wrapper.instance();\n@@ -407,18 +486,46 @@ class TestStartInstancePlugin extends StartInstancePlugin {\nsuper(props);\n}\n- getConfigurationFromUser(startConfiguration) {\n- const configuration = startConfiguration || { variables:'' };\n+ componentDidUpdate(...args) {\n+ super.componentDidUpdate && super.componentDidUpdate(...args);\n+\nconst { overlayState } = this.state;\nconst {\n- userAction\n+ userAction,\n+ keepOpen\n} = this.props;\n- if (userAction === 'cancel') {\n- overlayState.onClose('cancel', null);\n+\n+ if (overlayState && overlayState.isStart) {\n+ const action = userAction || 'start';\n+\n+ const configuration = action !== 'cancel' && overlayState.configuration;\n+\n+ if (!keepOpen) {\n+ overlayState.onClose(action, configuration);\n+ }\n+ }\n+ }\n+}\n+\n+function createSubscribe(activeTab) {\n+ let callback = null;\n+\n+ function subscribe(event, _callback) {\n+ if (event === 'app.activeTabChanged') {\n+ callback = _callback;\n+ callback({ activeTab });\n+ }\n}\n- return { action: userAction || null, configuration };\n+ async function callSubscriber(...args) {\n+ if (callback) {\n+ await callback(...args);\n+ }\n}\n+ return {\n+ callSubscriber,\n+ subscribe\n+ };\n}\n",
"new_path": "client/src/plugins/zeebe-plugin/start-instance-plugin/__tests__/StartInstancePluginSpec.js",
"old_path": "client/src/plugins/zeebe-plugin/start-instance-plugin/__tests__/StartInstancePluginSpec.js"
}
] |
JavaScript
|
MIT License
|
camunda/camunda-modeler
|
fix(deploy/start): clear overlay state when activeTab changes
Closes #2762
| 1
|
fix
|
deploy/start
|
756,013
|
24.02.2022 17:01:39
| 21,600
|
4c06818de3e206a884ceb0c607f08d6983676d24
|
docs(MAINTAINERS): increment latest SDK version for next SDK tag
|
[
{
"change_type": "MODIFY",
"diff": "@@ -12,6 +12,10 @@ To generate a new final release, and CHANGELOG.md files\n```sh\n# Create the final release CHANGELOGs.\nyarn lerna version --no-push --conventional-graduate\n+prior=$(git tag -l | sed -ne 's!^@agoric/sdk@\\([0-9]*\\).*!\\1!p' | sort -n | tail -1)\n+SDKVER=$(( prior + 1 ))\n+git tag @agoric/sdk@$SDKVER\n+git commit -am \"chore(release): @agoric/sdk@$SDKVER\"\n# Push the branch.\ngit push -u origin release-$now\n# Tell which packages have actual news.\n",
"new_path": "MAINTAINERS.md",
"old_path": "MAINTAINERS.md"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
docs(MAINTAINERS): increment latest SDK version for next SDK tag
| 1
|
docs
|
MAINTAINERS
|
756,013
|
24.02.2022 17:11:38
| 21,600
|
81cd9f71671633c9237c77faa799362899a8c94d
|
docs(MAINTAINERS): remove unnecessary git commit
|
[
{
"change_type": "MODIFY",
"diff": "@@ -15,7 +15,6 @@ yarn lerna version --no-push --conventional-graduate\nprior=$(git tag -l | sed -ne 's!^@agoric/sdk@\\([0-9]*\\).*!\\1!p' | sort -n | tail -1)\nSDKVER=$(( prior + 1 ))\ngit tag @agoric/sdk@$SDKVER\n-git commit -am \"chore(release): @agoric/sdk@$SDKVER\"\n# Push the branch.\ngit push -u origin release-$now\n# Tell which packages have actual news.\n",
"new_path": "MAINTAINERS.md",
"old_path": "MAINTAINERS.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@agoric/sdk\",\n- \"version\": \"13.0.0\",\n\"private\": true,\n\"useWorkspaces\": true,\n\"workspaces\": [\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
docs(MAINTAINERS): remove unnecessary git commit
| 1
|
docs
|
MAINTAINERS
|
71,156
|
24.02.2022 17:31:11
| -7,200
|
fc11ae2c4ec3bd9dfe3ff813aa831c744d8ac444
|
feat(pipelines): ECR source action
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": "@@ -426,6 +426,16 @@ const bucket = s3.Bucket.fromBucketName(this, 'Bucket', 'my-bucket');\npipelines.CodePipelineSource.s3(bucket, 'my/source.zip');\n```\n+##### ECR\n+\n+You can use a Docker image in ECR as the source of the pipeline. The pipeline will be\n+triggered every time an image is pushed to ECR:\n+\n+```ts\n+const repository = new ecr.Repository(this, 'Repository');\n+pipelines.CodePipelineSource.ecr(repository);\n+```\n+\n#### Additional inputs\n`ShellStep` allows passing in more than one input: additional\n",
"new_path": "packages/@aws-cdk/pipelines/README.md",
"old_path": "packages/@aws-cdk/pipelines/README.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -3,9 +3,10 @@ import * as cp from '@aws-cdk/aws-codepipeline';\nimport { Artifact } from '@aws-cdk/aws-codepipeline';\nimport * as cp_actions from '@aws-cdk/aws-codepipeline-actions';\nimport { Action, CodeCommitTrigger, GitHubTrigger, S3Trigger } from '@aws-cdk/aws-codepipeline-actions';\n+import { IRepository } from '@aws-cdk/aws-ecr';\nimport * as iam from '@aws-cdk/aws-iam';\nimport { IBucket } from '@aws-cdk/aws-s3';\n-import { SecretValue, Token } from '@aws-cdk/core';\n+import { Fn, SecretValue, Token } from '@aws-cdk/core';\nimport { Node } from 'constructs';\nimport { FileSet, Step } from '../blueprint';\nimport { CodePipelineActionFactoryResult, ProduceActionOptions, ICodePipelineActionFactory } from './codepipeline-action-factory';\n@@ -57,6 +58,22 @@ export abstract class CodePipelineSource extends Step implements ICodePipelineAc\nreturn new S3Source(bucket, objectKey, props);\n}\n+ /**\n+ * Returns an ECR source.\n+ *\n+ * @param repository The repository that will be watched for changes.\n+ * @param props The options, which include the image tag to be checked for changes.\n+ *\n+ * @example\n+ * declare const repository: ecr.IRepository;\n+ * pipelines.CodePipelineSource.ecr(repository, {\n+ * imageTag: 'latest',\n+ * });\n+ */\n+ public static ecr(repository: IRepository, props: ECRSourceOptions = {}): CodePipelineSource {\n+ return new ECRSource(repository, props);\n+ }\n+\n/**\n* Returns a CodeStar connection source. A CodeStar connection allows AWS CodePipeline to\n* access external resources, such as repositories in GitHub, GitHub Enterprise or\n@@ -264,6 +281,46 @@ class S3Source extends CodePipelineSource {\n}\n}\n+/**\n+ * Options for ECR sources\n+ */\n+export interface ECRSourceOptions {\n+ /**\n+ * The image tag that will be checked for changes.\n+ *\n+ * @default latest\n+ */\n+ readonly imageTag?: string;\n+\n+ /**\n+ * The action name used for this source in the CodePipeline\n+ *\n+ * @default - The repository name\n+ */\n+ readonly actionName?: string;\n+}\n+\n+class ECRSource extends CodePipelineSource {\n+ constructor(readonly repository: IRepository, readonly props: ECRSourceOptions) {\n+ super(Node.of(repository).addr);\n+\n+ this.configurePrimaryOutput(new FileSet('Source', this));\n+ }\n+\n+ protected getAction(output: Artifact, _actionName: string, runOrder: number, variablesNamespace: string) {\n+ // RepositoryName can contain '/' that is not a valid ActionName character, use '_' instead\n+ const formattedRepositoryName = Fn.join('_', Fn.split('/', this.repository.repositoryName));\n+ return new cp_actions.EcrSourceAction({\n+ output,\n+ actionName: this.props.actionName ?? formattedRepositoryName,\n+ runOrder,\n+ repository: this.repository,\n+ imageTag: this.props.imageTag,\n+ variablesNamespace,\n+ });\n+ }\n+}\n+\n/**\n* Configuration options for CodeStar source\n*/\n",
"new_path": "packages/@aws-cdk/pipelines/lib/codepipeline/codepipeline-source.ts",
"old_path": "packages/@aws-cdk/pipelines/lib/codepipeline/codepipeline-source.ts"
},
{
"change_type": "MODIFY",
"diff": "import { Capture, Match, Template } from '@aws-cdk/assertions';\nimport * as ccommit from '@aws-cdk/aws-codecommit';\nimport { CodeCommitTrigger, GitHubTrigger } from '@aws-cdk/aws-codepipeline-actions';\n+import * as ecr from '@aws-cdk/aws-ecr';\nimport { AnyPrincipal, Role } from '@aws-cdk/aws-iam';\nimport * as s3 from '@aws-cdk/aws-s3';\nimport { SecretValue, Stack, Token } from '@aws-cdk/core';\n@@ -75,9 +76,9 @@ test('CodeCommit source honors all valid properties', () => {\n});\ntest('S3 source handles tokenized names correctly', () => {\n- const buckit = new s3.Bucket(pipelineStack, 'Buckit');\n+ const bucket = new s3.Bucket(pipelineStack, 'Bucket');\nnew ModernTestGitHubNpmPipeline(pipelineStack, 'Pipeline', {\n- input: cdkp.CodePipelineSource.s3(buckit, 'thefile.zip'),\n+ input: cdkp.CodePipelineSource.s3(bucket, 'thefile.zip'),\n});\nTemplate.fromStack(pipelineStack).hasResourceProperties('AWS::CodePipeline::Pipeline', {\n@@ -96,6 +97,40 @@ test('S3 source handles tokenized names correctly', () => {\n});\n});\n+test('ECR source handles tokenized and namespaced names correctly', () => {\n+ const repository = new ecr.Repository(pipelineStack, 'Repository', { repositoryName: 'namespace/repo' });\n+ new ModernTestGitHubNpmPipeline(pipelineStack, 'Pipeline', {\n+ input: cdkp.CodePipelineSource.ecr(repository),\n+ });\n+\n+ const template = Template.fromStack(pipelineStack);\n+ template.hasResourceProperties('AWS::CodePipeline::Pipeline', {\n+ Stages: Match.arrayWith([{\n+ Name: 'Source',\n+ Actions: [\n+ Match.objectLike({\n+ Configuration: Match.objectLike({\n+ RepositoryName: { Ref: Match.anyValue() },\n+ }),\n+ Name: Match.objectLike({\n+ 'Fn::Join': [\n+ '_',\n+ {\n+ 'Fn::Split': [\n+ '/',\n+ {\n+ Ref: Match.anyValue(),\n+ },\n+ ],\n+ },\n+ ],\n+ }),\n+ }),\n+ ],\n+ }]),\n+ });\n+});\n+\ntest('GitHub source honors all valid properties', () => {\nnew ModernTestGitHubNpmPipeline(pipelineStack, 'Pipeline', {\ninput: cdkp.CodePipelineSource.gitHub('owner/repo', 'main', {\n",
"new_path": "packages/@aws-cdk/pipelines/test/codepipeline/codepipeline-sources.test.ts",
"old_path": "packages/@aws-cdk/pipelines/test/codepipeline/codepipeline-sources.test.ts"
}
] |
TypeScript
|
Apache License 2.0
|
aws/aws-cdk
|
feat(pipelines): ECR source action (#16385)
Closes #16378
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
| 1
|
feat
|
pipelines
|
841,421
|
24.02.2022 17:47:20
| -32,400
|
b8b0c920e49c235fb65ca5585d343d2af79f9526
|
fix(es/codegen): Fix sourcemap of comments
|
[
{
"change_type": "MODIFY",
"diff": "{\n- \"mappings\": \"AAAAA,CAAC,EAAG,CAA6B,AAA7B,EAA6B,AAA7B,yBAA6B,AAA7B,EAA6B\",\n+ \"mappings\": \"AAAAA,CAAC,GAAG,EAA6B,AAA7B,yBAA6B,AAA7B,EAA6B\",\n\"names\": [\n\"a\"\n],\n",
"new_path": "crates/swc/tests/fixture/issue-3715/1/output/index.map",
"old_path": "crates/swc/tests/fixture/issue-3715/1/output/index.map"
},
{
"change_type": "MODIFY",
"diff": "{\n- \"mappings\": \"AAAAA,CAAC,EAAG,CAA6B,AAA7B,EAA6B,AAA7B,yBAA6B,AAA7B,EAA6B\",\n+ \"mappings\": \"AAAAA,CAAC,GAAG,EAA6B,AAA7B,yBAA6B,AAA7B,EAA6B\",\n\"names\": [\n\"a\"\n],\n",
"new_path": "crates/swc/tests/fixture/issue-3715/2/output/index.map",
"old_path": "crates/swc/tests/fixture/issue-3715/2/output/index.map"
},
{
"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-3716/input/.swcrc",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+a()/*?*/\n+\n+a()//?\n+\n+a();/*?*/\n+\n+a();//?\n",
"new_path": "crates/swc/tests/fixture/issue-3716/input/index.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+a();\n+/*?*/ a() //?\n+;\n+a(); /*?*/\n+a(); //?\n",
"new_path": "crates/swc/tests/fixture/issue-3716/output/index.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"mappings\": \"AAAAA,CAAC;AAAE,EAAK,AAAL,CAAK,AAAL,EAAK,CAERA,CAAC,GAAE,EAAG,AAAH,CAAG;;AAENA,CAAC,IAAG,EAAK,AAAL,CAAK,AAAL,EAAK;AAETA,CAAC,IAAG,EAAG,AAAH,CAAG\",\n+ \"names\": [\n+ \"a\"\n+ ],\n+ \"sources\": [\n+ \"../../input/index.js\"\n+ ],\n+ \"sourcesContent\": [\n+ \"a()/*?*/\\n\\na()//?\\n\\na();/*?*/\\n\\na();//?\\n\"\n+ ],\n+ \"version\": 3\n+}\n",
"new_path": "crates/swc/tests/fixture/issue-3716/output/index.map",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -13,7 +13,7 @@ macro_rules! write_comments {\nmatch cmt.kind {\nCommentKind::Line => {\nif $prefix_space {\n- $e.wr.write_comment(cmt.span, \" \")?;\n+ $e.wr.write_comment(swc_common::DUMMY_SP, \" \")?;\n}\n$e.wr.write_comment(cmt.span, \"//\")?;\n$e.wr.write_comment(cmt.span, &cmt.text)?;\n@@ -21,7 +21,7 @@ macro_rules! write_comments {\n}\nCommentKind::Block => {\nif $prefix_space {\n- $e.wr.write_comment(cmt.span, \" \")?;\n+ $e.wr.write_comment(swc_common::DUMMY_SP, \" \")?;\n}\n$e.wr.write_comment(cmt.span, \"/*\")?;\n$e.wr.write_lit(cmt.span, &cmt.text)?;\n",
"new_path": "crates/swc_ecma_codegen/src/comments.rs",
"old_path": "crates/swc_ecma_codegen/src/comments.rs"
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
fix(es/codegen): Fix sourcemap of comments (#3723)
| 1
|
fix
|
es/codegen
|
889,620
|
24.02.2022 17:52:47
| -28,800
|
3a218c0afabb76493f29b3836c9558fc7c0dc9f1
|
refactor: use fetchSet
|
[
{
"change_type": "MODIFY",
"diff": "@@ -43,9 +43,7 @@ class BookMetadataAggregationDao(\ndsl.select(t.TAG)\n.from(t)\n.where(t.SERIES_ID.eq(seriesId))\n- .fetchInto(t)\n- .mapNotNull { it.tag }\n- .toSet()\n+ .fetchSet(t.TAG)\n@Transactional\noverride fun insert(metadata: BookMetadataAggregation) {\n",
"new_path": "komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookMetadataAggregationDao.kt",
"old_path": "komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookMetadataAggregationDao.kt"
},
{
"change_type": "MODIFY",
"diff": "@@ -53,9 +53,7 @@ class BookMetadataDao(\ndsl.select(bt.TAG)\n.from(bt)\n.where(bt.BOOK_ID.eq(bookId))\n- .fetchInto(bt)\n- .mapNotNull { it.tag }\n- .toSet()\n+ .fetchSet(bt.TAG)\nprivate fun findLinks(bookId: String) =\ndsl.select(bl.LABEL, bl.URL)\n",
"new_path": "komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookMetadataDao.kt",
"old_path": "komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookMetadataDao.kt"
}
] |
Kotlin
|
MIT License
|
gotson/komga
|
refactor: use fetchSet
| 1
|
refactor
| null |
889,620
|
24.02.2022 17:55:36
| -28,800
|
496ebb0aac88e981d1bb1e2ac36776a72f167303
|
feat: sharing labels for series
|
[
{
"change_type": "ADD",
"diff": "+CREATE TABLE SERIES_METADATA_SHARING\n+(\n+ LABEL varchar NOT NULL,\n+ SERIES_ID varchar NOT NULL,\n+ FOREIGN KEY (SERIES_ID) REFERENCES SERIES (ID)\n+);\n+\n+alter table SERIES_METADATA\n+ add column SHARING_LABELS_LOCK boolean NOT NULL DEFAULT 0;\n",
"new_path": "komga/src/flyway/resources/db/migration/sqlite/V20220224112015__series_sharing_labels.sql",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "package org.gotson.komga.domain.model\n+import org.gotson.komga.language.lowerNotBlank\nimport java.time.LocalDateTime\nclass SeriesMetadata(\n@@ -14,6 +15,7 @@ class SeriesMetadata(\ngenres: Set<String> = emptySet(),\ntags: Set<String> = emptySet(),\nval totalBookCount: Int? = null,\n+ sharingLabels: Set<String> = emptySet(),\nval statusLock: Boolean = false,\nval titleLock: Boolean = false,\n@@ -26,6 +28,7 @@ class SeriesMetadata(\nval genresLock: Boolean = false,\nval tagsLock: Boolean = false,\nval totalBookCountLock: Boolean = false,\n+ val sharingLabelsLock: Boolean = false,\nval seriesId: String = \"\",\n@@ -37,8 +40,9 @@ class SeriesMetadata(\nval summary = summary.trim()\nval publisher = publisher.trim()\nval language = language.trim().lowercase()\n- val tags = tags.map { it.lowercase().trim() }.filter { it.isNotBlank() }.toSet()\n- val genres = genres.map { it.lowercase().trim() }.filter { it.isNotBlank() }.toSet()\n+ val tags = tags.lowerNotBlank().toSet()\n+ val genres = genres.lowerNotBlank().toSet()\n+ val sharingLabels = sharingLabels.lowerNotBlank().toSet()\nfun copy(\nstatus: Status = this.status,\n@@ -52,6 +56,7 @@ class SeriesMetadata(\ngenres: Set<String> = this.genres,\ntags: Set<String> = this.tags,\ntotalBookCount: Int? = this.totalBookCount,\n+ sharingLabels: Set<String> = this.sharingLabels,\nstatusLock: Boolean = this.statusLock,\ntitleLock: Boolean = this.titleLock,\ntitleSortLock: Boolean = this.titleSortLock,\n@@ -63,6 +68,7 @@ class SeriesMetadata(\ngenresLock: Boolean = this.genresLock,\ntagsLock: Boolean = this.tagsLock,\ntotalBookCountLock: Boolean = this.totalBookCountLock,\n+ sharingLabelsLock: Boolean = this.sharingLabelsLock,\nseriesId: String = this.seriesId,\ncreatedDate: LocalDateTime = this.createdDate,\nlastModifiedDate: LocalDateTime = this.lastModifiedDate,\n@@ -79,6 +85,7 @@ class SeriesMetadata(\ngenres = genres,\ntags = tags,\ntotalBookCount = totalBookCount,\n+ sharingLabels = sharingLabels,\nstatusLock = statusLock,\ntitleLock = titleLock,\ntitleSortLock = titleSortLock,\n@@ -90,6 +97,7 @@ class SeriesMetadata(\ngenresLock = genresLock,\ntagsLock = tagsLock,\ntotalBookCountLock = totalBookCountLock,\n+ sharingLabelsLock = sharingLabelsLock,\nseriesId = seriesId,\ncreatedDate = createdDate,\nlastModifiedDate = lastModifiedDate,\n@@ -106,7 +114,6 @@ class SeriesMetadata(\nWEBTOON\n}\n- override fun toString(): String {\n- return \"SeriesMetadata(status=$status, readingDirection=$readingDirection, ageRating=$ageRating, language='$language', totalBookCount=$totalBookCount, statusLock=$statusLock, titleLock=$titleLock, titleSortLock=$titleSortLock, summaryLock=$summaryLock, readingDirectionLock=$readingDirectionLock, publisherLock=$publisherLock, ageRatingLock=$ageRatingLock, languageLock=$languageLock, genresLock=$genresLock, tagsLock=$tagsLock, totalBookCountLock=$totalBookCountLock, seriesId='$seriesId', createdDate=$createdDate, lastModifiedDate=$lastModifiedDate, title='$title', titleSort='$titleSort', summary='$summary', publisher='$publisher', tags=$tags, genres=$genres)\"\n- }\n+ override fun toString(): String =\n+ \"SeriesMetadata(status=$status, readingDirection=$readingDirection, ageRating=$ageRating, totalBookCount=$totalBookCount, statusLock=$statusLock, titleLock=$titleLock, titleSortLock=$titleSortLock, summaryLock=$summaryLock, readingDirectionLock=$readingDirectionLock, publisherLock=$publisherLock, ageRatingLock=$ageRatingLock, languageLock=$languageLock, genresLock=$genresLock, tagsLock=$tagsLock, totalBookCountLock=$totalBookCountLock, sharingLabelsLock=$sharingLabelsLock, seriesId='$seriesId', createdDate=$createdDate, lastModifiedDate=$lastModifiedDate, title='$title', titleSort='$titleSort', summary='$summary', publisher='$publisher', language='$language', tags=$tags, genres=$genres, sharingLabels=$sharingLabels)\"\n}\n",
"new_path": "komga/src/main/kotlin/org/gotson/komga/domain/model/SeriesMetadata.kt",
"old_path": "komga/src/main/kotlin/org/gotson/komga/domain/model/SeriesMetadata.kt"
},
{
"change_type": "MODIFY",
"diff": "@@ -54,6 +54,7 @@ class SeriesDtoDao(\nprivate val cs = Tables.COLLECTION_SERIES\nprivate val g = Tables.SERIES_METADATA_GENRE\nprivate val st = Tables.SERIES_METADATA_TAG\n+ private val sl = Tables.SERIES_METADATA_SHARING\nprivate val bma = Tables.BOOK_METADATA_AGGREGATION\nprivate val bmaa = Tables.BOOK_METADATA_AGGREGATION_AUTHOR\nprivate val bmat = Tables.BOOK_METADATA_AGGREGATION_TAG\n@@ -235,6 +236,11 @@ class SeriesDtoDao(\n.where(st.SERIES_ID.eq(sr.id))\n.fetchSet(st.TAG)\n+ val sharingLabels = dsl.select(sl.LABEL)\n+ .from(sl)\n+ .where(sl.SERIES_ID.eq(sr.id))\n+ .fetchSet(sl.LABEL)\n+\nval aggregatedAuthors = dsl.selectFrom(bmaa)\n.where(bmaa.SERIES_ID.eq(sr.id))\n.fetchInto(bmaa)\n@@ -250,7 +256,7 @@ class SeriesDtoDao(\nbooksReadCount,\nbooksUnreadCount,\nbooksInProgressCount,\n- dr.toDto(genres, tags),\n+ dr.toDto(genres, tags, sharingLabels),\nbmar.toDto(aggregatedAuthors, aggregatedTags),\n)\n}\n@@ -346,7 +352,7 @@ class SeriesDtoDao(\ndeleted = deletedDate != null,\n)\n- private fun SeriesMetadataRecord.toDto(genres: Set<String>, tags: Set<String>) =\n+ private fun SeriesMetadataRecord.toDto(genres: Set<String>, tags: Set<String>, sharingLabels: Set<String>) =\nSeriesMetadataDto(\nstatus = status,\nstatusLock = statusLock,\n@@ -372,6 +378,8 @@ class SeriesDtoDao(\ntagsLock = tagsLock,\ntotalBookCount = totalBookCount,\ntotalBookCountLock = totalBookCountLock,\n+ sharingLabels = sharingLabels,\n+ sharingLabelsLock = sharingLabelsLock,\n)\nprivate fun BookMetadataAggregationRecord.toDto(authors: List<AuthorDto>, tags: Set<String>) =\n",
"new_path": "komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesDtoDao.kt",
"old_path": "komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesDtoDao.kt"
},
{
"change_type": "MODIFY",
"diff": "@@ -20,12 +20,13 @@ class SeriesMetadataDao(\nprivate val d = Tables.SERIES_METADATA\nprivate val g = Tables.SERIES_METADATA_GENRE\nprivate val st = Tables.SERIES_METADATA_TAG\n+ private val sl = Tables.SERIES_METADATA_SHARING\noverride fun findById(seriesId: String): SeriesMetadata =\n- findOne(seriesId)!!.toDomain(findGenres(seriesId), findTags(seriesId))\n+ findOne(seriesId)!!.toDomain(findGenres(seriesId), findTags(seriesId), findSharingLabels(seriesId))\noverride fun findByIdOrNull(seriesId: String): SeriesMetadata? =\n- findOne(seriesId)?.toDomain(findGenres(seriesId), findTags(seriesId))\n+ findOne(seriesId)?.toDomain(findGenres(seriesId), findTags(seriesId), findSharingLabels(seriesId))\nprivate fun findOne(seriesId: String) =\ndsl.selectFrom(d)\n@@ -36,17 +37,19 @@ class SeriesMetadataDao(\ndsl.select(g.GENRE)\n.from(g)\n.where(g.SERIES_ID.eq(seriesId))\n- .fetchInto(g)\n- .mapNotNull { it.genre }\n- .toSet()\n+ .fetchSet(g.GENRE)\nprivate fun findTags(seriesId: String) =\ndsl.select(st.TAG)\n.from(st)\n.where(st.SERIES_ID.eq(seriesId))\n- .fetchInto(st)\n- .mapNotNull { it.tag }\n- .toSet()\n+ .fetchSet(st.TAG)\n+\n+ private fun findSharingLabels(seriesId: String) =\n+ dsl.select(sl.LABEL)\n+ .from(sl)\n+ .where(sl.SERIES_ID.eq(seriesId))\n+ .fetchSet(sl.LABEL)\n@Transactional\noverride fun insert(metadata: SeriesMetadata) {\n@@ -72,10 +75,12 @@ class SeriesMetadataDao(\n.set(d.TAGS_LOCK, metadata.tagsLock)\n.set(d.TOTAL_BOOK_COUNT, metadata.totalBookCount)\n.set(d.TOTAL_BOOK_COUNT_LOCK, metadata.totalBookCountLock)\n+ .set(d.SHARING_LABELS_LOCK, metadata.sharingLabelsLock)\n.execute()\ninsertGenres(metadata)\ninsertTags(metadata)\n+ insertSharingLabels(metadata)\n}\n@Transactional\n@@ -101,6 +106,7 @@ class SeriesMetadataDao(\n.set(d.TAGS_LOCK, metadata.tagsLock)\n.set(d.TOTAL_BOOK_COUNT, metadata.totalBookCount)\n.set(d.TOTAL_BOOK_COUNT_LOCK, metadata.totalBookCountLock)\n+ .set(d.SHARING_LABELS_LOCK, metadata.sharingLabelsLock)\n.set(d.LAST_MODIFIED_DATE, LocalDateTime.now(ZoneId.of(\"Z\")))\n.where(d.SERIES_ID.eq(metadata.seriesId))\n.execute()\n@@ -113,8 +119,13 @@ class SeriesMetadataDao(\n.where(st.SERIES_ID.eq(metadata.seriesId))\n.execute()\n+ dsl.deleteFrom(sl)\n+ .where(sl.SERIES_ID.eq(metadata.seriesId))\n+ .execute()\n+\ninsertGenres(metadata)\ninsertTags(metadata)\n+ insertSharingLabels(metadata)\n}\nprivate fun insertGenres(metadata: SeriesMetadata) {\n@@ -147,10 +158,26 @@ class SeriesMetadataDao(\n}\n}\n+ private fun insertSharingLabels(metadata: SeriesMetadata) {\n+ if (metadata.sharingLabels.isNotEmpty()) {\n+ metadata.sharingLabels.chunked(batchSize).forEach { chunk ->\n+ dsl.batch(\n+ dsl.insertInto(sl, sl.SERIES_ID, sl.LABEL)\n+ .values(null as String?, null),\n+ ).also { step ->\n+ chunk.forEach {\n+ step.bind(metadata.seriesId, it)\n+ }\n+ }.execute()\n+ }\n+ }\n+ }\n+\n@Transactional\noverride fun delete(seriesId: String) {\ndsl.deleteFrom(g).where(g.SERIES_ID.eq(seriesId)).execute()\ndsl.deleteFrom(st).where(st.SERIES_ID.eq(seriesId)).execute()\n+ dsl.deleteFrom(sl).where(sl.SERIES_ID.eq(seriesId)).execute()\ndsl.deleteFrom(d).where(d.SERIES_ID.eq(seriesId)).execute()\n}\n@@ -160,12 +187,13 @@ class SeriesMetadataDao(\ndsl.deleteFrom(g).where(g.SERIES_ID.`in`(dsl.selectTempStrings())).execute()\ndsl.deleteFrom(st).where(st.SERIES_ID.`in`(dsl.selectTempStrings())).execute()\n+ dsl.deleteFrom(sl).where(sl.SERIES_ID.`in`(dsl.selectTempStrings())).execute()\ndsl.deleteFrom(d).where(d.SERIES_ID.`in`(dsl.selectTempStrings())).execute()\n}\noverride fun count(): Long = dsl.fetchCount(d).toLong()\n- private fun SeriesMetadataRecord.toDomain(genres: Set<String>, tags: Set<String>) =\n+ private fun SeriesMetadataRecord.toDomain(genres: Set<String>, tags: Set<String>, sharingLabels: Set<String>) =\nSeriesMetadata(\nstatus = SeriesMetadata.Status.valueOf(status),\ntitle = title,\n@@ -180,6 +208,7 @@ class SeriesMetadataDao(\ngenres = genres,\ntags = tags,\ntotalBookCount = totalBookCount,\n+ sharingLabels = sharingLabels,\nstatusLock = statusLock,\ntitleLock = titleLock,\n@@ -192,6 +221,7 @@ class SeriesMetadataDao(\ngenresLock = genresLock,\ntagsLock = tagsLock,\ntotalBookCountLock = totalBookCountLock,\n+ sharingLabelsLock = sharingLabelsLock,\nseriesId = seriesId,\n",
"new_path": "komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesMetadataDao.kt",
"old_path": "komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesMetadataDao.kt"
},
{
"change_type": "MODIFY",
"diff": "@@ -50,6 +50,8 @@ data class SeriesMetadataDto(\nval tagsLock: Boolean,\nval totalBookCount: Int?,\nval totalBookCountLock: Boolean,\n+ val sharingLabels: Set<String>,\n+ val sharingLabelsLock: Boolean,\n@JsonFormat(pattern = \"yyyy-MM-dd'T'HH:mm:ss\")\nval created: LocalDateTime,\n",
"new_path": "komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesDto.kt",
"old_path": "komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/SeriesDto.kt"
},
{
"change_type": "MODIFY",
"diff": "@@ -62,6 +62,7 @@ class SeriesMetadataDaoTest(\ntags = setOf(\"tag\", \"another\"),\nlanguage = \"en\",\ntotalBookCount = 5,\n+ sharingLabels = setOf(\"kids\"),\ntitleLock = true,\ntitleSortLock = true,\nsummaryLock = true,\n@@ -72,6 +73,7 @@ class SeriesMetadataDaoTest(\nlanguageLock = true,\ntagsLock = true,\ntotalBookCountLock = true,\n+ sharingLabelsLock = true,\nseriesId = series.id,\n)\n@@ -93,6 +95,7 @@ class SeriesMetadataDaoTest(\nassertThat(created.genres).containsAll(metadata.genres)\nassertThat(created.tags).containsAll(metadata.tags)\nassertThat(created.totalBookCount).isEqualTo(metadata.totalBookCount)\n+ assertThat(created.sharingLabels).containsAll(metadata.sharingLabels)\nassertThat(created.titleLock).isEqualTo(metadata.titleLock)\nassertThat(created.titleSortLock).isEqualTo(metadata.titleSortLock)\n@@ -105,6 +108,7 @@ class SeriesMetadataDaoTest(\nassertThat(created.languageLock).isEqualTo(metadata.languageLock)\nassertThat(created.tagsLock).isEqualTo(metadata.tagsLock)\nassertThat(created.totalBookCountLock).isEqualTo(metadata.totalBookCountLock)\n+ assertThat(created.sharingLabelsLock).isEqualTo(metadata.sharingLabelsLock)\n}\n@Test\n@@ -135,6 +139,7 @@ class SeriesMetadataDaoTest(\nassertThat(created.genres).isEmpty()\nassertThat(created.tags).isEmpty()\nassertThat(created.totalBookCount).isNull()\n+ assertThat(created.sharingLabels).isEmpty()\nassertThat(created.titleLock).isFalse\nassertThat(created.titleSortLock).isFalse\n@@ -147,6 +152,7 @@ class SeriesMetadataDaoTest(\nassertThat(created.languageLock).isFalse\nassertThat(created.tagsLock).isFalse\nassertThat(created.totalBookCountLock).isFalse\n+ assertThat(created.sharingLabelsLock).isFalse\n}\n@Test\n@@ -198,6 +204,7 @@ class SeriesMetadataDaoTest(\ngenres = setOf(\"Action\"),\ntags = setOf(\"tag\"),\ntotalBookCount = 3,\n+ sharingLabels = setOf(\"kids\"),\nseriesId = series.id,\n)\nseriesMetadataDao.insert(metadata)\n@@ -218,6 +225,7 @@ class SeriesMetadataDaoTest(\ngenres = setOf(\"Adventure\"),\ntags = setOf(\"Another\"),\ntotalBookCount = 8,\n+ sharingLabels = setOf(\"adult\"),\nstatusLock = true,\ntitleLock = true,\ntitleSortLock = true,\n@@ -229,6 +237,7 @@ class SeriesMetadataDaoTest(\ngenresLock = true,\ntagsLock = true,\ntotalBookCountLock = true,\n+ sharingLabelsLock = true,\n)\n}\n@@ -251,6 +260,7 @@ class SeriesMetadataDaoTest(\nassertThat(modified.genres).containsAll(updated.genres)\nassertThat(modified.tags).containsAll(updated.tags)\nassertThat(modified.totalBookCount).isEqualTo(updated.totalBookCount)\n+ assertThat(modified.sharingLabels).containsAll(updated.sharingLabels)\nassertThat(modified.titleLock).isTrue\nassertThat(modified.titleSortLock).isTrue\n@@ -263,5 +273,6 @@ class SeriesMetadataDaoTest(\nassertThat(modified.publisherLock).isTrue\nassertThat(modified.tagsLock).isTrue\nassertThat(modified.totalBookCountLock).isTrue\n+ assertThat(modified.sharingLabelsLock).isTrue\n}\n}\n",
"new_path": "komga/src/test/kotlin/org/gotson/komga/infrastructure/jooq/SeriesMetadataDaoTest.kt",
"old_path": "komga/src/test/kotlin/org/gotson/komga/infrastructure/jooq/SeriesMetadataDaoTest.kt"
}
] |
Kotlin
|
MIT License
|
gotson/komga
|
feat: sharing labels for series
| 1
|
feat
| null |
71,292
|
24.02.2022 18:24:49
| -7,200
|
52128cf19ec9c35f1b79d7e6cc9088dd95bfde76
|
chore(node-bundle): mark private
It was always supposed to be private. Oversight.
*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": "@@ -32,4 +32,6 @@ project.testTask.prependSpawn(project.compileTask);\nconst buildAndTest = project.addTask('build+test');\nbuildAndTest.spawn(project.testTask);\n+project.addFields({ private: true });\n+\nproject.synth();\n",
"new_path": "tools/@aws-cdk/node-bundle/.projenrc.js",
"old_path": "tools/@aws-cdk/node-bundle/.projenrc.js"
},
{
"change_type": "MODIFY",
"diff": "}\n},\n\"types\": \"lib/index.d.ts\",\n+ \"private\": true,\n\"//\": \"~~ Generated by projen. To modify, edit .projenrc.js and run \\\"npx projen\\\".\"\n}\n\\ No newline at end of file\n",
"new_path": "tools/@aws-cdk/node-bundle/package.json",
"old_path": "tools/@aws-cdk/node-bundle/package.json"
}
] |
TypeScript
|
Apache License 2.0
|
aws/aws-cdk
|
chore(node-bundle): mark private (#19139)
It was always supposed to be private. Oversight.
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
| 1
|
chore
|
node-bundle
|
841,509
|
24.02.2022 18:31:22
| 28,800
|
d8b01660dcd0bca43993043e8fa6ed33c62894a9
|
fix(plugin/macro): Do not free guest memory twice
|
[
{
"change_type": "MODIFY",
"diff": "@@ -29,18 +29,15 @@ fn handle_func(func: ItemFn) -> TokenStream {\n#[cfg(target_arch = \"wasm32\")] // Allow testing\nextern \"C\" {\nfn __set_transform_result(bytes_ptr: i32, bytes_ptr_len: i32);\n- fn __free(bytes_ptr: i32, size: i32) -> i32;\n}\n- /// Call hosts's imported fn to set transform results, then free allocated memory in guest side.\n- /// When guest calls __set_transform_result host should've completed read guest's memory and allocates its byte\n- /// into host's enviroment so guest can free its memory later.\n- fn set_transform_result_volatile(bytes_ptr: i32, bytes_ptr_len: i32) {\n+ /// Call hosts's imported fn to set transform results.\n+ /// __set_transform_result is host side imported fn, which read and copies guest's byte into host.\n+ fn send_transform_result_to_host(bytes_ptr: i32, bytes_ptr_len: i32) {\n#[cfg(target_arch = \"wasm32\")] // Allow testing\nunsafe {\n__set_transform_result(bytes_ptr, bytes_ptr_len);\n- __free(bytes_ptr, bytes_ptr_len);\n}\n}\n@@ -49,7 +46,7 @@ fn handle_func(func: ItemFn) -> TokenStream {\nlet ret = swc_plugin::Serialized::serialize(&plugin_error).expect(\"Should able to serialize PluginError\");\nlet ret_ref = ret.as_ref();\n- set_transform_result_volatile(\n+ send_transform_result_to_host(\nret_ref.as_ptr() as _,\nstd::convert::TryInto::try_into(ret_ref.len()).expect(\"Should able to convert size of PluginError\")\n);\n@@ -163,7 +160,7 @@ fn handle_func(func: ItemFn) -> TokenStream {\nreturn construct_error_ptr(err);\n}\n- set_transform_result_volatile(serialized_result.as_ptr() as _, serialized_result_len.expect(\"Should be an i32\"));\n+ send_transform_result_to_host(serialized_result.as_ptr() as _, serialized_result_len.expect(\"Should be an i32\"));\n0\n}\n};\n",
"new_path": "crates/swc_plugin_macro/src/lib.rs",
"old_path": "crates/swc_plugin_macro/src/lib.rs"
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
fix(plugin/macro): Do not free guest memory twice (#3732)
| 1
|
fix
|
plugin/macro
|
342,861
|
24.02.2022 18:37:21
| -3,600
|
ec0deab6e0814af056ea2f19b4bd56b09927d540
|
fix(Drawer): close on ESC
|
[
{
"change_type": "MODIFY",
"diff": "@@ -3,6 +3,7 @@ import * as React from \"react\";\nimport styled, { css } from \"styled-components\";\nimport { convertHexToRgba } from \"@kiwicom/orbit-design-tokens\";\n+import KEY_CODE_MAP from \"../common/keyMaps\";\nimport useFocusTrap from \"../hooks/useFocusTrap\";\nimport useLockScrolling from \"../hooks/useLockScrolling\";\nimport transition from \"../utils/transition\";\n@@ -181,7 +182,17 @@ const Drawer = ({\nsetOverlayShownWithTimeout(false);\n}\n}\n- }, [overlayShown, setOverlayShown, setOverlayShownWithTimeout, shown]);\n+\n+ const handleKeyDown = ev => {\n+ if (ev.keyCode === KEY_CODE_MAP.ESC && onClose) {\n+ onClose();\n+ }\n+ };\n+\n+ window.addEventListener(\"keydown\", handleKeyDown);\n+ return () => window.removeEventListener(\"keydown\", handleKeyDown);\n+ }, [overlayShown, setOverlayShown, setOverlayShownWithTimeout, shown, onClose]);\n+\nreturn (\n<StyledDrawer\nrole=\"button\"\n",
"new_path": "packages/orbit-components/src/Drawer/index.jsx",
"old_path": "packages/orbit-components/src/Drawer/index.jsx"
}
] |
JavaScript
|
MIT License
|
kiwicom/orbit
|
fix(Drawer): close on ESC
| 1
|
fix
|
Drawer
|
306,321
|
24.02.2022 18:50:23
| -3,600
|
a3ccffa5adf589b118dd038ec04ba60ca9def161
|
feat: on release trigger chocolatey-packages workflow
|
[
{
"change_type": "MODIFY",
"diff": "@@ -103,3 +103,15 @@ jobs:\nAMPLIFY_APP_ID: ${{ secrets.AMPLIFY_APP_ID }}\nAWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\nAWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n+\n+ update-choco-version:\n+ name: Update chocolatey version\n+ needs: build\n+ runs-on: ubuntu-latest\n+ steps:\n+ - run: |\n+ curl -X POST \\\n+ -H \"Accept: application/vnd.github.v3+json\" \\\n+ -H 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \\\n+ https://api.github.com/repos/infracost/chocolatey-packages/dispatches \\\n+ -d '{\"event_type\":\"infracost_choco\"}'\n",
"new_path": ".github/workflows/create-release.yml",
"old_path": ".github/workflows/create-release.yml"
}
] |
Go
|
Apache License 2.0
|
infracost/infracost
|
feat: on release trigger chocolatey-packages workflow (#1398)
| 1
|
feat
| null |
841,421
|
24.02.2022 18:55:13
| -32,400
|
c677593dba3d2379fb1cf9f2ce65960af33deb6f
|
chore: Publish `v1.2.145`
|
[
{
"change_type": "MODIFY",
"diff": "@@ -4020,7 +4020,7 @@ checksum = \"fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6\"\n[[package]]\nname = \"wasm\"\n-version = \"1.2.144\"\n+version = \"1.2.145\"\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.144\"\n+version = \"1.2.145\"\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.144\",\n+ \"version\": \"1.2.145\",\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.145`
| 1
|
chore
| null |
756,013
|
24.02.2022 19:09:28
| 21,600
|
48ba57d3d048183c4026efb561ac8dbdd05ae433
|
fix: tolerate tags ending in `@` with any numbers or dots
|
[
{
"change_type": "MODIFY",
"diff": "@@ -5,7 +5,7 @@ otherTags=\nif test -z \"$cmd\"; then\ncmd=echo\nfi\n-for tag in $(git tag -l | egrep -e '@[0-9]+\\.[0-9]+\\.[0-9]+$'); do\n+for tag in $(git tag -l | grep -E '@[.0-9]+$'); do\ncase $tag in\n@agoric/sdk@*) sdkTags=\"$sdkTags $tag\" ;;\n@agoric/cosmos@*)\n@@ -20,5 +20,5 @@ for tag in $(git tag -l | egrep -e '@[0-9]+\\.[0-9]+\\.[0-9]+$'); do\ndone\n# Push the SDK tag separately so that it can trigger CI.\n-$cmd$otherTags && $cmd$sdkTags\n+eval \"\\$cmd\\$otherTags && \\$cmd\\$sdkTags\"\nexit $?\n",
"new_path": "scripts/get-released-tags",
"old_path": "scripts/get-released-tags"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
fix: tolerate tags ending in `@` with any numbers or dots
| 1
|
fix
| null |
756,013
|
24.02.2022 19:10:27
| 21,600
|
4e9dac69d830f7db934e2b5aeccc89d648f0a85e
|
fix(agoric-cli): default voting period of 36h
|
[
{
"change_type": "MODIFY",
"diff": "@@ -46,6 +46,7 @@ export const DENOM_METADATA = [\n];\nexport const GOV_DEPOSIT_COINS = [{ amount: '1000000', denom: MINT_DENOM }];\n+export const GOV_VOTING_PERIOD = '36h';\nexport const DEFAULT_MINIMUM_GAS_PRICES = `0${CENTRAL_DENOM}`;\n// Can't beat the speed of light, we need 600ms round trip time for the other\n@@ -202,6 +203,7 @@ export function finishCosmosGenesis({ genesisJson, exportedGenesisJson }) {\ngenesis.app_state.mint.params.mint_denom = MINT_DENOM;\ngenesis.app_state.crisis.constant_fee.denom = MINT_DENOM;\ngenesis.app_state.gov.deposit_params.min_deposit = GOV_DEPOSIT_COINS;\n+ genesis.app_state.gov.voting_params.voting_period = GOV_VOTING_PERIOD;\n// Reduce the cost of a transaction.\ngenesis.app_state.auth.params.tx_size_cost_per_byte = '1';\n",
"new_path": "packages/agoric-cli/src/chain-config.js",
"old_path": "packages/agoric-cli/src/chain-config.js"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
fix(agoric-cli): default voting period of 36h
| 1
|
fix
|
agoric-cli
|
756,013
|
24.02.2022 19:11:10
| 21,600
|
1a66b8ccf747ff6176fc9b0003ced2f0b62af58e
|
docs(MAINTAINERS): SDKTAG is not found in a file
|
[
{
"change_type": "MODIFY",
"diff": "@@ -56,8 +56,7 @@ To make validators' lives easier, create a Git tag for the chain-id:\n```sh\nCHAIN_ID=agoricstage-8 # Change this as necessary\n-SDK_VERSION=$(jq -r .version package.json)\n-git tag -s -m \"release $CHAIN_ID\" $CHAIN_ID @agoric/sdk@$SDK_VERSION^{}\n+git tag -s -m \"release $CHAIN_ID\" $CHAIN_ID @agoric/sdk@$SDKVER^{}\ngit push origin $CHAIN_ID\n```\n",
"new_path": "MAINTAINERS.md",
"old_path": "MAINTAINERS.md"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
docs(MAINTAINERS): SDKTAG is not found in a file
| 1
|
docs
|
MAINTAINERS
|
342,861
|
24.02.2022 19:13:44
| -3,600
|
7fabd8e8566806e102668e265cb4d18af467f796
|
fix(Drawer): autofocus close button when opened
|
[
{
"change_type": "MODIFY",
"diff": "@@ -9,5 +9,5 @@ export interface Props {\nreadonly onClick?: Common.Callback;\n}\n-declare const DrawerClose: React.FunctionComponent<Props>;\n+declare const DrawerClose: React.ForwardRefRenderFunction<HTMLButtonElement, Props>;\nexport { DrawerClose, DrawerClose as default };\n",
"new_path": "packages/orbit-components/src/Drawer/components/DrawerClose.d.ts",
"old_path": "packages/orbit-components/src/Drawer/components/DrawerClose.d.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -18,18 +18,22 @@ StyledDrawerClose.defaultProps = {\ntheme: defaultTheme,\n};\n-const DrawerClose = ({ onClick }: Props): React.Node => {\n+const DrawerClose: React.AbstractComponent<Props, HTMLButtonElement> = React.forwardRef(\n+ ({ onClick }, ref): React.Node => {\nconst translate = useTranslate();\n+\nreturn (\n<StyledDrawerClose>\n<ButtonLink\nonClick={onClick}\niconLeft={<Close />}\n+ ref={ref}\ntype=\"secondary\"\ntitle={translate(\"drawer_hide\")}\n/>\n</StyledDrawerClose>\n);\n-};\n+ },\n+);\nexport default DrawerClose;\n",
"new_path": "packages/orbit-components/src/Drawer/components/DrawerClose.jsx",
"old_path": "packages/orbit-components/src/Drawer/components/DrawerClose.jsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -5,4 +5,4 @@ import type { OnClose } from \"..\";\nexport type Props = {| +onClick?: OnClose |};\n-declare export default React.ComponentType<Props>;\n+declare export default React.AbstractComponent<Props, HTMLButtonElement>;\n",
"new_path": "packages/orbit-components/src/Drawer/components/DrawerClose.jsx.flow",
"old_path": "packages/orbit-components/src/Drawer/components/DrawerClose.jsx.flow"
},
{
"change_type": "MODIFY",
"diff": "@@ -152,6 +152,7 @@ const Drawer = ({\n}: Props): React.Node => {\nconst theme = useTheme();\nconst overlayRef = React.useRef(null);\n+ const closeButtonRef = React.useRef<HTMLElement | null>(null);\nconst scrollableRef = React.useRef<HTMLElement | null>(null);\nconst timeoutLength = React.useMemo(() => parseFloat(theme.orbit.durationNormal) * 1000, [\ntheme.orbit.durationNormal,\n@@ -175,6 +176,8 @@ const Drawer = ({\nuseLockScrolling(scrollableRef, lockScrolling && overlayShown);\nReact.useEffect(() => {\n+ closeButtonRef.current?.focus();\n+\nif (overlayShown !== shown) {\nif (shown) {\nsetOverlayShown(true);\n@@ -225,7 +228,7 @@ const Drawer = ({\n{actions}\n</Stack>\n)}\n- {onClose && <DrawerClose onClick={onClose} />}\n+ {onClose && <DrawerClose onClick={onClose} ref={closeButtonRef} />}\n</StyledDrawerHeader>\n)}\n<StyledDrawerContent\n",
"new_path": "packages/orbit-components/src/Drawer/index.jsx",
"old_path": "packages/orbit-components/src/Drawer/index.jsx"
}
] |
JavaScript
|
MIT License
|
kiwicom/orbit
|
fix(Drawer): autofocus close button when opened
| 1
|
fix
|
Drawer
|
756,064
|
24.02.2022 19:35:20
| 28,800
|
fc55adc627d4356f4b12dd423543516a3c1050f5
|
fix(vats): make tests work with new bundlecaps
test-boot.js creates a mock VatAdminService for zoe to use, which now needs
to pretend to handle bundlecaps
|
[
{
"change_type": "MODIFY",
"diff": "// @ts-check\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';\n-import { makeFakeVatAdmin } from '@agoric/zoe/tools/fakeVatAdmin.js';\n+import {\n+ makeFakeVatAdmin,\n+ zcfBundleCap,\n+} from '@agoric/zoe/tools/fakeVatAdmin.js';\nimport buildManualTimer from '@agoric/zoe/tools/manualTimer.js';\nimport { E, Far } from '@endo/far';\n@@ -89,23 +92,41 @@ const testRole = (ROLE, governanceActions) => {\n);\nconst fakeVatAdmin = makeFakeVatAdmin(() => {}).admin;\n- const createVatByName = name => {\n+ const fakeBundleCaps = new Map(); // {} -> name\n+ const getNamedBundleCap = name => {\n+ const bundleCap = harden({});\n+ fakeBundleCaps.set(bundleCap, name);\n+ return bundleCap;\n+ };\n+ const createVat = bundleCap => {\n+ const name = fakeBundleCaps.get(bundleCap);\n+ assert(name);\nswitch (name) {\ncase 'zcf':\n- return fakeVatAdmin.createVatByName(name);\n+ return fakeVatAdmin.createVat(zcfBundleCap);\ndefault: {\nconst buildRoot = vatRoots[name];\nif (!buildRoot) {\nthrow Error(`TODO: load vat ${name}`);\n}\n- return { root: buildRoot({}, {}), admin: {} };\n+ const vatParameters = {};\n+ if (name === 'zoe') {\n+ vatParameters.zcfBundleName = 'zcf';\n+ }\n+ return { root: buildRoot({}, vatParameters), admin: {} };\n}\n}\n};\n+ const createVatByName = name => {\n+ const bundleCap = getNamedBundleCap(name);\n+ return createVat(bundleCap);\n+ };\n+\nconst vats = {\n...mock.vats,\nvatAdmin: /** @type { any } */ ({\n- createVatAdminService: () => Far('vatAdminSvc', { createVatByName }),\n+ createVatAdminService: () =>\n+ Far('vatAdminSvc', { getNamedBundleCap, createVat, createVatByName }),\n}),\n};\nconst actual = await E(root).bootstrap(vats, mock.devices);\n",
"new_path": "packages/vats/test/test-boot.js",
"old_path": "packages/vats/test/test-boot.js"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
fix(vats): make tests work with new bundlecaps
test-boot.js creates a mock VatAdminService for zoe to use, which now needs
to pretend to handle bundlecaps
| 1
|
fix
|
vats
|
915,272
|
24.02.2022 19:40:03
| -32,400
|
e78855fb0b00e584a5e0c8033bfb13cffec0e87a
|
feat: ddd datadog and elastic-apm tracing schema
|
[
{
"change_type": "MODIFY",
"diff": "\"title\": \"Set Additional HTTP Headers\",\n\"type\": \"object\",\n\"description\": \"Set additional HTTP Headers for the Session Check URL.\",\n- \"additionalProperties\": { \"type\": \"string\" }\n+ \"additionalProperties\": {\n+ \"type\": \"string\"\n+ }\n},\n\"extra_from\": {\n\"title\": \"Extra JSON Path\",\n\"properties\": {\n\"provider\": {\n\"type\": \"string\",\n- \"description\": \"Set this to the tracing backend you wish to use. Supports Zipkin & Jaeger. If omitted or empty, tracing will be disabled.\",\n+ \"description\": \"Set this to the tracing backend you wish to use. Supports Jaeger, Zipkin, DataDog and elastic-apm. If omitted or empty, tracing will be disabled. Use environment variables to configure DataDog (see https://docs.datadoghq.com/tracing/setup/go/#configuration).\",\n\"enum\": [\n\"zipkin\",\n- \"jaeger\"\n+ \"jaeger\",\n+ \"datadog\",\n+ \"elastic-apm\"\n],\n\"examples\": [\n\"zipkin\"\n\"format\": {\n\"description\": \"The log format can either be text or JSON.\",\n\"type\": \"string\",\n- \"enum\": [\"json\", \"text\"]\n+ \"enum\": [\n+ \"json\",\n+ \"text\"\n+ ]\n}\n},\n\"additionalProperties\": false\n",
"new_path": ".schema/config.schema.json",
"old_path": ".schema/config.schema.json"
}
] |
Go
|
Apache License 2.0
|
ory/oathkeeper
|
feat: ddd datadog and elastic-apm tracing schema (#927)
Signed-off-by: sawadashota <shota@sslife.tech>
| 1
|
feat
| null |
471,527
|
24.02.2022 20:14:20
| -3,600
|
8bffe253c4509711fa9c3a5409766b231556129b
|
chore: update rocket to latest stable version
|
[
{
"change_type": "MODIFY",
"diff": "@@ -166,7 +166,7 @@ body[layout^='layout-home'] .supported-by-items {\n}\n.supported-by-items img {\n- min-height: 100px;\n+ height: 100px;\n}\n.supporters {\n",
"new_path": "docs/_assets/style.css",
"old_path": "docs/_assets/style.css"
},
{
"change_type": "MODIFY",
"diff": "@@ -21,6 +21,13 @@ html {\n--button-two: black;\n--button-two-hover: #444444;\n+\n+ /* typography */\n+ --text-color: black;\n+ --primary-font-family: 'Open Sans', sans-serif;\n+ --secondary-font-family: 'Montserrat', sans-serif;\n+ --monospace-font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', 'Courier',\n+ monospace;\n}\n/* TODO: markdown Vars */\n@@ -30,6 +37,7 @@ html {\n@media (prefers-color-scheme: dark) {\nhtml {\n--header-color: #2f3136;\n+ --text-color: #eee;\n--footer-background: rgba(255, 255, 255, 0.1);\n--page-background: #36393e;\n",
"new_path": "docs/_assets/variables.css",
"old_path": "docs/_assets/variables.css"
},
{
"change_type": "MODIFY",
"diff": "\"update-dependency\": \"node scripts/update-dependency.js\"\n},\n\"dependencies\": {\n- \"@rocket/blog\": \"^0.3.0\",\n- \"@rocket/cli\": \"^0.7.0\",\n+ \"@rocket/blog\": \"^0.4.0\",\n+ \"@rocket/cli\": \"^0.10.1\",\n\"@rocket/core\": \"^0.1.2\",\n- \"@rocket/launch\": \"^0.4.2\",\n- \"@rocket/search\": \"^0.3.5\"\n+ \"@rocket/launch\": \"^0.6.0\",\n+ \"@rocket/search\": \"^0.5.1\"\n},\n\"devDependencies\": {\n\"@babel/core\": \"^7.13.16\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "resolved \"https://registry.yarnpkg.com/@11ty/dependency-tree/-/dependency-tree-1.0.0.tgz#b1fa53da49aafe0ab3fe38bc6b6058b704aa59a1\"\nintegrity sha512-2FWYlkphQ/83MG7b9qqBJfJJ0K9zupNz/6n4EdDuNLw6hQHGp4Sp4UMDRyBvA/xCTYDBaPSuSjHuu45tSujegg==\n-\"@11ty/eleventy-cache-assets@^2.1.0\":\n- version \"2.1.0\"\n- resolved \"https://registry.yarnpkg.com/@11ty/eleventy-cache-assets/-/eleventy-cache-assets-2.1.0.tgz#85a99296fea8f7b5807e0ed7af2adf8c66a4892c\"\n- integrity sha512-QZPSvK3yOZlPUQvTxzRYH6hv2S/jz8Pac2NLKQ/BPg16Siba6ujXP0ApToPGZftyDyFa0dZVZxhWcX4ino4KSg==\n+\"@11ty/eleventy-cache-assets@^2.2.1\":\n+ version \"2.3.0\"\n+ resolved \"https://registry.yarnpkg.com/@11ty/eleventy-cache-assets/-/eleventy-cache-assets-2.3.0.tgz#6a81c5df822d42ca2268aa6e2374b272297ffe46\"\n+ integrity sha512-W8tvO00GlWaKt3ccpEStaUBoj9BE3EgzuD8uYChCfYbN2Q4HkEItkiapvIJT0zJwAwoMfnSq6VHPLScYlX2XCg==\ndependencies:\ndebug \"^4.3.1\"\nflat-cache \"^3.0.4\"\np-queue \"^6.6.2\"\nshort-hash \"^1.0.0\"\n-\"@11ty/eleventy-img@^0.7.4\":\n- version \"0.7.8\"\n- resolved \"https://registry.yarnpkg.com/@11ty/eleventy-img/-/eleventy-img-0.7.8.tgz#20af70a4d0b13f516f67b8bf747b2ec9ee1e7a37\"\n- integrity sha512-X2ViZvjaZ9N0sGLIJ0FrTT0zS/l3LczPpLc+SlgkdEy/CCrB1TtcgnFaAdC4e8r60s4XFcaHXz3CKmmZzVqfrA==\n+\"@11ty/eleventy-img@^0.9.0\":\n+ version \"0.9.0\"\n+ resolved \"https://registry.yarnpkg.com/@11ty/eleventy-img/-/eleventy-img-0.9.0.tgz#bf9e469f3c48778fa0c6f6f7f949524207420cc3\"\n+ integrity sha512-bw6++TlUokFuv/VUvnAyVQp5bykSleVvmvedIWkN8iKMykrNnf+UAUi9byXrlsFwgUvWBdMZH+0j1/1nKhv5VQ==\ndependencies:\n- \"@11ty/eleventy-cache-assets\" \"^2.1.0\"\n+ \"@11ty/eleventy-cache-assets\" \"^2.2.1\"\ndebug \"^4.3.1\"\nfs-extra \"^9.0.1\"\nimage-size \"^0.9.3\"\np-queue \"^6.6.2\"\n- sharp \"^0.27.0\"\n+ sharp \"^0.28.2\"\nshort-hash \"^1.0.0\"\n\"@11ty/eleventy@^0.11.1\":\n\"@jridgewell/resolve-uri\" \"^3.0.3\"\n\"@jridgewell/sourcemap-codec\" \"^1.4.10\"\n-\"@lion/accordion@^0.4.2\":\n- version \"0.4.2\"\n- resolved \"https://registry.yarnpkg.com/@lion/accordion/-/accordion-0.4.2.tgz#efeb56360113a2b68e182ff29ef0932edd17df8c\"\n- integrity sha512-xETjNmpBWYO1tYx2nBMq0I45UgydUJafZ4ft3szH3fQFjYWSBwjJjKsWxIhZSqX/IoTJzA0nNCdtbXoVEbSCLg==\n- dependencies:\n- \"@lion/core\" \"0.16.0\"\n-\n\"@lion/accordion@^0.7.2\":\nversion \"0.7.3\"\nresolved \"https://registry.yarnpkg.com/@lion/accordion/-/accordion-0.7.3.tgz#d0e498b4efa1f79e569208798b69d17d4435705a\"\ndependencies:\n\"@lion/core\" \"0.20.0\"\n-\"@lion/combobox@^0.5.1\":\n- version \"0.5.1\"\n- resolved \"https://registry.yarnpkg.com/@lion/combobox/-/combobox-0.5.1.tgz#6395d5c34f0935aee32034584a253c1a2c6fa717\"\n- integrity sha512-sOpJLCH8pzZAOohrqVnlTjC7L93tavXugSV2SqhVsFFnSQIWXytaeL8eJPlVBrTrmcOpns6AQX2uyBbeY6ZTsg==\n+\"@lion/combobox@^0.8.6\":\n+ version \"0.8.7\"\n+ resolved \"https://registry.yarnpkg.com/@lion/combobox/-/combobox-0.8.7.tgz#74414fddb317f8abb27409ce0cf1a6708ecd6d9d\"\n+ integrity sha512-1SfaqOW1zihuX3oXlLnawwC9m9MajZoKZ5Ow4KYCKKiBkAVGifDAHTDXz/ls3hyWICFn7/oYtqRpa7qbwZ0CXQ==\ndependencies:\n- \"@lion/core\" \"0.16.0\"\n- \"@lion/form-core\" \"0.11.0\"\n- \"@lion/listbox\" \"0.7.0\"\n- \"@lion/overlays\" \"0.26.1\"\n+ \"@lion/core\" \"0.20.0\"\n+ \"@lion/form-core\" \"0.15.5\"\n+ \"@lion/listbox\" \"0.11.0\"\n+ \"@lion/overlays\" \"0.30.0\"\n\"@lion/core@0.16.0\":\nversion \"0.16.0\"\nlit-element \"~2.4.0\"\nlit-html \"^1.3.0\"\n+\"@lion/core@0.19.0\", \"@lion/core@^0.19.0\":\n+ version \"0.19.0\"\n+ resolved \"https://registry.yarnpkg.com/@lion/core/-/core-0.19.0.tgz#4bf86059acd0ef3f74e6d0689250edc4d6664836\"\n+ integrity sha512-SU2JzKEgGdwOVK9WdsmjKiYkgQ/hOYC05jxyHfG9qJWmOzEUsuvvULjwU8hd1u7gLy5gSxsdEO2nJ2zyWV2ihg==\n+ dependencies:\n+ \"@open-wc/dedupe-mixin\" \"^1.3.0\"\n+ \"@open-wc/scoped-elements\" \"^2.0.1\"\n+ lit \"^2.0.2\"\n+\n\"@lion/core@0.20.0\":\nversion \"0.20.0\"\nresolved \"https://registry.yarnpkg.com/@lion/core/-/core-0.20.0.tgz#3982dc7a6ec5e742680b7453a684840358799759\"\n\"@open-wc/scoped-elements\" \"^2.0.1\"\nlit \"^2.0.2\"\n-\"@lion/form-core@0.11.0\":\n+\"@lion/form-core@0.15.4\":\n+ version \"0.15.4\"\n+ resolved \"https://registry.yarnpkg.com/@lion/form-core/-/form-core-0.15.4.tgz#e5fdc49199b9a491becf70370ab6de1407bc7a66\"\n+ integrity sha512-QkTl0c1BS2Egd2gTHTnfIfvvv3Ywkh1+6mDfEelIQOoptf84AFGw5OdVoMPqrAk0gYUkm8YvdpTZSzh3mMANiQ==\n+ dependencies:\n+ \"@lion/core\" \"0.19.0\"\n+ \"@lion/localize\" \"0.21.3\"\n+\n+\"@lion/form-core@0.15.5\":\n+ version \"0.15.5\"\n+ resolved \"https://registry.yarnpkg.com/@lion/form-core/-/form-core-0.15.5.tgz#af40dab6c7ca32187322b84a6319a277fcbd4617\"\n+ integrity sha512-SM27hqupHZ2eq4enaaX/dbIH6fTJYrISA378zZjCBPcYSDq39EXMgnzgGXWfZzi1DPEffbl2g6VKR+UGc8xRZg==\n+ dependencies:\n+ \"@lion/core\" \"0.20.0\"\n+ \"@lion/localize\" \"0.22.0\"\n+\n+\"@lion/listbox@0.11.0\":\nversion \"0.11.0\"\n- resolved \"https://registry.yarnpkg.com/@lion/form-core/-/form-core-0.11.0.tgz#83985baba62e11082b42ea84f3683f72a8f36fcf\"\n- integrity sha512-opDXzTtVHJlRo+BLSI0dtSjbIz7PsJL80wnU8WAK3S+WNH5z2S37OBCoVvOVpXRpoqGAj5L/BmaJnHZeo6pPYw==\n+ resolved \"https://registry.yarnpkg.com/@lion/listbox/-/listbox-0.11.0.tgz#f730714803f14a6d001a5e0c2cdff17146eccac7\"\n+ integrity sha512-nLwNZuARVcdT5+TNqph56+g1CnXMcRMjM0vzvSNgezGTZJ3b6onumgQwEXLGhxIbB16qFbfpaPZP7SaALfFsBA==\ndependencies:\n- \"@lion/core\" \"0.16.0\"\n- \"@lion/localize\" \"0.18.0\"\n+ \"@lion/core\" \"0.20.0\"\n+ \"@lion/form-core\" \"0.15.5\"\n-\"@lion/listbox@0.7.0\":\n- version \"0.7.0\"\n- resolved \"https://registry.yarnpkg.com/@lion/listbox/-/listbox-0.7.0.tgz#bd1d8cb25098387fd0ae1087f8dd641510f741f0\"\n- integrity sha512-wHGqahRIjpTmMAvU/hDZyDGNhmjRj6FEYSWn7Z3ugE52D9a1PQd7HVc1cVVIRc71jC3w4n5ZYVeZChwR3N3fWw==\n+\"@lion/listbox@^0.10.7\":\n+ version \"0.10.7\"\n+ resolved \"https://registry.yarnpkg.com/@lion/listbox/-/listbox-0.10.7.tgz#9af689615ea0964e4a5613c3e5b2df9b33fc2d54\"\n+ integrity sha512-hCVWnYsJv/det/+o5LHPd5w3f5mXiRE1q0ZVf+Hat5lvcHiHXfKnlrKaB2DzMqqL9y9k4ZG7feyQZlNE5PLNrQ==\ndependencies:\n- \"@lion/core\" \"0.16.0\"\n- \"@lion/form-core\" \"0.11.0\"\n+ \"@lion/core\" \"0.19.0\"\n+ \"@lion/form-core\" \"0.15.4\"\n-\"@lion/localize@0.18.0\":\n- version \"0.18.0\"\n- resolved \"https://registry.yarnpkg.com/@lion/localize/-/localize-0.18.0.tgz#beaf8c161feb58ecab670892c06e7b524527b7e8\"\n- integrity sha512-+adOGlot4IItOy1udLKflZlO2fTKM7R0Ji7iZ5SEVG80XOZxC3RXjVM7mWSd5wqcCUe51j1P/tgKM3vDLF0RAw==\n+\"@lion/localize@0.21.3\":\n+ version \"0.21.3\"\n+ resolved \"https://registry.yarnpkg.com/@lion/localize/-/localize-0.21.3.tgz#6ed63aa79d4a6df37536d8be8d03d11b855c32b6\"\n+ integrity sha512-BXFuKYYM+XABlULS8tLddj1TviRHK0Bm1AR6cOrdStv8vSrTK9szV63c5Ybl+kD6QstBSQ4qNwbjd3hAIJVGhQ==\ndependencies:\n\"@bundled-es-modules/message-format\" \"6.0.4\"\n- \"@lion/core\" \"0.16.0\"\n- singleton-manager \"1.4.1\"\n+ \"@lion/core\" \"0.19.0\"\n+ singleton-manager \"1.4.2\"\n-\"@lion/overlays@0.26.1\", \"@lion/overlays@^0.26.1\":\n+\"@lion/localize@0.22.0\":\n+ version \"0.22.0\"\n+ resolved \"https://registry.yarnpkg.com/@lion/localize/-/localize-0.22.0.tgz#88e0755b53c699231af0df0b4302de2197484bc0\"\n+ integrity sha512-75q3Xp/5A2v39mWHTaCZXc3L6nO3DD2vU5w/WPFusW6mzMJw3nzB4ot665UrjbY/HJwQV7Trjh9c/O79oh5x8Q==\n+ dependencies:\n+ \"@bundled-es-modules/message-format\" \"6.0.4\"\n+ \"@lion/core\" \"0.20.0\"\n+ singleton-manager \"1.4.3\"\n+\n+\"@lion/overlays@0.30.0\":\n+ version \"0.30.0\"\n+ resolved \"https://registry.yarnpkg.com/@lion/overlays/-/overlays-0.30.0.tgz#cd30c6ee8beda2ef977eb9b049cbac3549040c50\"\n+ integrity sha512-3P/VMCkzp6c0E8Nl6Mtvtqg/7J93JM3MEPi14WE9PWYQZcrtvcWSfLXCoI3Va1HoFfRuaAcN0DN0AO6Z71iFeg==\n+ dependencies:\n+ \"@lion/core\" \"0.20.0\"\n+ \"@popperjs/core\" \"^2.5.4\"\n+ singleton-manager \"1.4.3\"\n+\n+\"@lion/overlays@^0.26.1\":\nversion \"0.26.1\"\nresolved \"https://registry.yarnpkg.com/@lion/overlays/-/overlays-0.26.1.tgz#d1bfa4f5f97108982afa7b409ba4300f8b2d2ba5\"\nintegrity sha512-1FvphbR/yTQ1WtcB1gNuH772i9qAydQkI6NwibIw8QeOGXisA+6SChv2OHS7CijlpDJnDxNyX44LGdDM1/Pd8A==\nsemver \"^7.3.5\"\ntar \"^6.1.11\"\n-\"@mdjs/core@^0.7.1\":\n- version \"0.7.1\"\n- resolved \"https://registry.yarnpkg.com/@mdjs/core/-/core-0.7.1.tgz#115681f1f24d68c042c9765f16ead87aee3ec726\"\n- integrity sha512-iHIXl230X3c0lsWAE+MUtd6lKmARj2bsh2yfS3UBfWbZiX7rMrK5AAb9Yh+5/aXaBOg3Gm2dHSeiSueen3kEBg==\n- dependencies:\n- \"@mdjs/mdjs-preview\" \"^0.4.2\"\n- \"@mdjs/mdjs-story\" \"^0.2.0\"\n- \"@types/unist\" \"^2.0.3\"\n- es-module-lexer \"^0.3.26\"\n- github-markdown-css \"^4.0.0\"\n- plugins-manager \"^0.2.1\"\n- rehype-autolink-headings \"^5.0.1\"\n- rehype-prism-template \"^0.4.1\"\n- rehype-raw \"^5.0.0\"\n- rehype-slug \"^4.0.1\"\n- rehype-stringify \"^8.0.0\"\n- remark \"^13.0.0\"\n- remark-gfm \"^1.0.0\"\n- remark-parse \"^9.0.0\"\n- remark-rehype \"^8.0.0\"\n- unified \"^9.2.0\"\n- unist-util-remove \"^2.0.1\"\n- unist-util-visit \"^2.0.3\"\n-\n-\"@mdjs/core@^0.9.2\":\n+\"@mdjs/core@^0.9.0\", \"@mdjs/core@^0.9.2\":\nversion \"0.9.2\"\nresolved \"https://registry.yarnpkg.com/@mdjs/core/-/core-0.9.2.tgz#537923ba5cf5ef7c447a3923ca46906d050aa292\"\nintegrity sha512-FhqqJmRl2WRLWCjV84xfiUaEjVJ6Zantsw4CbUEc7TAEqxVHg65AUVkW39OOHctJqqb6CQeMd8lr1d3DvzA2MA==\nunist-util-remove \"^2.0.1\"\nunist-util-visit \"^2.0.3\"\n-\"@mdjs/mdjs-preview@^0.4.2\":\n- version \"0.4.2\"\n- resolved \"https://registry.yarnpkg.com/@mdjs/mdjs-preview/-/mdjs-preview-0.4.2.tgz#7a89fc5e542dcce766605613155569222fd3655f\"\n- integrity sha512-ZeQFfRGVgjvPKxo8DRWCO4wtwdBs2D4ModE2xFClnsUNttxQXDj/LL6Tx9ftMQIaM7ov3XzupR4sQSYgCPKQmw==\n- dependencies:\n- \"@lion/accordion\" \"^0.4.2\"\n- lit-element \"^2.4.0\"\n-\n\"@mdjs/mdjs-preview@^0.5.3\":\nversion \"0.5.6\"\nresolved \"https://registry.yarnpkg.com/@mdjs/mdjs-preview/-/mdjs-preview-0.5.6.tgz#837ac6274f818bfa025cecfb68e5cff8001f3ab3\"\n\"@open-wc/scoped-elements\" \"^2.0.0\"\nlit \"^2.0.0\"\n-\"@mdjs/mdjs-story@^0.2.0\":\n- version \"0.2.0\"\n- resolved \"https://registry.yarnpkg.com/@mdjs/mdjs-story/-/mdjs-story-0.2.0.tgz#f0a2030729e8b26868f0266c76da42988b23f9c2\"\n- integrity sha512-KgHOUNm4e/Il9+PsPY8RatpO2UJ2Gyxwse+dkZdu63LA+vKDxLehGEo9bFVYS86Z4TCGysdSy4Pxdl42rZdGNA==\n- dependencies:\n- lit-element \"^2.4.0\"\n-\n\"@mdjs/mdjs-story@^0.3.0\":\nversion \"0.3.1\"\nresolved \"https://registry.yarnpkg.com/@mdjs/mdjs-story/-/mdjs-story-0.3.1.tgz#cc19891962e06c8ecf0b0e40f191bcdae19bf910\"\n\"@open-wc/semantic-dom-diff\" \"^0.13.16\"\n\"@types/chai\" \"^4.1.7\"\n-\"@open-wc/scoped-elements@^1.3.2\", \"@open-wc/scoped-elements@^1.3.3\":\n+\"@open-wc/scoped-elements@^1.3.3\":\nversion \"1.3.3\"\nresolved \"https://registry.yarnpkg.com/@open-wc/scoped-elements/-/scoped-elements-1.3.3.tgz#fe008aef4d74fb00c553c900602960638fc1c7b0\"\nintegrity sha512-vFIQVYYjFw67odUE4JzZOpctnF7S/2DX+S+clrL3bQPql7HvEnV0wMFwOWUavQTuCJi0rfU8GTcNMiUybio+Yg==\nresolved \"https://registry.yarnpkg.com/@popperjs/core/-/core-2.9.2.tgz#adea7b6953cbb34651766b0548468e743c6a2353\"\nintegrity sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q==\n-\"@rocket/blog@^0.3.0\":\n- version \"0.3.0\"\n- resolved \"https://registry.yarnpkg.com/@rocket/blog/-/blog-0.3.0.tgz#769dd08523ec0a641de37407c9bf425afd38e483\"\n- integrity sha512-BiqhP6ai+D0+Lft5uqdKycfc4MzSJmfG+TIGG90vxH7cKvCsiOf7HN7zoVxf3SDgjVrs8nfxnqNBW6ONKQC/tg==\n+\"@rocket/blog@^0.4.0\":\n+ version \"0.4.0\"\n+ resolved \"https://registry.yarnpkg.com/@rocket/blog/-/blog-0.4.0.tgz#ec3fd9b3067f16acff1b4f25bce6aae71852532d\"\n+ integrity sha512-XNT44ZWkZ6/egs1yCUt9SkRQ/BpsqM2Pgk7HpfexezEvUvx6wKr1O4TEvuEQ9cjby9COouM29PHZHLiAq3lC9w==\ndependencies:\n- plugins-manager \"^0.2.0\"\n+ plugins-manager \"^0.3.0\"\n-\"@rocket/building-rollup@^0.3.0\":\n- version \"0.3.0\"\n- resolved \"https://registry.yarnpkg.com/@rocket/building-rollup/-/building-rollup-0.3.0.tgz#9c65eb3f7ab49544f568f4fc48ca3f51159a2ca0\"\n- integrity sha512-BseFJM+h2HN0IhWLoAIjMC2GW26Sg0eeYVpvT0x0PxrM+/wbkThug84/6f7/F+tFFM5TZb0/OdILGRrSaofXgw==\n+\"@rocket/building-rollup@^0.4.0\":\n+ version \"0.4.0\"\n+ resolved \"https://registry.yarnpkg.com/@rocket/building-rollup/-/building-rollup-0.4.0.tgz#cdf49e411aa8d0422dad1a6288971c8630a2f526\"\n+ integrity sha512-k9VFxtd3ClxNaaDItI0dtrfMBpA/2n3GODb3+EzToIu+ty6ziOZWGCf+YY+7dXzNN2rvYGra/0o8NXQoxqV48w==\ndependencies:\n\"@babel/core\" \"^7.12.10\"\n\"@babel/preset-env\" \"^7.12.11\"\n\"@rollup/plugin-babel\" \"^5.2.2\"\n\"@rollup/plugin-node-resolve\" \"^11.0.1\"\n\"@rollup/plugin-replace\" \"^2.4.2\"\n- \"@web/rollup-plugin-html\" \"^1.6.0\"\n+ \"@web/rollup-plugin-html\" \"^1.8.0\"\n\"@web/rollup-plugin-import-meta-assets\" \"^1.0.4\"\n\"@web/rollup-plugin-polyfills-loader\" \"^1.1.0\"\nbrowserslist \"^4.16.1\"\nworkbox-routing \"^6.1.5\"\nworkbox-strategies \"^6.1.5\"\n-\"@rocket/cli@^0.7.0\":\n- version \"0.7.0\"\n- resolved \"https://registry.yarnpkg.com/@rocket/cli/-/cli-0.7.0.tgz#66c45b13714ab5b2db1a0b0f10699e88d0cf16c8\"\n- integrity sha512-Rq21cUT3ExUZrN/4BcMtHdRSfdpg1uZDluj6WhOqJIYLH94O2djXoS+P9C7Arp9n6Cv1bh8RlhD7/gNBBlGWyA==\n+\"@rocket/cli@^0.10.1\":\n+ version \"0.10.1\"\n+ resolved \"https://registry.yarnpkg.com/@rocket/cli/-/cli-0.10.1.tgz#42b9f8c844978e40a2ef124fb121a4915537dadf\"\n+ integrity sha512-XwVQbSipr5fGMvs62iQ//7G16Ld4feLoE97tT4KrG2gmzqnfTqL+hZF5yp81n+HvyFX2vyR6AtgjagI2wNxg8g==\ndependencies:\n\"@11ty/eleventy\" \"^0.11.1\"\n- \"@11ty/eleventy-img\" \"^0.7.4\"\n- \"@rocket/building-rollup\" \"^0.3.0\"\n+ \"@11ty/eleventy-img\" \"^0.9.0\"\n+ \"@rocket/building-rollup\" \"^0.4.0\"\n\"@rocket/core\" \"^0.1.2\"\n- \"@rocket/eleventy-plugin-mdjs-unified\" \"^0.4.1\"\n+ \"@rocket/eleventy-plugin-mdjs-unified\" \"^0.6.0\"\n\"@rocket/eleventy-rocket-nav\" \"^0.3.0\"\n\"@rollup/plugin-babel\" \"^5.2.2\"\n\"@rollup/plugin-node-resolve\" \"^11.0.1\"\n\"@web/dev-server\" \"^0.1.4\"\n\"@web/dev-server-rollup\" \"^0.3.2\"\n\"@web/rollup-plugin-copy\" \"^0.2.0\"\n- check-html-links \"^0.2.2\"\n+ check-html-links \"^0.2.3\"\ncommand-line-args \"^5.1.1\"\ncommand-line-usage \"^6.1.1\"\nfs-extra \"^9.0.1\"\nmicromatch \"^4.0.2\"\n- plugins-manager \"^0.2.1\"\n+ plugins-manager \"^0.3.0\"\nslash \"^3.0.0\"\nutf8 \"^3.0.0\"\nworkbox-window \"^6.1.5\"\n\"@lion/overlays\" \"^0.26.1\"\nlit-element \"^2.4.0\"\n-\"@rocket/eleventy-plugin-mdjs-unified@^0.4.1\":\n- version \"0.4.1\"\n- resolved \"https://registry.yarnpkg.com/@rocket/eleventy-plugin-mdjs-unified/-/eleventy-plugin-mdjs-unified-0.4.1.tgz#c634656df110b3e44ad8f9ce4fbf410df5eff1cf\"\n- integrity sha512-XuxrQF8DiISVcx7TiEGzhsWKHrnYcMsJH7DUidWaAtIReTeWl5v9LvwgrSS8Z+UUsP5L0wbwjCgMjyH2Oi647g==\n+\"@rocket/eleventy-plugin-mdjs-unified@^0.6.0\":\n+ version \"0.6.0\"\n+ resolved \"https://registry.yarnpkg.com/@rocket/eleventy-plugin-mdjs-unified/-/eleventy-plugin-mdjs-unified-0.6.0.tgz#6872f9e66fcad97f52732adc3be7de8bdcbf4e10\"\n+ integrity sha512-apSI+o/rov6fAOHB2y/o3xJ5pssUYje5jayxbtq3lEmP8RfQNiFLAqQH244PA3sH0BLgO8PEQsz9P9t/zPL6SQ==\ndependencies:\n- \"@mdjs/core\" \"^0.7.1\"\n+ \"@mdjs/core\" \"^0.9.0\"\nes-module-lexer \"^0.3.26\"\nunist-util-visit \"^2.0.3\"\ndependency-graph \"^0.10.0\"\nsax-wasm \"^2.0.0\"\n-\"@rocket/launch@^0.4.2\":\n- version \"0.4.2\"\n- resolved \"https://registry.yarnpkg.com/@rocket/launch/-/launch-0.4.2.tgz#a3f175e7aa7e96ef5fa6d546e730cddd5d97d905\"\n- integrity sha512-8+oTpbrxfO+Z4Wdhyxo8ve9BSj/I0HBQCBFuJ48rJ1chzUN84EIR8fSEGnFXfL6Mwhu4wGDTwOzTXejRkttHng==\n+\"@rocket/launch@^0.6.0\":\n+ version \"0.6.0\"\n+ resolved \"https://registry.yarnpkg.com/@rocket/launch/-/launch-0.6.0.tgz#c6225c864df8e73be2e081a4aa687b2ec1cf2b5f\"\n+ integrity sha512-Utk0MrJe3a9eof71QRWhR/CPeKDnKji+iN3sDbkXQxlEU46hHDTuJ7M0PggfaKdskYNp5w1Y9tGzz/v27fFSOg==\ndependencies:\n\"@rocket/drawer\" \"^0.1.3\"\n\"@rocket/navigation\" \"^0.2.1\"\nresolved \"https://registry.yarnpkg.com/@rocket/navigation/-/navigation-0.2.1.tgz#ce9c22a6a3b1eafbf531880214d82dbaa9ffe192\"\nintegrity sha512-MNrMM8yssg39+vpqeWn3YnqwYMQ61iucAPvGBBdXRVP26Ay3xCEKL+iZvdq/sizx63i3G+BvLpvb8lrOz6542Q==\n-\"@rocket/search@^0.3.5\":\n- version \"0.3.5\"\n- resolved \"https://registry.yarnpkg.com/@rocket/search/-/search-0.3.5.tgz#b1f8fcb9545e94e2cc71e8509c16d8b0d86d6a3e\"\n- integrity sha512-brEV0SxZ3vW+8jJIrfERCFi0CN2DnP4FOQ4BoT8CxsKFBIiSJqht/3I3ImCJXYGcXl8xP4jNQo+GyRr5rdpxgQ==\n+\"@rocket/search@^0.5.1\":\n+ version \"0.5.1\"\n+ resolved \"https://registry.yarnpkg.com/@rocket/search/-/search-0.5.1.tgz#5112dd52fc363d0b3ef7a64e75d6b34eb10f1fea\"\n+ integrity sha512-qopmhb8EqdhQgfI010zIHgtqQIK8PY16qqzDdO0XCYhKco2eOQPoTxzMmg9ADrbt/1itGfKwmYwTtXfKLzUkbw==\ndependencies:\n- \"@lion/combobox\" \"^0.5.1\"\n- \"@open-wc/scoped-elements\" \"^1.3.2\"\n+ \"@lion/combobox\" \"^0.8.6\"\n+ \"@lion/core\" \"^0.19.0\"\n+ \"@lion/listbox\" \"^0.10.7\"\n+ \"@open-wc/scoped-elements\" \"^2.0.0\"\nchalk \"^4.0.0\"\nminisearch \"^3.0.2\"\n- plugins-manager \"^0.2.1\"\n+ plugins-manager \"^0.3.0\"\nsax-wasm \"^2.0.0\"\n\"@rollup/plugin-babel@^5.1.0\", \"@rollup/plugin-babel@^5.2.0\", \"@rollup/plugin-babel@^5.2.2\":\nresolved \"https://registry.yarnpkg.com/@types/parse5/-/parse5-5.0.3.tgz#e7b5aebbac150f8b5fdd4a46e7f0bd8e65e19109\"\nintegrity sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw==\n+\"@types/parse5@^6.0.1\":\n+ version \"6.0.3\"\n+ resolved \"https://registry.yarnpkg.com/@types/parse5/-/parse5-6.0.3.tgz#705bb349e789efa06f43f128cef51240753424cb\"\n+ integrity sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==\n+\n\"@types/picomatch@^2.2.2\":\nversion \"2.2.2\"\nresolved \"https://registry.yarnpkg.com/@types/picomatch/-/picomatch-2.2.2.tgz#e0022f77aa64475ff20326e9ff9728aaae191503\"\n\"@types/parse5\" \"^5.0.3\"\nparse5 \"^6.0.1\"\n+\"@web/parse5-utils@^1.3.0\":\n+ version \"1.3.0\"\n+ resolved \"https://registry.yarnpkg.com/@web/parse5-utils/-/parse5-utils-1.3.0.tgz#e2e9e98b31a4ca948309f74891bda8d77399f6bd\"\n+ integrity sha512-Pgkx3ECc8EgXSlS5EyrgzSOoUbM6P8OKS471HLAyvOBcP1NCBn0to4RN/OaKASGq8qa3j+lPX9H14uA5AHEnQg==\n+ dependencies:\n+ \"@types/parse5\" \"^6.0.1\"\n+ parse5 \"^6.0.1\"\n+\n\"@web/polyfills-loader@^1.1.0\":\nversion \"1.1.0\"\nresolved \"https://registry.yarnpkg.com/@web/polyfills-loader/-/polyfills-loader-1.1.0.tgz#9df3da3d40159fce55c17cc370750052f62798bd\"\ndependencies:\nglob \"^7.0.0\"\n-\"@web/rollup-plugin-html@^1.3.2\", \"@web/rollup-plugin-html@^1.6.0\":\n+\"@web/rollup-plugin-html@^1.3.2\":\nversion \"1.6.0\"\nresolved \"https://registry.yarnpkg.com/@web/rollup-plugin-html/-/rollup-plugin-html-1.6.0.tgz#fd3f406fd6d74a0cded581953a3146fe9f0454ad\"\nintegrity sha512-m5xDI6ZhdAI2nfHwU3NXJ/dcDWghR+g/RrlAtIWYlj8NvXk/ZNqVVK1NbJrI/e5RlgDQ/+OycjmKgyAP9W1tWA==\nhtml-minifier-terser \"^5.1.1\"\nparse5 \"^6.0.1\"\n+\"@web/rollup-plugin-html@^1.8.0\":\n+ version \"1.10.1\"\n+ resolved \"https://registry.yarnpkg.com/@web/rollup-plugin-html/-/rollup-plugin-html-1.10.1.tgz#7995d3aff436f6b5c1a365830a9ff525388b40d8\"\n+ integrity sha512-XYJxHtdllwA5l4X8wh8CailrOykOl3YY+BRqO8+wS/I1Kq0JFISg3EUHdWAyVcw0TRDnHNLbOBJTm2ptAM+eog==\n+ dependencies:\n+ \"@web/parse5-utils\" \"^1.3.0\"\n+ glob \"^7.1.6\"\n+ html-minifier-terser \"^6.0.0\"\n+ parse5 \"^6.0.1\"\n+\n\"@web/rollup-plugin-import-meta-assets@^1.0.4\", \"@web/rollup-plugin-import-meta-assets@^1.0.6\":\nversion \"1.0.6\"\nresolved \"https://registry.yarnpkg.com/@web/rollup-plugin-import-meta-assets/-/rollup-plugin-import-meta-assets-1.0.6.tgz#980235623eb6842bb5d6453c3e25b5c9bb19714d\"\n@@ -4531,7 +4553,7 @@ acorn@^7.4.0:\nresolved \"https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa\"\nintegrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==\n-acorn@^8.4.1, acorn@^8.6.0:\n+acorn@^8.4.1, acorn@^8.5.0, acorn@^8.6.0:\nversion \"8.7.0\"\nresolved \"https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf\"\nintegrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==\n@@ -4876,11 +4898,6 @@ array-flatten@1.1.1:\nresolved \"https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2\"\nintegrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=\n-array-flatten@^3.0.0:\n- version \"3.0.0\"\n- resolved \"https://registry.yarnpkg.com/array-flatten/-/array-flatten-3.0.0.tgz#6428ca2ee52c7b823192ec600fa3ed2f157cd541\"\n- integrity sha512-zPMVc3ZYlGLNk4mpK1NzP2wg0ml9t7fUgDsayR5Y5rSzxQilzR9FGu/EH2jQOcKSAeAfWeylyW8juy3OkWRvNA==\n-\narray-includes@^3.1.1:\nversion \"3.1.3\"\nresolved \"https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.3.tgz#c7f619b382ad2afaf5326cddfdc0afc61af7690a\"\n@@ -5628,7 +5645,7 @@ callsites@^3.0.0:\nresolved \"https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73\"\nintegrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==\n-camel-case@^4.1.1:\n+camel-case@^4.1.1, camel-case@^4.1.2:\nversion \"4.1.2\"\nresolved \"https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a\"\nintegrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==\n@@ -5824,16 +5841,17 @@ check-error@^1.0.2:\nresolved \"https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82\"\nintegrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=\n-check-html-links@^0.2.2:\n- version \"0.2.2\"\n- resolved \"https://registry.yarnpkg.com/check-html-links/-/check-html-links-0.2.2.tgz#3f1ddbe766910327a337f67f7bad3dd9e014fa0d\"\n- integrity sha512-F3BRswT6qrx7Qi+pphkSZ8H3va/hdbiYxZIYeEnlFXMvAXRzRqzL/W5vp1zjD8Y93wd5HcE15MiYhQ7bF0MnUA==\n+check-html-links@^0.2.3:\n+ version \"0.2.3\"\n+ resolved \"https://registry.yarnpkg.com/check-html-links/-/check-html-links-0.2.3.tgz#2696d15962710a0efb09a2726a21d13c627656cd\"\n+ integrity sha512-0FkIG6AQm7e9ac5ZlsaSr5Sjb+LIRyMMami9/MtyA4ZAR7Ph20Ke3Ubg6taqXkxArGCC+qrL6lUf6DSW8OzXQg==\ndependencies:\nchalk \"^4.0.0\"\ncommand-line-args \"^5.1.1\"\nglob \"^7.0.0\"\nminimatch \"^3.0.4\"\nsax-wasm \"^2.0.0\"\n+ slash \"^3.0.0\"\ncheerio-select@^1.3.0:\nversion \"1.4.0\"\n@@ -5920,6 +5938,13 @@ clean-css@^4.1.11, clean-css@^4.2.1, clean-css@^4.2.3:\ndependencies:\nsource-map \"~0.6.0\"\n+clean-css@^5.2.2:\n+ version \"5.2.4\"\n+ resolved \"https://registry.yarnpkg.com/clean-css/-/clean-css-5.2.4.tgz#982b058f8581adb2ae062520808fb2429bd487a4\"\n+ integrity sha512-nKseG8wCzEuji/4yrgM/5cthL9oTDc5UOQyFMvW/Q53oP6gLH690o1NbuTh6Y18nujr7BxlsFuS7gXLnLzKJGg==\n+ dependencies:\n+ source-map \"~0.6.0\"\n+\nclean-deep@^3.0.2:\nversion \"3.4.0\"\nresolved \"https://registry.yarnpkg.com/clean-deep/-/clean-deep-3.4.0.tgz#c465c4de1003ae13a1a859e6c69366ab96069f75\"\n@@ -6768,13 +6793,6 @@ decompress-response@^5.0.0:\ndependencies:\nmimic-response \"^2.0.0\"\n-decompress-response@^6.0.0:\n- version \"6.0.0\"\n- resolved \"https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc\"\n- integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==\n- dependencies:\n- mimic-response \"^3.1.0\"\n-\ndecompress-tar@^4.0.0, decompress-tar@^4.1.0, decompress-tar@^4.1.1:\nversion \"4.1.1\"\nresolved \"https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-4.1.1.tgz#718cbd3fcb16209716e70a26b84e7ba4592e5af1\"\n@@ -9189,6 +9207,19 @@ html-minifier-terser@^5.0.0, html-minifier-terser@^5.1.1:\nrelateurl \"^0.2.7\"\nterser \"^4.6.3\"\n+html-minifier-terser@^6.0.0:\n+ version \"6.1.0\"\n+ resolved \"https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#bfc818934cc07918f6b3669f5774ecdfd48f32ab\"\n+ integrity sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==\n+ dependencies:\n+ camel-case \"^4.1.2\"\n+ clean-css \"^5.2.2\"\n+ commander \"^8.3.0\"\n+ he \"^1.2.0\"\n+ param-case \"^3.0.4\"\n+ relateurl \"^0.2.7\"\n+ terser \"^5.10.0\"\n+\nhtml-void-elements@^1.0.0:\nversion \"1.0.5\"\nresolved \"https://registry.yarnpkg.com/html-void-elements/-/html-void-elements-1.0.5.tgz#ce9159494e86d95e45795b166c2021c2cfca4483\"\n@@ -11444,11 +11475,6 @@ mimic-response@^2.0.0, mimic-response@^2.1.0:\nresolved \"https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43\"\nintegrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==\n-mimic-response@^3.1.0:\n- version \"3.1.0\"\n- resolved \"https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9\"\n- integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==\n-\nmin-indent@^1.0.0:\nversion \"1.0.1\"\nresolved \"https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869\"\n@@ -11914,10 +11940,10 @@ node-abi@^2.21.0:\ndependencies:\nsemver \"^5.4.1\"\n-node-addon-api@^3.1.0:\n- version \"3.1.0\"\n- resolved \"https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.1.0.tgz#98b21931557466c6729e51cb77cd39c965f42239\"\n- integrity sha512-flmrDNB06LIl5lywUz7YlNGZH/5p0M7W28k8hzd9Lshtdh1wshD2Y+U4h9LD6KObOy1f+fEVdgprPrEymjM5uw==\n+node-addon-api@^3.2.0:\n+ version \"3.2.1\"\n+ resolved \"https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161\"\n+ integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==\nnode-fetch@^2.3.0, node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.5, node-fetch@^2.6.7:\nversion \"2.6.7\"\n@@ -11984,11 +12010,6 @@ noms@0.0.0:\ninherits \"^2.0.1\"\nreadable-stream \"~1.0.31\"\n-noop-logger@^0.1.1:\n- version \"0.1.1\"\n- resolved \"https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2\"\n- integrity sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=\n-\nnoop2@^2.0.0:\nversion \"2.0.0\"\nresolved \"https://registry.yarnpkg.com/noop2/-/noop2-2.0.0.tgz#4b636015e9882b54783c02b412f699d8c5cd0a5b\"\n@@ -12105,7 +12126,7 @@ npm-run-path@^4.0.0, npm-run-path@^4.0.1:\ndependencies:\npath-key \"^3.0.0\"\n-npmlog@^4.0.1, npmlog@^4.0.2, npmlog@^4.1.2:\n+npmlog@^4.0.1, npmlog@^4.0.2:\nversion \"4.1.2\"\nresolved \"https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b\"\nintegrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==\n@@ -12559,7 +12580,7 @@ parallel-transform@^1.2.0:\ninherits \"^2.0.3\"\nreadable-stream \"^2.1.5\"\n-param-case@^3.0.3:\n+param-case@^3.0.3, param-case@^3.0.4:\nversion \"3.0.4\"\nresolved \"https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5\"\nintegrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==\n@@ -12900,11 +12921,6 @@ please-upgrade-node@^3.2.0:\ndependencies:\nsemver-compare \"^1.0.0\"\n-plugins-manager@^0.2.0, plugins-manager@^0.2.1:\n- version \"0.2.1\"\n- resolved \"https://registry.yarnpkg.com/plugins-manager/-/plugins-manager-0.2.1.tgz#fe42857f9dd9326eccdeb2e112f5f4e7fe9f261d\"\n- integrity sha512-ir2R5Jt1XH9/oFKEiyOhRFoGfFEToru8NinhebaBMm1iZdaL51k0hubjuVKPqMkA+T3FguB7FFd+x3iKSWOvAg==\n-\nplugins-manager@^0.3.0:\nversion \"0.3.0\"\nresolved \"https://registry.yarnpkg.com/plugins-manager/-/plugins-manager-0.3.0.tgz#70a21798c7a9016be790eddccf13675bb8f0c037\"\n@@ -12955,10 +12971,10 @@ postcss@^8.1.7:\npicocolors \"^1.0.0\"\nsource-map-js \"^1.0.1\"\n-prebuild-install@^6.0.1:\n- version \"6.1.1\"\n- resolved \"https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.1.tgz#6754fa6c0d55eced7f9e14408ff9e4cba6f097b4\"\n- integrity sha512-M+cKwofFlHa5VpTWub7GLg5RLcunYIcLqtY5pKcls/u7xaAb8FrXZ520qY8rkpYy5xw90tYCyMO0MP5ggzR3Sw==\n+prebuild-install@^6.1.2:\n+ version \"6.1.4\"\n+ resolved \"https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.4.tgz#ae3c0142ad611d58570b89af4986088a4937e00f\"\n+ integrity sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==\ndependencies:\ndetect-libc \"^1.0.3\"\nexpand-template \"^2.0.3\"\n@@ -12967,7 +12983,6 @@ prebuild-install@^6.0.1:\nmkdirp-classic \"^0.5.3\"\nnapi-build-utils \"^1.0.1\"\nnode-abi \"^2.21.0\"\n- noop-logger \"^0.1.1\"\nnpmlog \"^4.0.1\"\npump \"^3.0.0\"\nrc \"^1.2.7\"\n@@ -14398,19 +14413,17 @@ shady-css-scoped-element@^0.0.2:\nresolved \"https://registry.yarnpkg.com/shady-css-scoped-element/-/shady-css-scoped-element-0.0.2.tgz#c538fcfe2317e979cd02dfec533898b95b4ea8fe\"\nintegrity sha512-Dqfl70x6JiwYDujd33ZTbtCK0t52E7+H2swdWQNSTzfsolSa6LJHnTpN4T9OpJJEq4bxuzHRLFO9RBcy/UfrMQ==\n-sharp@^0.27.0:\n- version \"0.27.2\"\n- resolved \"https://registry.yarnpkg.com/sharp/-/sharp-0.27.2.tgz#a939775e630e88600c0b5e68f20593aea722252f\"\n- integrity sha512-w3FVoONPG/x5MXCc3wsjOS+b9h3CI60qkus6EPQU4dkT0BDm0PyGhDCK6KhtfT3/vbeOMOXAKFNSw+I3QGWkMA==\n+sharp@^0.28.2:\n+ version \"0.28.3\"\n+ resolved \"https://registry.yarnpkg.com/sharp/-/sharp-0.28.3.tgz#ecd74cefd020bee4891bb137c9850ee2ce277a8b\"\n+ integrity sha512-21GEP45Rmr7q2qcmdnjDkNP04Ooh5v0laGS5FDpojOO84D1DJwUijLiSq8XNNM6e8aGXYtoYRh3sVNdm8NodMA==\ndependencies:\n- array-flatten \"^3.0.0\"\ncolor \"^3.1.3\"\ndetect-libc \"^1.0.3\"\n- node-addon-api \"^3.1.0\"\n- npmlog \"^4.1.2\"\n- prebuild-install \"^6.0.1\"\n- semver \"^7.3.4\"\n- simple-get \"^4.0.0\"\n+ node-addon-api \"^3.2.0\"\n+ prebuild-install \"^6.1.2\"\n+ semver \"^7.3.5\"\n+ simple-get \"^3.1.0\"\ntar-fs \"^2.1.1\"\ntunnel-agent \"^0.6.0\"\n@@ -14483,12 +14496,12 @@ simple-get@^3.0.3:\nonce \"^1.3.1\"\nsimple-concat \"^1.0.0\"\n-simple-get@^4.0.0:\n- version \"4.0.0\"\n- resolved \"https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.0.tgz#73fa628278d21de83dadd5512d2cc1f4872bd675\"\n- integrity sha512-ZalZGexYr3TA0SwySsr5HlgOOinS4Jsa8YB2GJ6lUNAazyAu4KG/VmzMTwAt2YVXzzVj8QmefmAonZIK2BSGcQ==\n+simple-get@^3.1.0:\n+ version \"3.1.1\"\n+ resolved \"https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.1.tgz#cc7ba77cfbe761036fbfce3d021af25fc5584d55\"\n+ integrity sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==\ndependencies:\n- decompress-response \"^6.0.0\"\n+ decompress-response \"^4.2.0\"\nonce \"^1.3.1\"\nsimple-concat \"^1.0.0\"\n@@ -14504,6 +14517,16 @@ singleton-manager@1.4.1:\nresolved \"https://registry.yarnpkg.com/singleton-manager/-/singleton-manager-1.4.1.tgz#0a9cd1db2b26e5cbc4ecdc20d5a16f284b36aabb\"\nintegrity sha512-HOvKT/WcHvl2cLYGqmO6MaC2J4wAA82LntGwtLn6avnTq15UDLCnSRVXedmglVooLbQGVsQJ+dQz2sKz+2GUZA==\n+singleton-manager@1.4.2:\n+ version \"1.4.2\"\n+ resolved \"https://registry.yarnpkg.com/singleton-manager/-/singleton-manager-1.4.2.tgz#4649acafca3eccf987d828ab16369ee59c4a22a5\"\n+ integrity sha512-3/K7K61TiN0+tw32HRC3AZQBacN0Ky/NmHEnhofFPEFROqZ5T6BXK45Z94OQsvuFD2euOVOU40XDNeTal63Baw==\n+\n+singleton-manager@1.4.3:\n+ version \"1.4.3\"\n+ resolved \"https://registry.yarnpkg.com/singleton-manager/-/singleton-manager-1.4.3.tgz#bdfd71e3b8c99ee8a0d9086496a795c84f886d0e\"\n+ integrity sha512-Jy1Ib9cO9xCQ6UZ/vyFOqqWMnSpfZ8/Sc2vme944aWsCLO+lMPiFG9kGZGpyiRT9maYeI0JyZH1CGgjmkSN8VA==\n+\nsinon-chai@^3.6.0:\nversion \"3.6.0\"\nresolved \"https://registry.yarnpkg.com/sinon-chai/-/sinon-chai-3.6.0.tgz#25bd59a37ef8990245e085a40f1f79d6bf023b7a\"\n@@ -14702,7 +14725,7 @@ source-map-resolve@^0.5.0:\nsource-map-url \"^0.4.0\"\nurix \"^0.1.0\"\n-source-map-support@^0.5.19:\n+source-map-support@^0.5.19, source-map-support@~0.5.20:\nversion \"0.5.21\"\nresolved \"https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f\"\nintegrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==\n@@ -15376,6 +15399,16 @@ terser@^5.0.0, terser@^5.5.1:\nsource-map \"~0.7.2\"\nsource-map-support \"~0.5.19\"\n+terser@^5.10.0:\n+ version \"5.11.0\"\n+ resolved \"https://registry.yarnpkg.com/terser/-/terser-5.11.0.tgz#2da5506c02e12cd8799947f30ce9c5b760be000f\"\n+ integrity sha512-uCA9DLanzzWSsN1UirKwylhhRz3aKPInlfmpGfw8VN6jHsAtu8HJtIpeeHHK23rxnE/cDc+yvmq5wqkIC6Kn0A==\n+ dependencies:\n+ acorn \"^8.5.0\"\n+ commander \"^2.20.0\"\n+ source-map \"~0.7.2\"\n+ source-map-support \"~0.5.20\"\n+\ntext-hex@1.0.x:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5\"\n",
"new_path": "yarn.lock",
"old_path": "yarn.lock"
}
] |
JavaScript
|
MIT License
|
open-wc/open-wc
|
chore: update rocket to latest stable version
| 1
|
chore
| null |
756,064
|
24.02.2022 20:21:29
| 28,800
|
5a20a2a1656af2f90adfa010f6f8c508fddd3dab
|
fix(swingset-runner): update tests copied from zoe
|
[
{
"change_type": "MODIFY",
"diff": "@@ -8,11 +8,9 @@ export function buildRootObject(vatPowers, vatParameters) {\nreturn Far('root', {\nbuildZoe: vatAdminSvc => {\nconst shutdownZoeVat = vatPowers.exitVatWithFailure;\n- const { zoeService: zoe } = makeZoeKit(\n- vatAdminSvc,\n- shutdownZoeVat,\n- vatParameters.zcfBundleName,\n- );\n+ const { zoeService: zoe } = makeZoeKit(vatAdminSvc, shutdownZoeVat, {\n+ name: vatParameters.zcfBundleName,\n+ });\nreturn zoe;\n},\n});\n",
"new_path": "packages/swingset-runner/demo/exchangeBenchmark/vat-zoe.js",
"old_path": "packages/swingset-runner/demo/exchangeBenchmark/vat-zoe.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -8,11 +8,9 @@ export function buildRootObject(vatPowers, vatParameters) {\nreturn Far('root', {\nbuildZoe: vatAdminSvc => {\nconst shutdownZoeVat = vatPowers.exitVatWithFailure;\n- const { zoeService: zoe } = makeZoeKit(\n- vatAdminSvc,\n- shutdownZoeVat,\n- vatParameters.zcfBundleName,\n- );\n+ const { zoeService: zoe } = makeZoeKit(vatAdminSvc, shutdownZoeVat, {\n+ name: vatParameters.zcfBundleName,\n+ });\nreturn zoe;\n},\n});\n",
"new_path": "packages/swingset-runner/demo/swapBenchmark/vat-zoe.js",
"old_path": "packages/swingset-runner/demo/swapBenchmark/vat-zoe.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -8,11 +8,9 @@ export function buildRootObject(vatPowers, vatParameters) {\nreturn Far('root', {\nbuildZoe: vatAdminSvc => {\nconst shutdownZoeVat = vatPowers.exitVatWithFailure;\n- const { zoeService: zoe } = makeZoeKit(\n- vatAdminSvc,\n- shutdownZoeVat,\n- vatParameters.zcfBundleName,\n- );\n+ const { zoeService: zoe } = makeZoeKit(vatAdminSvc, shutdownZoeVat, {\n+ name: vatParameters.zcfBundleName,\n+ });\nreturn zoe;\n},\n});\n",
"new_path": "packages/swingset-runner/demo/zoeTests/vat-zoe.js",
"old_path": "packages/swingset-runner/demo/zoeTests/vat-zoe.js"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
fix(swingset-runner): update tests copied from zoe
| 1
|
fix
|
swingset-runner
|
104,828
|
24.02.2022 20:55:19
| -3,600
|
ab391530958cd345d2a48f1f583af429233eb04d
|
docs(table): update story name
|
[
{
"change_type": "MODIFY",
"diff": "@@ -432,7 +432,7 @@ WithSorting.parameters = {\n},\n};\n-export const WithSearch = () => {\n+export const WithSearching = () => {\nconst { selectedTableType, hasSearch, hasFastSearch, searchFieldDefaultExpanded } = getTableKnobs(\n{\nknobsToCreate: [\n@@ -479,8 +479,8 @@ export const WithSearch = () => {\n);\n};\n-WithSearch.storyName = 'With search';\n-WithSearch.parameters = {\n+WithSearching.storyName = 'With searching';\n+WithSearching.parameters = {\ncomponent: Table,\ndocs: {\npage: SearchingREADME,\n",
"new_path": "packages/react/src/components/Table/Table.main.story.jsx",
"old_path": "packages/react/src/components/Table/Table.main.story.jsx"
}
] |
JavaScript
|
Apache License 2.0
|
carbon-design-system/carbon-addons-iot-react
|
docs(table): update story name
| 1
|
docs
|
table
|
71,419
|
24.02.2022 21:24:03
| 18,000
|
4a44a65bb4634081e04811966d5f4e2fd49bc7c6
|
fix(dynamodb): `grant*Data()` methods are missing the `dynamodb:DescribeTable` permission
Fixes
This allows the high level dynamodb clients to function correctly
*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": "\"dynamodb:BatchWriteItem\",\n\"dynamodb:PutItem\",\n\"dynamodb:UpdateItem\",\n- \"dynamodb:DeleteItem\"\n+ \"dynamodb:DeleteItem\",\n+ \"dynamodb:DescribeTable\"\n],\n\"Effect\": \"Allow\",\n\"Resource\": [\n",
"new_path": "packages/@aws-cdk-containers/ecs-service-extensions/test/integ.assign-public-ip.expected.json",
"old_path": "packages/@aws-cdk-containers/ecs-service-extensions/test/integ.assign-public-ip.expected.json"
},
{
"change_type": "MODIFY",
"diff": "\"dynamodb:BatchWriteItem\",\n\"dynamodb:PutItem\",\n\"dynamodb:UpdateItem\",\n- \"dynamodb:DeleteItem\"\n+ \"dynamodb:DeleteItem\",\n+ \"dynamodb:DescribeTable\"\n],\n\"Effect\": \"Allow\",\n\"Resource\": [\n",
"new_path": "packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json",
"old_path": "packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json"
},
{
"change_type": "MODIFY",
"diff": "\"dynamodb:BatchWriteItem\",\n\"dynamodb:PutItem\",\n\"dynamodb:UpdateItem\",\n- \"dynamodb:DeleteItem\"\n+ \"dynamodb:DeleteItem\",\n+ \"dynamodb:DescribeTable\"\n],\n\"Effect\": \"Allow\",\n\"Resource\": [\n",
"new_path": "packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.expected.json",
"old_path": "packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.expected.json"
},
{
"change_type": "MODIFY",
"diff": "\"dynamodb:BatchWriteItem\",\n\"dynamodb:PutItem\",\n\"dynamodb:UpdateItem\",\n- \"dynamodb:DeleteItem\"\n+ \"dynamodb:DeleteItem\",\n+ \"dynamodb:DescribeTable\"\n],\n\"Effect\": \"Allow\",\n\"Resource\": [\n",
"new_path": "packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.expected.json",
"old_path": "packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.expected.json"
},
{
"change_type": "MODIFY",
"diff": "\"dynamodb:BatchWriteItem\",\n\"dynamodb:PutItem\",\n\"dynamodb:UpdateItem\",\n- \"dynamodb:DeleteItem\"\n+ \"dynamodb:DeleteItem\",\n+ \"dynamodb:DescribeTable\"\n],\n\"Effect\": \"Allow\",\n\"Resource\": [\n",
"new_path": "packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json",
"old_path": "packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json"
},
{
"change_type": "MODIFY",
"diff": "\"dynamodb:BatchWriteItem\",\n\"dynamodb:PutItem\",\n\"dynamodb:UpdateItem\",\n- \"dynamodb:DeleteItem\"\n+ \"dynamodb:DeleteItem\",\n+ \"dynamodb:DescribeTable\"\n],\n\"Effect\": \"Allow\",\n\"Resource\": [\n\"dynamodb:BatchWriteItem\",\n\"dynamodb:PutItem\",\n\"dynamodb:UpdateItem\",\n- \"dynamodb:DeleteItem\"\n+ \"dynamodb:DeleteItem\",\n+ \"dynamodb:DescribeTable\"\n],\n\"Effect\": \"Allow\",\n\"Resource\": [\n\"dynamodb:BatchWriteItem\",\n\"dynamodb:PutItem\",\n\"dynamodb:UpdateItem\",\n- \"dynamodb:DeleteItem\"\n+ \"dynamodb:DeleteItem\",\n+ \"dynamodb:DescribeTable\"\n],\n\"Effect\": \"Allow\",\n\"Resource\": [\n",
"new_path": "packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json",
"old_path": "packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -29,3 +29,5 @@ export const READ_STREAM_DATA_ACTIONS = [\n'dynamodb:GetRecords',\n'dynamodb:GetShardIterator',\n];\n+\n+export const DESCRIBE_TABLE = 'dynamodb:DescribeTable';\n\\ No newline at end of file\n",
"new_path": "packages/@aws-cdk/aws-dynamodb/lib/perms.ts",
"old_path": "packages/@aws-cdk/aws-dynamodb/lib/perms.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -679,7 +679,7 @@ abstract class TableBase extends Resource implements ITable {\n/**\n* Permits an IAM principal all data read operations from this table:\n- * BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan.\n+ * BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan, DescribeTable.\n*\n* Appropriate grants will also be added to the customer-managed KMS key\n* if one was configured.\n@@ -687,7 +687,8 @@ abstract class TableBase extends Resource implements ITable {\n* @param grantee The principal to grant access to\n*/\npublic grantReadData(grantee: iam.IGrantable): iam.Grant {\n- return this.combinedGrant(grantee, { keyActions: perms.KEY_READ_ACTIONS, tableActions: perms.READ_DATA_ACTIONS });\n+ const tableActions = perms.READ_DATA_ACTIONS.concat(perms.DESCRIBE_TABLE);\n+ return this.combinedGrant(grantee, { keyActions: perms.KEY_READ_ACTIONS, tableActions });\n}\n/**\n@@ -724,7 +725,7 @@ abstract class TableBase extends Resource implements ITable {\n/**\n* Permits an IAM principal all data write operations to this table:\n- * BatchWriteItem, PutItem, UpdateItem, DeleteItem.\n+ * BatchWriteItem, PutItem, UpdateItem, DeleteItem, DescribeTable.\n*\n* Appropriate grants will also be added to the customer-managed KMS key\n* if one was configured.\n@@ -732,14 +733,15 @@ abstract class TableBase extends Resource implements ITable {\n* @param grantee The principal to grant access to\n*/\npublic grantWriteData(grantee: iam.IGrantable): iam.Grant {\n+ const tableActions = perms.WRITE_DATA_ACTIONS.concat(perms.DESCRIBE_TABLE);\nconst keyActions = perms.KEY_READ_ACTIONS.concat(perms.KEY_WRITE_ACTIONS);\n- return this.combinedGrant(grantee, { keyActions, tableActions: perms.WRITE_DATA_ACTIONS });\n+ return this.combinedGrant(grantee, { keyActions, tableActions });\n}\n/**\n* Permits an IAM principal to all data read/write operations to this table.\n* BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan,\n- * BatchWriteItem, PutItem, UpdateItem, DeleteItem\n+ * BatchWriteItem, PutItem, UpdateItem, DeleteItem, DescribeTable\n*\n* Appropriate grants will also be added to the customer-managed KMS key\n* if one was configured.\n@@ -747,7 +749,7 @@ abstract class TableBase extends Resource implements ITable {\n* @param grantee The principal to grant access to\n*/\npublic grantReadWriteData(grantee: iam.IGrantable): iam.Grant {\n- const tableActions = perms.READ_DATA_ACTIONS.concat(perms.WRITE_DATA_ACTIONS);\n+ const tableActions = perms.READ_DATA_ACTIONS.concat(perms.WRITE_DATA_ACTIONS).concat(perms.DESCRIBE_TABLE);\nconst keyActions = perms.KEY_READ_ACTIONS.concat(perms.KEY_WRITE_ACTIONS);\nreturn this.combinedGrant(grantee, { keyActions, tableActions });\n}\n",
"new_path": "packages/@aws-cdk/aws-dynamodb/lib/table.ts",
"old_path": "packages/@aws-cdk/aws-dynamodb/lib/table.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -643,6 +643,7 @@ testLegacyBehavior('if an encryption key is included, encrypt/decrypt permission\n'dynamodb:PutItem',\n'dynamodb:UpdateItem',\n'dynamodb:DeleteItem',\n+ 'dynamodb:DescribeTable',\n],\nEffect: 'Allow',\nResource: [\n@@ -1919,18 +1920,18 @@ describe('grants', () => {\ntest('\"grantReadData\" allows the principal to read data from the table', () => {\ntestGrant(\n- ['BatchGetItem', 'GetRecords', 'GetShardIterator', 'Query', 'GetItem', 'Scan', 'ConditionCheckItem'], (p, t) => t.grantReadData(p));\n+ ['BatchGetItem', 'GetRecords', 'GetShardIterator', 'Query', 'GetItem', 'Scan', 'ConditionCheckItem', 'DescribeTable'], (p, t) => t.grantReadData(p));\n});\ntest('\"grantWriteData\" allows the principal to write data to the table', () => {\ntestGrant(\n- ['BatchWriteItem', 'PutItem', 'UpdateItem', 'DeleteItem'], (p, t) => t.grantWriteData(p));\n+ ['BatchWriteItem', 'PutItem', 'UpdateItem', 'DeleteItem', 'DescribeTable'], (p, t) => t.grantWriteData(p));\n});\ntest('\"grantReadWriteData\" allows the principal to read/write data', () => {\ntestGrant([\n'BatchGetItem', 'GetRecords', 'GetShardIterator', 'Query', 'GetItem', 'Scan',\n- 'ConditionCheckItem', 'BatchWriteItem', 'PutItem', 'UpdateItem', 'DeleteItem',\n+ 'ConditionCheckItem', 'BatchWriteItem', 'PutItem', 'UpdateItem', 'DeleteItem', 'DescribeTable',\n], (p, t) => t.grantReadWriteData(p));\n});\n@@ -2092,6 +2093,7 @@ describe('grants', () => {\n'dynamodb:GetItem',\n'dynamodb:Scan',\n'dynamodb:ConditionCheckItem',\n+ 'dynamodb:DescribeTable',\n],\n'Effect': 'Allow',\n'Resource': [\n@@ -2244,6 +2246,7 @@ describe('import', () => {\n'dynamodb:GetItem',\n'dynamodb:Scan',\n'dynamodb:ConditionCheckItem',\n+ 'dynamodb:DescribeTable',\n],\n'Effect': 'Allow',\n'Resource': [\n@@ -2290,6 +2293,7 @@ describe('import', () => {\n'dynamodb:PutItem',\n'dynamodb:UpdateItem',\n'dynamodb:DeleteItem',\n+ 'dynamodb:DescribeTable',\n],\n'Effect': 'Allow',\n'Resource': [\n@@ -2432,6 +2436,7 @@ describe('import', () => {\n'dynamodb:GetItem',\n'dynamodb:Scan',\n'dynamodb:ConditionCheckItem',\n+ 'dynamodb:DescribeTable',\n],\nResource: [\n{\n@@ -2606,6 +2611,7 @@ describe('global', () => {\n'dynamodb:GetItem',\n'dynamodb:Scan',\n'dynamodb:ConditionCheckItem',\n+ 'dynamodb:DescribeTable',\n],\nEffect: 'Allow',\nResource: [\n@@ -2760,6 +2766,7 @@ describe('global', () => {\n'dynamodb:GetItem',\n'dynamodb:Scan',\n'dynamodb:ConditionCheckItem',\n+ 'dynamodb:DescribeTable',\n],\nEffect: 'Allow',\nResource: [\n",
"new_path": "packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts",
"old_path": "packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts"
},
{
"change_type": "MODIFY",
"diff": "\"dynamodb:Query\",\n\"dynamodb:GetItem\",\n\"dynamodb:Scan\",\n- \"dynamodb:ConditionCheckItem\"\n+ \"dynamodb:ConditionCheckItem\",\n+ \"dynamodb:DescribeTable\"\n],\n\"Effect\": \"Allow\",\n\"Resource\": [\n\"dynamodb:Query\",\n\"dynamodb:GetItem\",\n\"dynamodb:Scan\",\n- \"dynamodb:ConditionCheckItem\"\n+ \"dynamodb:ConditionCheckItem\",\n+ \"dynamodb:DescribeTable\"\n],\n\"Effect\": \"Allow\",\n\"Resource\": [\n",
"new_path": "packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.expected.json",
"old_path": "packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.expected.json"
},
{
"change_type": "MODIFY",
"diff": "\"dynamodb:Query\",\n\"dynamodb:GetItem\",\n\"dynamodb:Scan\",\n- \"dynamodb:ConditionCheckItem\"\n+ \"dynamodb:ConditionCheckItem\",\n+ \"dynamodb:DescribeTable\"\n],\n\"Effect\": \"Allow\",\n\"Resource\": [\n\"dynamodb:Query\",\n\"dynamodb:GetItem\",\n\"dynamodb:Scan\",\n- \"dynamodb:ConditionCheckItem\"\n+ \"dynamodb:ConditionCheckItem\",\n+ \"dynamodb:DescribeTable\"\n],\n\"Effect\": \"Allow\",\n\"Resource\": [\n",
"new_path": "packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.sse.expected.json",
"old_path": "packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.sse.expected.json"
}
] |
TypeScript
|
Apache License 2.0
|
aws/aws-cdk
|
fix(dynamodb): `grant*Data()` methods are missing the `dynamodb:DescribeTable` permission (#19129)
Fixes #18773
This allows the high level dynamodb clients to function correctly
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
| 1
|
fix
|
dynamodb
|
877,026
|
24.02.2022 21:37:35
| -3,600
|
7c9cdbd396df895ccf3032c6dd30bf62c5a89ae0
|
fix(@vtmn/css): modal overview displays correctly on mobile, fix radius mobile
|
[
{
"change_type": "MODIFY",
"diff": "+<style>\n+ @media screen and (min-width: 599px) {\n+ .vtmn-modal_content {\n+ position: static;\n+ transform: translate(0, 0);\n+ }\n+ }\n+</style>\n+\n<div class=\"block\">\n<div class=\"vtmn-modal\" id=\"modal-1\" aria-hidden=\"true\">\n- <div\n- class=\"vtmn-modal_content\"\n- style=\"position: static; transform: translate(0, 0)\"\n- >\n+ <div class=\"vtmn-modal_content\">\n<div class=\"vtmn-modal_content_title\">\n<p class=\"vtmn-modal_content_title--text\">What is a modal?</p>\n<button\n",
"new_path": "packages/showcases/css/stories/components/overlays/modal/examples/overview.html",
"old_path": "packages/showcases/css/stories/components/overlays/modal/examples/overview.html"
},
{
"change_type": "MODIFY",
"diff": "bottom: 0;\nleft: 0;\ntransform: translate(0, 0);\n+ border-radius: var(--vtmn-radius_200) var(--vtmn-radius_200) 0 0;\n}\n.vtmn-modal_content_actions {\n",
"new_path": "packages/sources/css/src/components/overlays/modal/src/index.css",
"old_path": "packages/sources/css/src/components/overlays/modal/src/index.css"
}
] |
JavaScript
|
Apache License 2.0
|
decathlon/vitamin-web
|
fix(@vtmn/css): modal overview displays correctly on mobile, fix radius mobile (#991)
| 1
|
fix
|
@vtmn/css
|
419,589
|
24.02.2022 21:59:23
| -28,800
|
55ff07be3f781d2c6a788a463d26dec38570509c
|
fix(core): respect `orphanRemoval` in 1:1 relations
|
[
{
"change_type": "MODIFY",
"diff": "@@ -178,10 +178,12 @@ export class EntityHelper {\nif (prop.reference === ReferenceType.ONE_TO_ONE && entity && entity.__helper!.__initialized && entity[prop2.name] != null && value == null) {\nentity[prop2.name] = value;\n+ if (prop.orphanRemoval) {\nentity.__helper!.__em?.getUnitOfWork().scheduleOrphanRemoval(entity);\n}\n}\n}\n+ }\nprivate static propagateOneToOne<T, O>(entity: T, owner: O, prop: EntityProperty<O>, prop2: EntityProperty<T>): void {\nconst inverse = entity[prop2.name];\n",
"new_path": "packages/core/src/entity/EntityHelper.ts",
"old_path": "packages/core/src/entity/EntityHelper.ts"
},
{
"change_type": "ADD",
"diff": "+import { Entity, MikroORM, OneToOne, PrimaryKey } from '@mikro-orm/core';\n+import type { SqliteDriver } from '@mikro-orm/sqlite';\n+\n+@Entity()\n+export class Position {\n+\n+ @PrimaryKey()\n+ id!: number;\n+\n+ // eslint-disable-next-line @typescript-eslint/no-use-before-define\n+ @OneToOne(() => Leg, (leg: Leg) => leg.position, { owner: true, nullable: true })\n+ leg?: any;\n+\n+}\n+\n+@Entity()\n+export class Leg {\n+\n+ @PrimaryKey()\n+ id!: number;\n+\n+ @OneToOne(() => Position, (position: Position) => position.leg, { nullable: true })\n+ position?: Position;\n+\n+}\n+\n+@Entity()\n+export class Position2 {\n+\n+ @PrimaryKey()\n+ id!: number;\n+\n+ // eslint-disable-next-line @typescript-eslint/no-use-before-define\n+ @OneToOne(() => Leg2, (leg: Leg2) => leg.position, { owner: true, nullable: true , orphanRemoval: true })\n+ leg?: any;\n+\n+}\n+\n+@Entity()\n+export class Leg2 {\n+\n+ @PrimaryKey()\n+ id!: number;\n+\n+ @OneToOne(() => Position2, (position: Position2) => position.leg, { nullable: true })\n+ position?: Position2;\n+\n+}\n+\n+describe('GH issue 2815', () => {\n+\n+ let orm: MikroORM<SqliteDriver>;\n+\n+ beforeAll(async () => {\n+ orm = await MikroORM.init({\n+ type: 'sqlite',\n+ dbName: ':memory:',\n+ entities: [Position, Leg, Position2, Leg2],\n+ });\n+ await orm.getSchemaGenerator().createSchema();\n+ });\n+\n+ beforeEach(async () => {\n+ await orm.getSchemaGenerator().refreshDatabase();\n+ });\n+\n+ afterAll(async () => {\n+ await orm.close(true);\n+ });\n+\n+ test(`find in transaction finds previously inserted entities`, async () => {\n+ const b = orm.em.create(Leg, {});\n+ await orm.em.persistAndFlush(b);\n+ orm.em.clear();\n+\n+ const p = orm.em.create(Position, { leg: b });\n+ await orm.em.persistAndFlush(p);\n+\n+ p.leg = null;\n+\n+ await orm.em.flush();\n+\n+ orm.em.clear();\n+\n+ const leg = await orm.em.findOne(Leg, 1);\n+ expect(leg).toBeTruthy();\n+ });\n+\n+ test(`test 1-1 propagation for orphanremoval false`, async () => {\n+ const b = orm.em.create(Leg, {});\n+ await orm.em.persistAndFlush(b);\n+\n+ const p = orm.em.create(Position, { leg: b });\n+ await orm.em.persistAndFlush(p);\n+\n+ p.leg = null;\n+\n+ const uow = orm.em.getUnitOfWork();\n+ uow.computeChangeSets();\n+ expect(uow.getRemoveStack().size).toEqual(0);\n+ });\n+\n+ test(`test 1-1 propagation for orphanremoval true`, async () => {\n+ const b = orm.em.create(Leg2, {});\n+ await orm.em.persistAndFlush(b);\n+\n+ const p = orm.em.create(Position2, { leg: b });\n+ await orm.em.persistAndFlush(p);\n+\n+ p.leg = null;\n+\n+ const uow = orm.em.getUnitOfWork();\n+ uow.computeChangeSets();\n+ expect(uow.getRemoveStack().size).toEqual(1);\n+ });\n+\n+});\n",
"new_path": "tests/issues/GH2815.test.ts",
"old_path": null
}
] |
TypeScript
|
MIT License
|
mikro-orm/mikro-orm
|
fix(core): respect `orphanRemoval` in 1:1 relations (#2816)
| 1
|
fix
|
core
|
104,828
|
24.02.2022 22:03:41
| -3,600
|
986ce341cc98ba295d9d4cb5674fe00d7c33b5f3
|
docs(table): fix spelling and isExpanded in mdx
|
[
{
"change_type": "MODIFY",
"diff": "@@ -4,8 +4,11 @@ View the full Table documentation [here](/docs/1-watson-iot-table--playground)\nThe Table provides a built in UI for search which is enabled by setting the prop `options.hasSearch` to true.\nThe search field is collapsed by default and is expanded through an icon button in the table toolbar or\n-programmatically by setting the prop `view.toolbar.search.defaultExpanded` to true. When a\n-user types into the search field the search is immediately triggered and the function supplied for\n+programmatically by setting the prop `view.toolbar.search.defaultExpanded` or `view.toolbar.search.isExpanded`\n+to true. The defaultExpanded will initially expand the search field but also allows it to collapse when a search\n+is cleared, whereas the isExpanded will force it to always stay open.\n+\n+When a user types into the search field the search is immediately triggered and the function supplied for\n`actions.toolbar.onApplySearch` is called for each keystroke. If the prop `options.hasFastSearch` is set to\n`false` then a search is only triggered by any of the following actions:\n@@ -17,7 +20,7 @@ The search value can also be programmatically set using the prop `view.toolbar.s\nwill update the search field and trigger a new search.\nThe `StatefulTable` automatically filters on the data supplied by the `data` prop but for the normal `Table`\n-the `onApplySearch` event must be handled to update the table data programmatically. The Statefultable will\n+the `onApplySearch` event must be handled to update the table data programmatically. The StatefulTable will\nonly search on values of the type strings, numbers and booleans and there is no search equivalent to the\ncolumn props sortFunction and filterFunction. In order to search on complex types a programmatic search\nimplementation is needed.\n@@ -53,13 +56,13 @@ return (\n### Programmatic search\nTo implement a custom search for the normal `Table` the event for `actions.toolbar.onApplySearch` must be\n-handled. The function receives the current search value as parameter and can be used to directly modify\n+handled. The function receives the current search value as a parameter and can be used to directly modify\nthe `data` prop as shown in the example below or trigger an asynchronous search in the backend. There is no\nautomatic loading state triggered so if the search is not near instant it is wise to activate the loading\nskeletons using the prop `view.table.loadingState.isLoading` while executing.\n-The normal Table also fires an on expand event (`view.toolbar.search.onExpand`) when the search field is\n-expanded but there is no normally need to handle that since the search component always manages its own\n+The normal Table also fires an onExpand event (`view.toolbar.search.onExpand`) when the search field is\n+expanded but there is normally no need to handle that since the search component always manages its own\nexpanded state.\nThe example below shows how to implement a custom search on the \"id\" string of values of type Object.\n",
"new_path": "packages/react/src/components/Table/mdx/Searching.mdx",
"old_path": "packages/react/src/components/Table/mdx/Searching.mdx"
}
] |
JavaScript
|
Apache License 2.0
|
carbon-design-system/carbon-addons-iot-react
|
docs(table): fix spelling and isExpanded in mdx
| 1
|
docs
|
table
|
471,318
|
24.02.2022 22:15:43
| 0
|
552926146c838efd7e2b778ae6fb815e9e304965
|
fix(graphql): fix `graphql.operation.name` field
|
[
{
"change_type": "MODIFY",
"diff": "@@ -19,7 +19,8 @@ export enum AttributeNames {\nFIELD_NAME = 'graphql.field.name',\nFIELD_PATH = 'graphql.field.path',\nFIELD_TYPE = 'graphql.field.type',\n- OPERATION = 'graphql.operation.name',\n+ OPERATION_TYPE = 'graphql.operation.type',\n+ OPERATION_NAME = 'graphql.operation.name',\nVARIABLES = 'graphql.variables.',\nERROR_VALIDATION_NAME = 'graphql.validation.error',\n}\n",
"new_path": "plugins/node/opentelemetry-instrumentation-graphql/src/enums/AttributeNames.ts",
"old_path": "plugins/node/opentelemetry-instrumentation-graphql/src/enums/AttributeNames.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -401,10 +401,18 @@ export class GraphQLInstrumentation extends InstrumentationBase {\nconst span = this.tracer.startSpan(SpanNames.EXECUTE, {});\nif (operation) {\n- const name = (operation as graphqlTypes.OperationDefinitionNode)\n- .operation;\n- if (name) {\n- span.setAttribute(AttributeNames.OPERATION, name);\n+ const operationDefinition =\n+ operation as graphqlTypes.OperationDefinitionNode;\n+ span.setAttribute(\n+ AttributeNames.OPERATION_TYPE,\n+ operationDefinition.operation\n+ );\n+\n+ if (operationDefinition.name) {\n+ span.setAttribute(\n+ AttributeNames.OPERATION_NAME,\n+ operationDefinition.name.value\n+ );\n}\n} else {\nlet operationName = ' ';\n@@ -415,7 +423,7 @@ export class GraphQLInstrumentation extends InstrumentationBase {\n'$operationName$',\noperationName\n);\n- span.setAttribute(AttributeNames.OPERATION, operationName);\n+ span.setAttribute(AttributeNames.OPERATION_NAME, operationName);\n}\nif (processedArgs.document?.loc) {\n",
"new_path": "plugins/node/opentelemetry-instrumentation-graphql/src/instrumentation.ts",
"old_path": "plugins/node/opentelemetry-instrumentation-graphql/src/instrumentation.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -61,7 +61,7 @@ const sourceBookById = `\n`;\nconst sourceAddBook = `\n- mutation {\n+ mutation AddBook {\naddBook(\nname: \"Fifth Book\"\nauthorIds: \"0,2\"\n@@ -155,9 +155,13 @@ describe('graphql', () => {\n' }\\n'\n);\nassert.deepStrictEqual(\n- executeSpan.attributes[AttributeNames.OPERATION],\n+ executeSpan.attributes[AttributeNames.OPERATION_TYPE],\n'query'\n);\n+ assert.deepStrictEqual(\n+ executeSpan.attributes[AttributeNames.OPERATION_NAME],\n+ undefined\n+ );\nassert.deepStrictEqual(executeSpan.name, SpanNames.EXECUTE);\nassert.deepStrictEqual(executeSpan.parentSpanId, undefined);\n});\n@@ -278,9 +282,13 @@ describe('graphql', () => {\n' }\\n'\n);\nassert.deepStrictEqual(\n- executeSpan.attributes[AttributeNames.OPERATION],\n+ executeSpan.attributes[AttributeNames.OPERATION_TYPE],\n'query'\n);\n+ assert.deepStrictEqual(\n+ executeSpan.attributes[AttributeNames.OPERATION_NAME],\n+ undefined\n+ );\nassert.deepStrictEqual(executeSpan.name, SpanNames.EXECUTE);\nassert.deepStrictEqual(executeSpan.parentSpanId, undefined);\n});\n@@ -364,9 +372,13 @@ describe('graphql', () => {\n' }\\n'\n);\nassert.deepStrictEqual(\n- executeSpan.attributes[AttributeNames.OPERATION],\n+ executeSpan.attributes[AttributeNames.OPERATION_TYPE],\n'query'\n);\n+ assert.deepStrictEqual(\n+ executeSpan.attributes[AttributeNames.OPERATION_NAME],\n+ 'Query1'\n+ );\nassert.deepStrictEqual(\nexecuteSpan.attributes[`${AttributeNames.VARIABLES}id`],\nundefined\n@@ -456,9 +468,13 @@ describe('graphql', () => {\n' }\\n'\n);\nassert.deepStrictEqual(\n- executeSpan.attributes[AttributeNames.OPERATION],\n+ executeSpan.attributes[AttributeNames.OPERATION_TYPE],\n'query'\n);\n+ assert.deepStrictEqual(\n+ executeSpan.attributes[AttributeNames.OPERATION_NAME],\n+ undefined\n+ );\nassert.deepStrictEqual(executeSpan.name, SpanNames.EXECUTE);\nassert.deepStrictEqual(executeSpan.parentSpanId, undefined);\n});\n@@ -520,9 +536,13 @@ describe('graphql', () => {\n' }\\n'\n);\nassert.deepStrictEqual(\n- executeSpan.attributes[AttributeNames.OPERATION],\n+ executeSpan.attributes[AttributeNames.OPERATION_TYPE],\n'query'\n);\n+ assert.deepStrictEqual(\n+ executeSpan.attributes[AttributeNames.OPERATION_NAME],\n+ undefined\n+ );\nassert.deepStrictEqual(executeSpan.name, SpanNames.EXECUTE);\nassert.deepStrictEqual(executeSpan.parentSpanId, undefined);\n});\n@@ -607,9 +627,13 @@ describe('graphql', () => {\n' }\\n'\n);\nassert.deepStrictEqual(\n- executeSpan.attributes[AttributeNames.OPERATION],\n+ executeSpan.attributes[AttributeNames.OPERATION_TYPE],\n'query'\n);\n+ assert.deepStrictEqual(\n+ executeSpan.attributes[AttributeNames.OPERATION_NAME],\n+ undefined\n+ );\nassert.deepStrictEqual(executeSpan.name, SpanNames.EXECUTE);\nassert.deepStrictEqual(executeSpan.parentSpanId, undefined);\n});\n@@ -664,7 +688,7 @@ describe('graphql', () => {\nassert.deepStrictEqual(\nparseSpan.attributes[AttributeNames.SOURCE],\n'\\n' +\n- ' mutation {\\n' +\n+ ' mutation AddBook {\\n' +\n' addBook(\\n' +\n' name: \"Fifth Book\"\\n' +\n' authorIds: \"0,2\"\\n' +\n@@ -689,7 +713,7 @@ describe('graphql', () => {\nassert.deepStrictEqual(\nexecuteSpan.attributes[AttributeNames.SOURCE],\n'\\n' +\n- ' mutation {\\n' +\n+ ' mutation AddBook {\\n' +\n' addBook(\\n' +\n' name: \"Fifth Book\"\\n' +\n' authorIds: \"0,2\"\\n' +\n@@ -699,9 +723,13 @@ describe('graphql', () => {\n' }\\n'\n);\nassert.deepStrictEqual(\n- executeSpan.attributes[AttributeNames.OPERATION],\n+ executeSpan.attributes[AttributeNames.OPERATION_TYPE],\n'mutation'\n);\n+ assert.deepStrictEqual(\n+ executeSpan.attributes[AttributeNames.OPERATION_NAME],\n+ 'AddBook'\n+ );\nassert.deepStrictEqual(executeSpan.name, SpanNames.EXECUTE);\nassert.deepStrictEqual(executeSpan.parentSpanId, undefined);\n});\n@@ -785,9 +813,13 @@ describe('graphql', () => {\n' }\\n'\n);\nassert.deepStrictEqual(\n- executeSpan.attributes[AttributeNames.OPERATION],\n+ executeSpan.attributes[AttributeNames.OPERATION_TYPE],\n'query'\n);\n+ assert.deepStrictEqual(\n+ executeSpan.attributes[AttributeNames.OPERATION_NAME],\n+ 'Query1'\n+ );\nassert.deepStrictEqual(\nexecuteSpan.attributes[`${AttributeNames.VARIABLES}id`],\n2\n@@ -848,7 +880,7 @@ describe('graphql', () => {\nassert.deepStrictEqual(\nparseSpan.attributes[AttributeNames.SOURCE],\n'\\n' +\n- ' mutation {\\n' +\n+ ' mutation AddBook {\\n' +\n' addBook(\\n' +\n' name: \"*\"\\n' +\n' authorIds: \"*\"\\n' +\n@@ -873,7 +905,7 @@ describe('graphql', () => {\nassert.deepStrictEqual(\nexecuteSpan.attributes[AttributeNames.SOURCE],\n'\\n' +\n- ' mutation {\\n' +\n+ ' mutation AddBook {\\n' +\n' addBook(\\n' +\n' name: \"*\"\\n' +\n' authorIds: \"*\"\\n' +\n@@ -883,9 +915,13 @@ describe('graphql', () => {\n' }\\n'\n);\nassert.deepStrictEqual(\n- executeSpan.attributes[AttributeNames.OPERATION],\n+ executeSpan.attributes[AttributeNames.OPERATION_TYPE],\n'mutation'\n);\n+ assert.deepStrictEqual(\n+ executeSpan.attributes[AttributeNames.OPERATION_NAME],\n+ 'AddBook'\n+ );\nassert.deepStrictEqual(executeSpan.name, SpanNames.EXECUTE);\nassert.deepStrictEqual(executeSpan.parentSpanId, undefined);\n});\n@@ -1021,7 +1057,7 @@ describe('graphql', () => {\nit('should attach response hook data to the resulting spans', () => {\nconst querySpan = spans.find(\n- span => span.attributes['graphql.operation.name'] == 'query'\n+ span => span.attributes[AttributeNames.OPERATION_TYPE] == 'query'\n);\nconst instrumentationResult = querySpan?.attributes[dataAttributeName];\nassert.deepStrictEqual(\n@@ -1125,7 +1161,7 @@ describe('graphql', () => {\n' }\\n'\n);\nassert.deepStrictEqual(\n- executeSpan.attributes[AttributeNames.OPERATION],\n+ executeSpan.attributes[AttributeNames.OPERATION_NAME],\n'Operation \"foo\" not supported'\n);\nassert.deepStrictEqual(executeSpan.name, SpanNames.EXECUTE);\n",
"new_path": "plugins/node/opentelemetry-instrumentation-graphql/test/graphql.test.ts",
"old_path": "plugins/node/opentelemetry-instrumentation-graphql/test/graphql.test.ts"
}
] |
TypeScript
|
Apache License 2.0
|
open-telemetry/opentelemetry-js-contrib
|
fix(graphql): fix `graphql.operation.name` field (#903)
Co-authored-by: Valentin Marchaud <contact@vmarchaud.fr>
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
| 1
|
fix
|
graphql
|
711,597
|
24.02.2022 22:17:42
| -3,600
|
640f087e6f7b1ff68fe924608e26b945803cc6e9
|
feat(core): Expose & document DataImportModule providers
Closes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -178,6 +178,7 @@ export const initialData: InitialData = {\n## Populating The Server\n+### The `populate()` function\nThe `@vendure/core` package exposes a [`populate()` function]({{< relref \"populate\" >}}) which can be used along with the data formats described above to populate your Vendure server:\n```TypeScript\n@@ -216,7 +217,16 @@ populate(\n);\n```\n-{{< alert >}}\n+### Custom populate scripts\n+\nIf you require more control over how your data is being imported - for example if you also need to import data into custom entities - you can create your own CLI script to do this: see [Stand-Alone CLI Scripts]({{< relref \"stand-alone-scripts\" >}}).\n-{{< /alert >}}\n+In your script you can make use of the internal parse and import services:\n+\n+* [Importer]({{< relref \"importer\" >}})\n+* [ImportParser]({{< relref \"import-parser\" >}})\n+* [FastImporterService]({{< relref \"fast-importer-service\" >}})\n+* [AssetImporter]({{< relref \"asset-importer\" >}})\n+* [Populator]({{< relref \"populator\" >}})\n+\n+Using these specialized import services is preferable to using the normal service-layer services (ProductService, ProductVariantService etc.) for bulk imports. This is because these import services are optimized for bulk imports (they omit unnecessary checks, use optimized SQL queries) and also do not publish events when creating new entities.\n",
"new_path": "docs/content/developer-guide/importing-product-data.md",
"old_path": "docs/content/developer-guide/importing-product-data.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -8,7 +8,38 @@ import { logColored } from './cli-utils';\n/**\n* @description\n* Populates the Vendure server with some initial data and (optionally) product data from\n- * a supplied CSV file.\n+ * a supplied CSV file. The format of the CSV file is described in the section\n+ * [Importing Product Data](/docs/developer-guide/importing-product-data).\n+ *\n+ * Internally the `populate()` function does the following:\n+ *\n+ * 1. Uses the {@link Populator} to populate the {@link InitialData}.\n+ * 2. If `productsCsvPath` is provided, uses {@link Importer} to populate Product data.\n+ * 3. Uses {@Populator} to populate collections specified in the {@link InitialData}.\n+ *\n+ * @example\n+ * ```TypeScript\n+ * import { bootstrap } from '\\@vendure/core';\n+ * import { populate } from '\\@vendure/core/cli';\n+ * import { config } from './vendure-config.ts'\n+ * import { initialData } from './my-initial-data.ts';\n+ *\n+ * const productsCsvFile = path.join(__dirname, 'path/to/products.csv')\n+ *\n+ * populate(\n+ * () => bootstrap(config),\n+ * initialData,\n+ * productsCsvFile,\n+ * )\n+ * .then(app => app.close())\n+ * .then(\n+ * () => process.exit(0),\n+ * err => {\n+ * console.log(err);\n+ * process.exit(1);\n+ * },\n+ * );\n+ * ```\n*\n* @docsCategory import-export\n*/\n",
"new_path": "packages/core/src/cli/populate.ts",
"old_path": "packages/core/src/cli/populate.ts"
},
{
"change_type": "MODIFY",
"diff": "export * from './providers/populator/populator';\nexport * from './providers/importer/importer';\n+export * from './providers/importer/fast-importer.service';\n+export * from './providers/asset-importer/asset-importer';\n+export * from './providers/import-parser/import-parser';\nexport * from './types';\n",
"new_path": "packages/core/src/data-import/index.ts",
"old_path": "packages/core/src/data-import/index.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -6,13 +6,23 @@ import { ConfigService } from '../../../config/config.service';\nimport { Asset } from '../../../entity/asset/asset.entity';\nimport { AssetService } from '../../../service/services/asset.service';\n+/**\n+ * @description\n+ * This service creates new {@link Asset} entities based on string paths provided in the CSV\n+ * import format. The source files are resolved by joining the value of `importExportOptions.importAssetsDir`\n+ * with the asset path. This service is used internally by the {@link Importer} service.\n+ *\n+ * @docsCategory import-export\n+ */\n@Injectable()\nexport class AssetImporter {\nprivate assetMap = new Map<string, Asset>();\n+ /** @internal */\nconstructor(private configService: ConfigService, private assetService: AssetService) {}\n/**\n+ * @description\n* Creates Asset entities for the given paths, using the assetMap cache to prevent the\n* creation of duplicates.\n*/\n",
"new_path": "packages/core/src/data-import/providers/asset-importer/asset-importer.ts",
"old_path": "packages/core/src/data-import/providers/asset-importer/asset-importer.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -34,6 +34,14 @@ const requiredColumns: string[] = [\n'variantFacets',\n];\n+/**\n+ * @description\n+ * The intermediate representation of an OptionGroup after it has been parsed\n+ * by the {@link ImportParser}.\n+ *\n+ * @docsCategory import-export\n+ * @docsPage ImportParser\n+ */\nexport interface ParsedOptionGroup {\ntranslations: Array<{\nlanguageCode: LanguageCode;\n@@ -42,6 +50,14 @@ export interface ParsedOptionGroup {\n}>;\n}\n+/**\n+ * @description\n+ * The intermediate representation of a Facet after it has been parsed\n+ * by the {@link ImportParser}.\n+ *\n+ * @docsCategory import-export\n+ * @docsPage ImportParser\n+ */\nexport interface ParsedFacet {\ntranslations: Array<{\nlanguageCode: LanguageCode;\n@@ -50,6 +66,14 @@ export interface ParsedFacet {\n}>;\n}\n+/**\n+ * @description\n+ * The intermediate representation of a ProductVariant after it has been parsed\n+ * by the {@link ImportParser}.\n+ *\n+ * @docsCategory import-export\n+ * @docsPage ImportParser\n+ */\nexport interface ParsedProductVariant {\nsku: string;\nprice: number;\n@@ -67,6 +91,14 @@ export interface ParsedProductVariant {\n}>;\n}\n+/**\n+ * @description\n+ * The intermediate representation of a Product after it has been parsed\n+ * by the {@link ImportParser}.\n+ *\n+ * @docsCategory import-export\n+ * @docsPage ImportParser\n+ */\nexport interface ParsedProduct {\nassetPaths: string[];\noptionGroups: ParsedOptionGroup[];\n@@ -82,11 +114,26 @@ export interface ParsedProduct {\n}>;\n}\n+/**\n+ * @description\n+ * The data structure into which an import CSV file is parsed by the\n+ * {@link ImportParser} `parseProducts()` method.\n+ *\n+ * @docsCategory import-export\n+ * @docsPage ImportParser\n+ */\nexport interface ParsedProductWithVariants {\nproduct: ParsedProduct;\nvariants: ParsedProductVariant[];\n}\n+/**\n+ * @description\n+ * The result returned by the {@link ImportParser} `parseProducts()` method.\n+ *\n+ * @docsCategory import-export\n+ * @docsPage ImportParser\n+ */\nexport interface ParseResult<T> {\nresults: T[];\nerrors: string[];\n@@ -94,12 +141,24 @@ export interface ParseResult<T> {\n}\n/**\n+ * @description\n* Validates and parses CSV files into a data structure which can then be used to created new entities.\n+ * This is used internally by the {@link Importer}.\n+ *\n+ * @docsCategory import-export\n+ * @docsPage ImportParser\n+ * @docsWeight 0\n*/\n@Injectable()\nexport class ImportParser {\n+ /** @internal */\nconstructor(private configService: ConfigService) {}\n+ /**\n+ * @description\n+ * Parses the contents of the [product import CSV file](/docs/developer-guide/importing-product-data/#product-import-format) and\n+ * returns a data structure which can then be used to populate Vendure using the {@link FastImporterService}.\n+ */\nasync parseProducts(\ninput: string | Stream,\nmainLanguage: LanguageCode = this.configService.defaultLanguageCode,\n",
"new_path": "packages/core/src/data-import/providers/import-parser/import-parser.ts",
"old_path": "packages/core/src/data-import/providers/import-parser/import-parser.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -26,14 +26,20 @@ import { ChannelService } from '../../../service/services/channel.service';\nimport { StockMovementService } from '../../../service/services/stock-movement.service';\n/**\n+ * @description\n* A service to import entities into the database. This replaces the regular `create` methods of the service layer with faster\n- * versions which skip much of the defensive checks and other DB calls which are not needed when running an import.\n+ * versions which skip much of the defensive checks and other DB calls which are not needed when running an import. It also\n+ * does not publish any events, so e.g. will not trigger search index jobs.\n*\n* In testing, the use of the FastImporterService approximately doubled the speed of bulk imports.\n+ *\n+ * @docsCategory import-export\n*/\n@Injectable()\nexport class FastImporterService {\nprivate defaultChannel: Channel;\n+\n+ /** @internal */\nconstructor(\nprivate connection: TransactionalConnection,\nprivate channelService: ChannelService,\n",
"new_path": "packages/core/src/data-import/providers/importer/fast-importer.service.ts",
"old_path": "packages/core/src/data-import/providers/importer/fast-importer.service.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -28,6 +28,16 @@ export interface ImportProgress extends ImportInfo {\nexport type OnProgressFn = (progess: ImportProgress) => void;\n+/**\n+ * @description\n+ * Parses and imports Products using the CSV import format.\n+ *\n+ * Internally it is using the {@link ImportParser} to parse the CSV file, and then the\n+ * {@link FastImporterService} and the {@link AssetImporter} to actually create the resulting\n+ * entities in the Vendure database.\n+ *\n+ * @docsCategory import-export\n+ */\n@Injectable()\nexport class Importer {\nprivate taxCategoryMatches: { [name: string]: ID } = {};\n@@ -36,6 +46,7 @@ export class Importer {\nprivate facetMap = new Map<string, Facet>();\nprivate facetValueMap = new Map<string, FacetValue>();\n+ /** @internal */\nconstructor(\nprivate configService: ConfigService,\nprivate importParser: ImportParser,\n@@ -47,6 +58,13 @@ export class Importer {\nprivate fastImporter: FastImporterService,\n) {}\n+ /**\n+ * @description\n+ * Parses the contents of the [product import CSV file](/docs/developer-guide/importing-product-data/#product-import-format) and imports\n+ * the resulting Product & ProductVariants, as well as any associated Assets, Facets & FacetValues.\n+ *\n+ * The `ctxOrLanguageCode` argument is used to specify the languageCode to be used when creating the Products.\n+ */\nparseAndImport(\ninput: string | Stream,\nctxOrLanguageCode: RequestContext | LanguageCode,\n",
"new_path": "packages/core/src/data-import/providers/importer/importer.ts",
"old_path": "packages/core/src/data-import/providers/importer/importer.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -30,10 +30,15 @@ import {\nimport { AssetImporter } from '../asset-importer/asset-importer';\n/**\n- * Responsible for populating the database with initial data.\n+ * @description\n+ * Responsible for populating the database with {@link InitialData}, i.e. non-product data such as countries, tax rates,\n+ * shipping methods, payment methods & roles.\n+ *\n+ * @docsCategory import-export\n*/\n@Injectable()\nexport class Populator {\n+ /** @internal */\nconstructor(\nprivate countryService: CountryService,\nprivate zoneService: ZoneService,\n@@ -50,6 +55,7 @@ export class Populator {\n) {}\n/**\n+ * @description\n* Should be run *before* populating the products, so that there are TaxRates by which\n* product prices can be set.\n*/\n@@ -96,6 +102,7 @@ export class Populator {\n}\n/**\n+ * @description\n* Should be run *after* the products have been populated, otherwise the expected FacetValues will not\n* yet exist.\n*/\n",
"new_path": "packages/core/src/data-import/providers/populator/populator.ts",
"old_path": "packages/core/src/data-import/providers/populator/populator.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -3,6 +3,7 @@ import { Module } from '@nestjs/common';\nimport { CacheModule } from '../cache/cache.module';\nimport { ConfigModule } from '../config/config.module';\nimport { ConnectionModule } from '../connection/connection.module';\n+import { DataImportModule } from '../data-import/data-import.module';\nimport { EventBusModule } from '../event-bus/event-bus.module';\nimport { HealthCheckModule } from '../health-check/health-check.module';\nimport { I18nModule } from '../i18n/i18n.module';\n@@ -37,6 +38,7 @@ import { ServiceModule } from '../service/service.module';\nCacheModule,\nI18nModule,\nProcessContextModule,\n+ DataImportModule,\n],\nexports: [\nEventBusModule,\n@@ -48,6 +50,7 @@ import { ServiceModule } from '../service/service.module';\nCacheModule,\nI18nModule,\nProcessContextModule,\n+ DataImportModule,\n],\n})\nexport class PluginCommonModule {}\n",
"new_path": "packages/core/src/plugin/plugin-common.module.ts",
"old_path": "packages/core/src/plugin/plugin-common.module.ts"
}
] |
TypeScript
|
MIT License
|
vendure-ecommerce/vendure
|
feat(core): Expose & document DataImportModule providers
Closes #1336
| 1
|
feat
|
core
|
841,421
|
24.02.2022 22:36:37
| -32,400
|
e21579d84ec287632393480e86032cc228bef0ce
|
perf(es/parser): Reduce usage of generics to reduce binary size
|
[
{
"change_type": "MODIFY",
"diff": "@@ -2,7 +2,7 @@ use either::Either;\nuse swc_atoms::js_word;\nuse swc_common::{Spanned, SyntaxContext};\n-use super::{ident::MaybeOptionalIdentParser, *};\n+use super::*;\nuse crate::{error::SyntaxError, lexer::TokenContext, parser::stmt::IsDirective, Tokens};\n/// Parser for function expression and function declaration.\n@@ -72,20 +72,18 @@ impl<'a, I: Tokens> Parser<I> {\nself.parse_class(start, class_start, decorators)\n}\n- fn parse_class<T>(\n+ /// Not generic\n+ fn parse_class_inner(\n&mut self,\n- start: BytePos,\n+ _start: BytePos,\nclass_start: BytePos,\ndecorators: Vec<Decorator>,\n- ) -> PResult<T>\n- where\n- T: OutputType,\n- Self: MaybeOptionalIdentParser<T::Ident>,\n- {\n+ is_ident_required: bool,\n+ ) -> PResult<(Option<Ident>, Class)> {\nself.strict_mode().parse_with(|p| {\nexpect!(p, \"class\");\n- let ident = p.parse_maybe_opt_binding_ident()?;\n+ let ident = p.parse_maybe_opt_binding_ident(is_ident_required)?;\nif p.input.syntax().typescript() {\nif let Some(span) = ident.invalid_class_name() {\np.emit_err(span, SyntaxError::TS2414);\n@@ -159,8 +157,8 @@ impl<'a, I: Tokens> Parser<I> {\n.parse_class_body()?;\nexpect!(p, '}');\nlet end = last_pos!(p);\n- Ok(T::finish_class(\n- span!(p, start),\n+\n+ Ok((\nident,\nClass {\nspan: Span::new(class_start, end, Default::default()),\n@@ -176,6 +174,24 @@ impl<'a, I: Tokens> Parser<I> {\n})\n}\n+ fn parse_class<T>(\n+ &mut self,\n+ start: BytePos,\n+ class_start: BytePos,\n+ decorators: Vec<Decorator>,\n+ ) -> PResult<T>\n+ where\n+ T: OutputType,\n+ {\n+ let (ident, class) =\n+ self.parse_class_inner(start, class_start, decorators, T::IS_IDENT_REQUIRED)?;\n+\n+ match T::finish_class(span!(self, start), ident, class) {\n+ Ok(v) => Ok(v),\n+ Err(kind) => syntax_error!(self, kind),\n+ }\n+ }\n+\nfn parse_super_class(&mut self) -> PResult<(Box<Expr>, Option<TsTypeParamInstantiation>)> {\nlet super_class = self.parse_lhs_expr()?;\nmatch *super_class {\n@@ -967,24 +983,21 @@ impl<'a, I: Tokens> Parser<I> {\n}\n}\n- fn parse_fn<T>(\n+ fn parse_fn_inner(\n&mut self,\n- start_of_output_type: Option<BytePos>,\n+ _start_of_output_type: Option<BytePos>,\nstart_of_async: Option<BytePos>,\ndecorators: Vec<Decorator>,\n- ) -> PResult<T>\n- where\n- T: OutputType,\n- Self: MaybeOptionalIdentParser<T::Ident>,\n- T::Ident: Spanned,\n- {\n+ is_fn_expr: bool,\n+ is_ident_required: bool,\n+ ) -> PResult<(Option<Ident>, Function)> {\nlet start = start_of_async.unwrap_or_else(|| cur_pos!(self));\nassert_and_bump!(self, \"function\");\nlet is_async = start_of_async.is_some();\nlet is_generator = eat!(self, '*');\n- let ident = if T::is_fn_expr() {\n+ let ident = if is_fn_expr {\n//\nself.with_ctx(Context {\nin_async: is_async,\n@@ -992,14 +1005,14 @@ impl<'a, I: Tokens> Parser<I> {\nallow_direct_super: false,\n..self.ctx()\n})\n- .parse_maybe_opt_binding_ident()?\n+ .parse_maybe_opt_binding_ident(is_ident_required)?\n} else {\n// function declaration does not change context for `BindingIdentifier`.\nself.with_ctx(Context {\nallow_direct_super: false,\n..self.ctx()\n})\n- .parse_maybe_opt_binding_ident()?\n+ .parse_maybe_opt_binding_ident(is_ident_required)?\n};\nself.with_ctx(Context {\n@@ -1024,14 +1037,43 @@ impl<'a, I: Tokens> Parser<I> {\n// let body = p.parse_fn_body(is_async, is_generator)?;\n- Ok(T::finish_fn(\n- span!(p, start_of_output_type.unwrap_or(start)),\n- ident,\n- f,\n- ))\n+ Ok((ident, f))\n})\n}\n+ fn parse_fn<T>(\n+ &mut self,\n+ start_of_output_type: Option<BytePos>,\n+ start_of_async: Option<BytePos>,\n+ decorators: Vec<Decorator>,\n+ ) -> PResult<T>\n+ where\n+ T: OutputType,\n+ {\n+ let start = start_of_async.unwrap_or_else(|| cur_pos!(self));\n+ let (ident, f) = self.parse_fn_inner(\n+ start_of_output_type,\n+ start_of_async,\n+ decorators,\n+ T::is_fn_expr(),\n+ T::IS_IDENT_REQUIRED,\n+ )?;\n+\n+ match T::finish_fn(span!(self, start_of_output_type.unwrap_or(start)), ident, f) {\n+ Ok(v) => Ok(v),\n+ Err(kind) => syntax_error!(self, kind),\n+ }\n+ }\n+\n+ /// If `required` is `true`, this never returns `None`.\n+ fn parse_maybe_opt_binding_ident(&mut self, required: bool) -> PResult<Option<Ident>> {\n+ if required {\n+ self.parse_binding_ident().map(|v| v.id).map(Some)\n+ } else {\n+ Ok(self.parse_opt_binding_ident()?.map(|v| v.id))\n+ }\n+ }\n+\n/// `parse_args` closure should not eat '(' or ')'.\npub(super) fn parse_fn_args_body<F>(\n&mut self,\n@@ -1282,10 +1324,8 @@ impl IsInvalidClassName for Option<Ident> {\n}\n}\n-trait OutputType {\n- type Ident: IsInvalidClassName;\n-\n- fn is_constructor(ident: &Self::Ident) -> bool;\n+trait OutputType: Sized {\n+ const IS_IDENT_REQUIRED: bool;\n/// From babel..\n///\n@@ -1301,79 +1341,78 @@ trait OutputType {\nfalse\n}\n- fn finish_fn(span: Span, ident: Self::Ident, f: Function) -> Self;\n- fn finish_class(span: Span, ident: Self::Ident, class: Class) -> Self;\n+ fn finish_fn(span: Span, ident: Option<Ident>, f: Function) -> Result<Self, SyntaxError>;\n+\n+ fn finish_class(span: Span, ident: Option<Ident>, class: Class) -> Result<Self, SyntaxError>;\n}\nimpl OutputType for Box<Expr> {\n- type Ident = Option<Ident>;\n-\n- fn is_constructor(ident: &Self::Ident) -> bool {\n- match *ident {\n- Some(ref i) => i.sym == js_word!(\"constructor\"),\n- _ => false,\n- }\n- }\n+ const IS_IDENT_REQUIRED: bool = false;\nfn is_fn_expr() -> bool {\ntrue\n}\n- fn finish_fn(_span: Span, ident: Option<Ident>, function: Function) -> Self {\n- Box::new(Expr::Fn(FnExpr { ident, function }))\n+ fn finish_fn(\n+ _span: Span,\n+ ident: Option<Ident>,\n+ function: Function,\n+ ) -> Result<Self, SyntaxError> {\n+ Ok(Box::new(Expr::Fn(FnExpr { ident, function })))\n}\n- fn finish_class(_span: Span, ident: Option<Ident>, class: Class) -> Self {\n- Box::new(Expr::Class(ClassExpr { ident, class }))\n+ fn finish_class(_span: Span, ident: Option<Ident>, class: Class) -> Result<Self, SyntaxError> {\n+ Ok(Box::new(Expr::Class(ClassExpr { ident, class })))\n}\n}\nimpl OutputType for ExportDefaultDecl {\n- type Ident = Option<Ident>;\n-\n- fn is_constructor(ident: &Self::Ident) -> bool {\n- match *ident {\n- Some(ref i) => i.sym == js_word!(\"constructor\"),\n- _ => false,\n- }\n- }\n-\n- fn finish_fn(span: Span, ident: Option<Ident>, function: Function) -> Self {\n- ExportDefaultDecl {\n+ const IS_IDENT_REQUIRED: bool = false;\n+\n+ fn finish_fn(\n+ span: Span,\n+ ident: Option<Ident>,\n+ function: Function,\n+ ) -> Result<Self, SyntaxError> {\n+ Ok(ExportDefaultDecl {\nspan,\ndecl: DefaultDecl::Fn(FnExpr { ident, function }),\n- }\n+ })\n}\n- fn finish_class(span: Span, ident: Option<Ident>, class: Class) -> Self {\n- ExportDefaultDecl {\n+ fn finish_class(span: Span, ident: Option<Ident>, class: Class) -> Result<Self, SyntaxError> {\n+ Ok(ExportDefaultDecl {\nspan,\ndecl: DefaultDecl::Class(ClassExpr { ident, class }),\n- }\n+ })\n}\n}\nimpl OutputType for Decl {\n- type Ident = Ident;\n+ const IS_IDENT_REQUIRED: bool = true;\n- fn is_constructor(i: &Self::Ident) -> bool {\n- i.sym == js_word!(\"constructor\")\n- }\n+ fn finish_fn(\n+ _span: Span,\n+ ident: Option<Ident>,\n+ function: Function,\n+ ) -> Result<Self, SyntaxError> {\n+ let ident = ident.ok_or(SyntaxError::ExpectedIdent)?;\n- fn finish_fn(_span: Span, ident: Ident, function: Function) -> Self {\n- Decl::Fn(FnDecl {\n+ Ok(Decl::Fn(FnDecl {\ndeclare: false,\nident,\nfunction,\n- })\n+ }))\n}\n- fn finish_class(_: Span, ident: Ident, class: Class) -> Self {\n- Decl::Class(ClassDecl {\n+ fn finish_class(_: Span, ident: Option<Ident>, class: Class) -> Result<Self, SyntaxError> {\n+ let ident = ident.ok_or(SyntaxError::ExpectedIdent)?;\n+\n+ Ok(Decl::Class(ClassDecl {\ndeclare: false,\nident,\nclass,\n- })\n+ }))\n}\n}\n",
"new_path": "crates/swc_ecma_parser/src/parser/class_and_fn.rs",
"old_path": "crates/swc_ecma_parser/src/parser/class_and_fn.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -159,17 +159,3 @@ impl<'a, I: Tokens> Parser<I> {\nOk(Ident::new(word, span!(self, start)))\n}\n}\n-\n-pub(super) trait MaybeOptionalIdentParser<Ident> {\n- fn parse_maybe_opt_binding_ident(&mut self) -> PResult<Ident>;\n-}\n-impl<I: Tokens> MaybeOptionalIdentParser<Ident> for Parser<I> {\n- fn parse_maybe_opt_binding_ident(&mut self) -> PResult<Ident> {\n- self.parse_binding_ident().map(|i| i.id)\n- }\n-}\n-impl<I: Tokens> MaybeOptionalIdentParser<Option<Ident>> for Parser<I> {\n- fn parse_maybe_opt_binding_ident(&mut self) -> PResult<Option<Ident>> {\n- self.parse_opt_binding_ident().map(|opt| opt.map(|i| i.id))\n- }\n-}\n",
"new_path": "crates/swc_ecma_parser/src/parser/ident.rs",
"old_path": "crates/swc_ecma_parser/src/parser/ident.rs"
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
perf(es/parser): Reduce usage of generics to reduce binary size (#3726)
| 1
|
perf
|
es/parser
|
71,395
|
25.02.2022 00:09:58
| -39,600
|
7e624d994c94dbd584643c4cb6e9f8df53dabc18
|
feat(eks): Allow helm pull from OCI repositories
The feature allows lambda to install charts from OCI repositories. This also adds login capabilities when the AWS registry is used.
Fixes
*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": "@@ -1144,6 +1144,24 @@ cluster.addHelmChart('test-chart', {\n});\n```\n+### OCI Charts\n+\n+OCI charts are also supported.\n+Also replace the `${VARS}` with appropriate values.\n+\n+```ts\n+declare const cluster: eks.Cluster;\n+// option 1: use a construct\n+new eks.HelmChart(this, 'MyOCIChart', {\n+ cluster,\n+ chart: 'some-chart',\n+ repository: 'oci://${ACCOUNT_ID}.dkr.ecr.${ACCOUNT_REGION}.amazonaws.com/${REPO_NAME}',\n+ namespace: 'oci',\n+ version: '0.0.1'\n+});\n+\n+```\n+\nHelm charts are implemented as CloudFormation resources in CDK.\nThis means that if the chart is deleted from your code (or the stack is\ndeleted), the next `cdk deploy` will issue a `helm uninstall` command and the\n",
"new_path": "packages/@aws-cdk/aws-eks/README.md",
"old_path": "packages/@aws-cdk/aws-eks/README.md"
},
{
"change_type": "MODIFY",
"diff": "import json\nimport logging\nimport os\n+import re\nimport subprocess\nimport shutil\n+import tempfile\nimport zipfile\nfrom urllib.parse import urlparse, unquote\n@@ -78,6 +80,12 @@ def helm_handler(event, context):\n# future work: support versions from s3 assets\nchart = get_chart_asset_from_url(chart_asset_url)\n+ if repository.startswith('oci://'):\n+ assert(repository is not None)\n+ tmpdir = tempfile.TemporaryDirectory()\n+ chart_dir = get_chart_from_oci(tmpdir.name, release, repository, version)\n+ chart = chart_dir\n+\nhelm('upgrade', release, chart, repository, values_file, namespace, version, wait, timeout, create_namespace)\nelif request_type == \"Delete\":\ntry:\n@@ -85,6 +93,58 @@ def helm_handler(event, context):\nexcept Exception as e:\nlogger.info(\"delete error: %s\" % e)\n+\n+def get_oci_cmd(repository, version):\n+\n+ cmnd = []\n+ pattern = '\\d+.dkr.ecr.[a-z]+-[a-z]+-\\d.amazonaws.com'\n+\n+ registry = repository.rsplit('/', 1)[0].replace('oci://', '')\n+\n+ if re.fullmatch(pattern, registry) is not None:\n+ region = registry.replace('.amazonaws.com', '').split('.')[-1]\n+ cmnd = [\n+ f\"aws ecr get-login-password --region {region} | \" \\\n+ f\"helm registry login --username AWS --password-stdin {registry}; helm pull {repository} --version {version} --untar\"\n+ ]\n+ else:\n+ logger.info(\"Non AWS OCI repository found\")\n+ cmnd = ['HELM_EXPERIMENTAL_OCI=1', 'helm', 'pull', repository, '--version', version, '--untar']\n+\n+ return cmnd\n+\n+\n+def get_chart_from_oci(tmpdir, release, repository = None, version = None):\n+\n+ cmnd = get_oci_cmd(repository, version)\n+\n+ maxAttempts = 3\n+ retry = maxAttempts\n+ while retry > 0:\n+ try:\n+ logger.info(cmnd)\n+ env = get_env_with_oci_flag()\n+ output = subprocess.check_output(cmnd, stderr=subprocess.STDOUT, cwd=tmpdir, env=env, shell=True)\n+ logger.info(output)\n+\n+ return os.path.join(tmpdir, release)\n+ except subprocess.CalledProcessError as exc:\n+ output = exc.output\n+ if b'Broken pipe' in output:\n+ retry = retry - 1\n+ logger.info(\"Broken pipe, retries left: %s\" % retry)\n+ else:\n+ raise Exception(output)\n+ raise Exception(f'Operation failed after {maxAttempts} attempts: {output}')\n+\n+\n+def get_env_with_oci_flag():\n+ env = os.environ.copy()\n+ env['HELM_EXPERIMENTAL_OCI'] = '1'\n+\n+ return env\n+\n+\ndef helm(verb, release, chart = None, repo = None, file = None, namespace = None, version = None, wait = False, timeout = None, create_namespace = None):\nimport subprocess\n@@ -113,7 +173,8 @@ def helm(verb, release, chart = None, repo = None, file = None, namespace = None\nretry = maxAttempts\nwhile retry > 0:\ntry:\n- output = subprocess.check_output(cmnd, stderr=subprocess.STDOUT, cwd=outdir)\n+ env = get_env_with_oci_flag()\n+ output = subprocess.check_output(cmnd, stderr=subprocess.STDOUT, cwd=outdir, env=env)\nlogger.info(output)\nreturn\nexcept subprocess.CalledProcessError as exc:\n",
"new_path": "packages/@aws-cdk/aws-eks/lib/kubectl-handler/helm/__init__.py",
"old_path": "packages/@aws-cdk/aws-eks/lib/kubectl-handler/helm/__init__.py"
},
{
"change_type": "MODIFY",
"diff": "@@ -168,6 +168,11 @@ export class KubectlProvider extends NestedStack implements IKubectlProvider {\nresources: [cluster.clusterArn],\n}));\n+ // For OCI helm chart authorization.\n+ this.handlerRole.addManagedPolicy(\n+ iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonEC2ContainerRegistryReadOnly'),\n+ );\n+\n// allow this handler to assume the kubectl role\ncluster.kubectlRole.grant(this.handlerRole, 'sts:AssumeRole');\n",
"new_path": "packages/@aws-cdk/aws-eks/lib/kubectl-provider.ts",
"old_path": "packages/@aws-cdk/aws-eks/lib/kubectl-provider.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -2107,7 +2107,41 @@ describe('cluster', () => {\n],\n});\n-\n+ Template.fromStack(providerStack).hasResourceProperties('AWS::IAM::Role', {\n+ AssumeRolePolicyDocument: {\n+ Statement: [\n+ {\n+ Action: 'sts:AssumeRole',\n+ Effect: 'Allow',\n+ Principal: { Service: 'lambda.amazonaws.com' },\n+ },\n+ ],\n+ Version: '2012-10-17',\n+ },\n+ ManagedPolicyArns: [\n+ {\n+ 'Fn::Join': ['', [\n+ 'arn:',\n+ { Ref: 'AWS::Partition' },\n+ ':iam::aws:policy/service-role/AWSLambdaBasicExecutionRole',\n+ ]],\n+ },\n+ {\n+ 'Fn::Join': ['', [\n+ 'arn:',\n+ { Ref: 'AWS::Partition' },\n+ ':iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole',\n+ ]],\n+ },\n+ {\n+ 'Fn::Join': ['', [\n+ 'arn:',\n+ { Ref: 'AWS::Partition' },\n+ ':iam::aws:policy/AmazonEC2ContainerRegistryReadOnly',\n+ ]],\n+ },\n+ ],\n+ });\n});\ntest('coreDnsComputeType will patch the coreDNS configuration to use a \"fargate\" compute type and restore to \"ec2\" upon removal', () => {\n@@ -2274,8 +2308,42 @@ describe('cluster', () => {\n},\n});\n+ Template.fromStack(providerStack).hasResourceProperties('AWS::IAM::Role', {\n+ AssumeRolePolicyDocument: {\n+ Statement: [\n+ {\n+ Action: 'sts:AssumeRole',\n+ Effect: 'Allow',\n+ Principal: { Service: 'lambda.amazonaws.com' },\n+ },\n+ ],\n+ Version: '2012-10-17',\n+ },\n+ ManagedPolicyArns: [\n+ {\n+ 'Fn::Join': ['', [\n+ 'arn:',\n+ { Ref: 'AWS::Partition' },\n+ ':iam::aws:policy/service-role/AWSLambdaBasicExecutionRole',\n+ ]],\n+ },\n+ {\n+ 'Fn::Join': ['', [\n+ 'arn:',\n+ { Ref: 'AWS::Partition' },\n+ ':iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole',\n+ ]],\n+ },\n+ {\n+ 'Fn::Join': ['', [\n+ 'arn:',\n+ { Ref: 'AWS::Partition' },\n+ ':iam::aws:policy/AmazonEC2ContainerRegistryReadOnly',\n+ ]],\n+ },\n+ ],\n+ });\n});\n-\n});\ntest('kubectl provider passes security group to provider', () => {\n",
"new_path": "packages/@aws-cdk/aws-eks/test/cluster.test.ts",
"old_path": "packages/@aws-cdk/aws-eks/test/cluster.test.ts"
}
] |
TypeScript
|
Apache License 2.0
|
aws/aws-cdk
|
feat(eks): Allow helm pull from OCI repositories (#18547)
The feature allows lambda to install charts from OCI repositories. This also adds login capabilities when the AWS registry is used.
Fixes - https://github.com/aws/aws-cdk/issues/18001
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
| 1
|
feat
|
eks
|
756,013
|
25.02.2022 01:13:25
| 21,600
|
e40259330bbde2efd74af55f1830e27fea02dd12
|
fix(deployment): correct `cosmos-delegates.txt` discrepency
|
[
{
"change_type": "MODIFY",
"diff": "@@ -3,6 +3,7 @@ set -e\nthisdir=$(dirname -- \"$0\")\nFAUCET_HOME=$thisdir/../faucet\n+DELEGATES=\"$thisdir/cosmos-delegates.txt\"\nMAX_LINES=-1\nSTAKE=75000000ubld\n@@ -87,12 +88,12 @@ while [[ ${#rpcAddrs[@]} -gt 0 ]]; do\nNAME=$1\nADDR=$2\n- if [[ $UNIQUE != no && $MAX_LINES -ge 0 && $(wc -l \"$thisdir\"/cosmos-delegates.txt | sed -e 's/ .*//') -ge $MAX_LINES ]]; then\n+ if [[ $UNIQUE != no && $MAX_LINES -ge 0 && $(wc -l \"$DELEGATES\" | sed -e 's/ .*//') -ge $MAX_LINES ]]; then\necho \"Sorry, we've capped the number of validators at $MAX_LINES\"\nexit 1\nfi\nif [[ $UNIQUE != no ]]; then\n- line=$(grep -e \":$NAME$\" \"$thisdir\"/cosmos-delegates.txt || true)\n+ line=$(grep -e \":$NAME$\" \"$DELEGATES\" || true)\nif [[ -n $line ]]; then\necho \"$NAME has already tapped the faucet:\" 1>&2\necho \"$line\" 1>&2\n@@ -100,7 +101,7 @@ while [[ ${#rpcAddrs[@]} -gt 0 ]]; do\nfi\nfi\nif [[ $UNIQUE != no ]]; then\n- line=$(grep -e \"^$ADDR:\" \"$thisdir\"/cosmos-delegates.txt || true)\n+ line=$(grep -e \"^$ADDR:\" \"$DELEGATES\" || true)\nif [[ -n $line ]]; then\necho \"$ADDR already received a tap:\" 1>&2\necho \"$line\" 1>&2\n@@ -113,9 +114,9 @@ while [[ ${#rpcAddrs[@]} -gt 0 ]]; do\n--broadcast-mode=block \\\n-- faucet \"$ADDR\" \"$STAKE\"; then\n# Record the information before exiting, if the file exists.\n- test -f \"$thisdir\"/cosmos-delegates || exit 0\n- sed -i -e \"/:$NAME$/d\" \"$thisdir\"/cosmos-delegates.txt\n- echo \"$ADDR:$STAKE:$NAME\" >> \"$thisdir\"/cosmos-delegates.txt\n+ test -f \"$DELEGATES\" || exit 0\n+ sed -i -e \"/:$NAME$/d\" \"$DELEGATES\"\n+ echo \"$ADDR:$STAKE:$NAME\" >> \"$DELEGATES\"\nexit 0\nfi\n;;\n",
"new_path": "packages/deployment/ansible/roles/cosmos-genesis/files/faucet-helper.sh",
"old_path": "packages/deployment/ansible/roles/cosmos-genesis/files/faucet-helper.sh"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
fix(deployment): correct `cosmos-delegates.txt` discrepency
| 1
|
fix
|
deployment
|
756,013
|
25.02.2022 01:15:21
| 21,600
|
c9a59fed9f247332f93f56432c97c2bd756eff6e
|
fix(oracle): wake up to update priceAggregator push-only oracles
|
[
{
"change_type": "MODIFY",
"diff": "@@ -84,12 +84,20 @@ const start = async zcf => {\nasync wake(timestamp) {\n// Run all the queriers.\nconst querierPs = [];\n- oracleRecords.forEach(({ querier }) => {\n+ const samples = [];\n+ oracleRecords.forEach(({ querier, lastSample }) => {\nif (querier) {\nquerierPs.push(querier(timestamp));\n}\n+ // Push result.\n+ samples.push(lastSample);\n});\n- await Promise.all(querierPs);\n+ if (!querierPs.length) {\n+ // Only have push results, so publish them.\n+ // eslint-disable-next-line no-use-before-define\n+ querierPs.push(updateQuote(samples, timestamp));\n+ }\n+ await Promise.all(querierPs).catch(console.error);\n},\n});\nE(repeaterP).schedule(waker);\n@@ -174,7 +182,6 @@ const start = async zcf => {\n{ add, divide: floorDivide, isGTE },\n);\n- // console.error('found median', median, 'of', samples);\nif (median === undefined) {\nreturn;\n}\n@@ -260,7 +267,7 @@ const start = async zcf => {\nassert(records.has(record), X`Oracle record is already deleted`);\n/** @type {OracleAdmin} */\n- const oracleAdmin = {\n+ const oracleAdmin = Far('OracleAdmin', {\nasync delete() {\nassert(records.has(record), X`Oracle record is already deleted`);\n@@ -289,11 +296,11 @@ const start = async zcf => {\n// the median calculation.\npushResult(result);\n},\n- };\n+ });\nif (query === undefined) {\n// They don't want to be polled.\n- return harden(oracleAdmin);\n+ return oracleAdmin;\n}\nlet lastWakeTimestamp = 0n;\n@@ -320,7 +327,7 @@ const start = async zcf => {\nawait record.querier(now);\n// Return the oracle admin object.\n- return harden(oracleAdmin);\n+ return oracleAdmin;\n},\n});\n",
"new_path": "packages/zoe/src/contracts/priceAggregator.js",
"old_path": "packages/zoe/src/contracts/priceAggregator.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -434,7 +434,7 @@ const start = async zcf => {\nconst rrId = reportingRoundId;\nlet canSupersede = true;\n- if (_roundId !== 1n) {\n+ if (_roundId > 1n) {\ncanSupersede = supersedable(subtract(_roundId, 1), blockTimestamp);\n}\n@@ -614,7 +614,9 @@ const start = async zcf => {\noracleInstance,\nblockTimestamp,\n);\n- roundId = suggestedRound.queriedRoundId;\n+ roundId = suggestedRound.eligibleForSpecificRound\n+ ? suggestedRound.queriedRoundId\n+ : add(suggestedRound.queriedRoundId, 1);\n} else {\nroundId = Nat(_roundIdRaw);\n}\n@@ -684,7 +686,7 @@ const start = async zcf => {\npushResult({\nroundId: _roundIdRaw,\ndata: _submissionRaw,\n- });\n+ }).catch(console.error);\n},\n};\n",
"new_path": "packages/zoe/src/contracts/priceAggregatorChainlink.js",
"old_path": "packages/zoe/src/contracts/priceAggregatorChainlink.js"
}
] |
JavaScript
|
Apache License 2.0
|
agoric/agoric-sdk
|
fix(oracle): wake up to update priceAggregator push-only oracles
| 1
|
fix
|
oracle
|
711,597
|
25.02.2022 09:34:02
| -3,600
|
d05b32afa6e5530d9baa23d97c4b147ce1965a16
|
test(core): Change DataImportModule imports to not break tests
|
[
{
"change_type": "MODIFY",
"diff": "@@ -15,7 +15,7 @@ import { Populator } from './providers/populator/populator';\n// Important! PluginModule must be defined before ServiceModule\n// in order that overrides of Services (e.g. SearchService) are correctly\n// registered with the injector.\n- imports: [PluginModule.forRoot(), ServiceModule, ConnectionModule.forRoot(), ConfigModule],\n+ imports: [PluginModule.forRoot(), ServiceModule, ConnectionModule.forPlugin(), ConfigModule],\nexports: [ImportParser, Importer, Populator, FastImporterService, AssetImporter],\nproviders: [ImportParser, Importer, Populator, FastImporterService, AssetImporter],\n})\n",
"new_path": "packages/core/src/data-import/data-import.module.ts",
"old_path": "packages/core/src/data-import/data-import.module.ts"
}
] |
TypeScript
|
MIT License
|
vendure-ecommerce/vendure
|
test(core): Change DataImportModule imports to not break tests
| 1
|
test
|
core
|
865,918
|
25.02.2022 09:42:39
| -3,600
|
746759bef9dfefc13395d2723309387adc0377d0
|
CI: pin windows version to `windows-2019`
|
[
{
"change_type": "MODIFY",
"diff": "@@ -4,7 +4,7 @@ jobs:\nBuild:\nstrategy:\nmatrix:\n- os: [ ubuntu-latest, macos-10.15, windows-latest ]\n+ os: [ ubuntu-latest, macos-10.15, windows-2019 ]\nruns-on: ${{ matrix.os }}\nsteps:\n",
"new_path": ".github/workflows/CI.yml",
"old_path": ".github/workflows/CI.yml"
}
] |
JavaScript
|
MIT License
|
camunda/camunda-modeler
|
CI: pin windows version to `windows-2019`
| 1
|
ci
| null |
126,276
|
25.02.2022 10:23:10
| 10,800
|
f67437c129f9b0d79042f759b75b4feb0b56616a
|
test(embedded/store): test store with inconsistent index
|
[
{
"change_type": "MODIFY",
"diff": "@@ -462,11 +462,10 @@ func TestImmudbStoreEdgeCases(t *testing.T) {\nvLog.CloseFn = func() error { return nil }\ntxLog.CloseFn = func() error { return nil }\ncLog.CloseFn = func() error { return nil }\n+\n_, err = OpenWith(\"edge_cases\", vLogs, txLog, cLog,\noptsCopy.WithAppFactory(func(rootPath, subPath string, opts *multiapp.Options) (appendable.Appendable, error) {\n- switch subPath {\n- case \"index/nodes\":\n- return &mocked.MockedAppendable{\n+ nLog := &mocked.MockedAppendable{\nReadAtFn: func(bs []byte, off int64) (int, error) {\nbuff := []byte{\ntbtree.LeafNodeType,\n@@ -482,27 +481,47 @@ func TestImmudbStoreEdgeCases(t *testing.T) {\nrequire.Less(t, off, int64(len(buff)))\nreturn copy(bs, buff[off:]), nil\n},\n+ SyncFn: func() error { return nil },\nCloseFn: func() error { return nil },\n- }, nil\n- case \"index/history\":\n- return &mocked.MockedAppendable{\n+ }\n+\n+ hLog := &mocked.MockedAppendable{\nSetOffsetFn: func(off int64) error { return nil },\nSizeFn: func() (int64, error) {\nreturn 0, nil\n},\n+ SyncFn: func() error { return nil },\nCloseFn: func() error { return nil },\n- }, nil\n+ }\n+\n+ switch subPath {\n+ case \"index/nodes\":\n+ return nLog, nil\n+ case \"index/history\":\n+ return hLog, nil\ncase \"index/commit\":\nreturn &mocked.MockedAppendable{\nSizeFn: func() (int64, error) {\n// One clog entry\n- return 16, nil\n+ return 100, nil\n},\nAppendFn: func(bs []byte) (off int64, n int, err error) {\nreturn 0, 0, nil\n},\nReadAtFn: func(bs []byte, off int64) (int, error) {\n- buff := []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}\n+ buff := [20 + 32 + 16 + 32]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 33}\n+ nLogChecksum, err := appendable.Checksum(nLog, 0, 33)\n+ if err != nil {\n+ return 0, err\n+ }\n+ copy(buff[20:], nLogChecksum[:])\n+\n+ hLogChecksum, err := appendable.Checksum(hLog, 0, 0)\n+ if err != nil {\n+ return 0, err\n+ }\n+ copy(buff[20+32+16:], hLogChecksum[:])\n+\nrequire.Less(t, off, int64(len(buff)))\nreturn copy(bs, buff[off:]), nil\n},\n",
"new_path": "embedded/store/immustore_test.go",
"old_path": "embedded/store/immustore_test.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -118,11 +118,14 @@ func (e *cLogEntry) serialize() []byte {\nreturn b[:]\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+func (e *cLogEntry) isValid() bool {\n+ return e.initialHLogSize <= e.finalNLogSize &&\n+ e.rootNodeSize > 0 &&\n+ int64(e.rootNodeSize) <= e.finalNLogSize &&\n+ e.initialHLogSize <= e.finalHLogSize\n}\n+func (e *cLogEntry) deserialize(b []byte) {\ne.synced = b[0]&0x80 == 0\nb[0] &= 0x7F // remove syncing flag\n@@ -137,10 +140,6 @@ func (e *cLogEntry) deserialize(b []byte) (int, error) {\ne.rootNodeSize = int(binary.BigEndian.Uint32(b[i:]))\ni += 4\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-\ncopy(e.nLogChecksum[:], b[i:])\ni += sha256.Size\n@@ -150,14 +149,8 @@ func (e *cLogEntry) deserialize(b []byte) (int, error) {\ne.finalHLogSize = int64(binary.BigEndian.Uint64(b[i:]))\ni += 8\n- if e.initialHLogSize > e.finalHLogSize {\n- return i, fmt.Errorf(\"%w: while deserializing index commit log entry\", ErrCorruptedCLog)\n- }\n-\ncopy(e.hLogChecksum[:], b[i:])\ni += sha256.Size\n-\n- return i, nil\n}\n// TBTree implements a timed-btree\n@@ -553,11 +546,14 @@ func OpenWith(path string, nLog, hLog, cLog appendable.Appendable, opts *Options\n}\ncLogEntry := &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+ cLogEntry.deserialize(b[:])\n+\n+ mustDiscard := !cLogEntry.isValid()\n+ if mustDiscard {\n+ err = fmt.Errorf(\"invalid clog entry\")\n}\n+ if !mustDiscard {\nnLogChecksum, nerr := appendable.Checksum(t.nLog, cLogEntry.initialNLogSize, cLogEntry.finalNLogSize-cLogEntry.initialNLogSize)\nif nerr != nil && nerr != io.EOF {\nreturn nil, fmt.Errorf(\"%w: while calculating nodes log checksum at '%s'\", nerr, path)\n@@ -568,13 +564,16 @@ func OpenWith(path string, nLog, hLog, cLog appendable.Appendable, opts *Options\nreturn nil, fmt.Errorf(\"%w: while calculating history log checksum at '%s'\", herr, path)\n}\n- mustDiscard := nerr == io.EOF ||\n+ mustDiscard = nerr == io.EOF ||\nherr == io.EOF ||\nnLogChecksum != cLogEntry.nLogChecksum ||\nhLogChecksum != cLogEntry.hLogChecksum\n+ err = fmt.Errorf(\"invalid checksum\")\n+ }\n+\nif mustDiscard {\n- t.log.Infof(\"Discarding snapshots due to checksum mismatch at '%s'\", path)\n+ t.log.Infof(\"Discarding snapshots due to %w at '%s'\", err, path)\ndiscardedCLogEntries += int(t.committedLogSize/cLogEntrySize) + 1\n",
"new_path": "embedded/tbtree/tbtree.go",
"old_path": "embedded/tbtree/tbtree.go"
}
] |
Go
|
Apache License 2.0
|
codenotary/immudb
|
test(embedded/store): test store with inconsistent index
Signed-off-by: Jeronimo Irazabal <jeronimo.irazabal@gmail.com>
| 1
|
test
|
embedded/store
|
217,922
|
25.02.2022 10:30:27
| -3,600
|
27f26576c8604d7e950cd70795e8f6a72d5a62e7
|
fix(log): fixed Rime Dolomite now shown in the right category
|
[
{
"change_type": "MODIFY",
"diff": "@@ -74,9 +74,9 @@ export class LogsExtractor extends AbstractExtractor {\n} else if (row.ID >= 2010 && row.ID <= 2012) {\nreturn [\n// Quarrying, Mining, Logging, Harvesting\n- [-1, -1, -1, 2027], // Ilsabard\n+ [-1, 2024, -1, 2027], // Ilsabard\n[-1, 2029, -1, 2031], // Sea of Stars\n- [2033, 2024, 2034, -1] // World Sundered\n+ [2033, -1, 2034, -1] // World Sundered\n][row.ID - 2010][index] || -1;\n} else if ([2006, 2007, 2008, 2009].includes(row.ID)) {\nreturn -1;\n",
"new_path": "apps/data-extraction/src/extractors/logs.extractor.ts",
"old_path": "apps/data-extraction/src/extractors/logs.extractor.ts"
}
] |
TypeScript
|
MIT License
|
ffxiv-teamcraft/ffxiv-teamcraft
|
fix(log): fixed Rime Dolomite now shown in the right category
| 1
|
fix
|
log
|
756,043
|
25.02.2022 10:57:33
| 28,800
|
527850eaa4113512ed1a52b66f9c7fff7549562d
|
refactor(run-protocol): getDebtAmount -> getCurrentDebt
|
[
{
"change_type": "MODIFY",
"diff": "@@ -38,7 +38,7 @@ node \"Vat\" {\ncircle makeAdjustBalancesInvitation\nmakeAdjustBalancesInvitation -u-> AdjustBalancesInvitation\ncircle getCollateralAmount\n- circle getDebtAmount\n+ circle getCurrentDebt\ncircle getLiquidationSeat\ngetLiquidationSeat -u-> LiquidationSeat\n}\n@@ -51,7 +51,7 @@ Borrower -d-> LiquidationPromise: did loan get liquidated?\nBorrower -> AdjustBalancesInvitation: add or remove collateral or \\nincrease or decrease the loan balance\nBorrower -l-> CloseVaultInvitation: close loan and withdraw \\nany remaining collateral\nvfc -d-> makeAddTypeInvitation\n-Borrower -d-> getDebtAmount: how much do I owe\n+Borrower -d-> getCurrentDebt: how much do I owe\nBorrower -d-> getCollateralAmount: how much did I \\ndeposit as collateral\n@enduml\n\\ No newline at end of file\n",
"new_path": "docs/threat_models/vaultFactory/vaultFactory.puml",
"old_path": "docs/threat_models/vaultFactory/vaultFactory.puml"
},
{
"change_type": "MODIFY",
"diff": "@@ -26,7 +26,7 @@ const trace = makeTracer('LIQ');\n*/\nconst liquidate = async (zcf, vault, burnLosses, strategy, collateralBrand) => {\nvault.liquidating();\n- const runDebt = vault.getDebtAmount();\n+ const runDebt = vault.getCurrentDebt();\nconst { brand: runBrand } = runDebt;\nconst liquidationSeat = vault.getInnerLiquidationSeat();\nconst vaultSeat = vault.getVaultSeat();\n",
"new_path": "packages/run-protocol/src/vaultFactory/liquidation.js",
"old_path": "packages/run-protocol/src/vaultFactory/liquidation.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -27,7 +27,7 @@ export const makeOrderedVaultStore = () => {\n* @param {InnerVault} vault\n*/\nconst addVault = (vaultId, vault) => {\n- const debt = vault.getDebtAmount();\n+ const debt = vault.getCurrentDebt();\nconst collateral = vault.getCollateralAmount();\nconst key = toVaultKey(debt, collateral, vaultId);\nstore.init(key, vault);\n",
"new_path": "packages/run-protocol/src/vaultFactory/orderedVaultStore.js",
"old_path": "packages/run-protocol/src/vaultFactory/orderedVaultStore.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -30,7 +30,10 @@ const calculateDebtToCollateral = (debtAmount, collateralAmount) => {\n* @returns {Ratio}\n*/\nexport const currentDebtToCollateral = vault =>\n- calculateDebtToCollateral(vault.getDebtAmount(), vault.getCollateralAmount());\n+ calculateDebtToCollateral(\n+ vault.getCurrentDebt(),\n+ vault.getCollateralAmount(),\n+ );\n/** @typedef {{debtToCollateral: Ratio, vault: InnerVault}} VaultRecord */\n@@ -84,7 +87,7 @@ export const makePrioritizedVaults = reschedulePriceCheck => {\n// Would be an infinite ratio\nreturn undefined;\n}\n- const actualDebtAmount = vault.getDebtAmount();\n+ const actualDebtAmount = vault.getCurrentDebt();\nreturn makeRatioFromAmounts(actualDebtAmount, vault.getCollateralAmount());\n};\n",
"new_path": "packages/run-protocol/src/vaultFactory/prioritizedVaults.js",
"old_path": "packages/run-protocol/src/vaultFactory/prioritizedVaults.js"
},
{
"change_type": "MODIFY",
"diff": "/**\n* @typedef {Object} BaseVault\n* @property {() => Amount<NatValue>} getCollateralAmount\n- * @property {() => Amount<NatValue>} getDebtAmount\n+ * @property {() => Amount<NatValue>} getCurrentDebt\n* @property {() => Amount<NatValue>} getNormalizedDebt\n*\n* @typedef {BaseVault & VaultMixin} Vault\n",
"new_path": "packages/run-protocol/src/vaultFactory/types.js",
"old_path": "packages/run-protocol/src/vaultFactory/types.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -83,7 +83,7 @@ const makeOuterKit = inner => {\n},\n// for status/debugging\ngetCollateralAmount: () => assertActive(vault).getCollateralAmount(),\n- getDebtAmount: () => assertActive(vault).getDebtAmount(),\n+ getCurrentDebt: () => assertActive(vault).getCurrentDebt(),\ngetNormalizedDebt: () => assertActive(vault).getNormalizedDebt(),\ngetLiquidationSeat: () => assertActive(vault).getLiquidationSeat(),\n});\n@@ -205,8 +205,7 @@ export const makeInnerVault = (\n* @see getNormalizedDebt\n* @returns {Amount<NatValue>}\n*/\n- // TODO rename to getActualDebtAmount throughout codebase https://github.com/Agoric/agoric-sdk/issues/4540\n- const getDebtAmount = () => {\n+ const getCurrentDebt = () => {\n// divide compounded interest by the snapshot\nconst interestSinceSnapshot = multiplyRatios(\nmanager.getCompoundedInterest(),\n@@ -287,7 +286,7 @@ export const makeInnerVault = (\nliquidationRatio: manager.getLiquidationMargin(),\ndebtSnapshot,\nlocked: getCollateralAmount(),\n- debt: getDebtAmount(),\n+ debt: getCurrentDebt(),\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@@ -366,7 +365,7 @@ export const makeInnerVault = (\n// you must pay off the entire remainder but if you offer too much, we won't\n// take more than you owe\n- const currentDebt = getDebtAmount();\n+ const currentDebt = getCurrentDebt();\nassert(\nAmountMath.isGTE(runReturned, currentDebt),\nX`You must pay off the entire debt ${runReturned} > ${currentDebt}`,\n@@ -482,7 +481,7 @@ export const makeInnerVault = (\n} else if (proposal.give.RUN) {\n// We don't allow runDebt to be negative, so we'll refund overpayments\n// TODO this is the same as in `transferRun`\n- const currentDebt = getDebtAmount();\n+ const currentDebt = getCurrentDebt();\nconst acceptedRun = AmountMath.isGTE(proposal.give.RUN, currentDebt)\n? currentDebt\n: proposal.give.RUN;\n@@ -507,7 +506,7 @@ export const makeInnerVault = (\n);\n} else if (proposal.give.RUN) {\n// We don't allow runDebt to be negative, so we'll refund overpayments\n- const currentDebt = getDebtAmount();\n+ const currentDebt = getCurrentDebt();\nconst acceptedRun = AmountMath.isGTE(proposal.give.RUN, currentDebt)\n? currentDebt\n: proposal.give.RUN;\n@@ -524,7 +523,7 @@ export const makeInnerVault = (\n*/\nconst loanFee = (proposal, runAfter) => {\nlet newDebt;\n- const currentDebt = getDebtAmount();\n+ const currentDebt = getCurrentDebt();\nlet toMint = AmountMath.makeEmpty(runBrand);\nlet fee = AmountMath.makeEmpty(runBrand);\nif (proposal.want.RUN) {\n@@ -549,7 +548,7 @@ export const makeInnerVault = (\n// the updater will change if we start a transfer\nconst oldUpdater = outerUpdater;\nconst proposal = clientSeat.getProposal();\n- const oldDebt = getDebtAmount();\n+ const oldDebt = getCurrentDebt();\nconst oldCollateral = getCollateralAmount();\nassertOnlyKeys(proposal, ['Collateral', 'RUN']);\n@@ -657,7 +656,7 @@ export const makeInnerVault = (\nAmountMath.isEmpty(debtSnapshot.run),\nX`vault must be empty initially`,\n);\n- const oldDebt = getDebtAmount();\n+ const oldDebt = getCurrentDebt();\nconst oldCollateral = getCollateralAmount();\ntrace('initVaultKit start: collateral', { oldDebt, oldCollateral });\n@@ -721,7 +720,7 @@ export const makeInnerVault = (\n// for status/debugging\ngetCollateralAmount,\n- getDebtAmount,\n+ getCurrentDebt,\ngetNormalizedDebt,\ngetLiquidationSeat: () => liquidationSeat,\n});\n",
"new_path": "packages/run-protocol/src/vaultFactory/vault.js",
"old_path": "packages/run-protocol/src/vaultFactory/vault.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -18,7 +18,7 @@ export function makeFakeInnerVault(\nconst vault = Far('Vault', {\ngetCollateralAmount: () => collateral,\ngetNormalizedDebt: () => debt,\n- getDebtAmount: () => debt,\n+ getCurrentDebt: () => debt,\nsetDebt: newDebt => (debt = newDebt),\nsetCollateral: newCollateral => (collateral = newCollateral),\ngetIdInManager: () => vaultId,\n",
"new_path": "packages/run-protocol/test/supports.js",
"old_path": "packages/run-protocol/test/supports.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -49,20 +49,20 @@ const build = async (log, zoe, brands, payments, timer) => {\n`at ${(await E(timer).getCurrentTimestamp()) / ONE_DAY} days: ${msg}`,\n);\n- timeLog(`Alice owes ${q(await E(vault).getDebtAmount())}`);\n+ timeLog(`Alice owes ${q(await E(vault).getCurrentDebt())}`);\n// accrue one day of interest at initial rate\nawait E(timer).tick();\n- timeLog(`Alice owes ${q(await E(vault).getDebtAmount())}`);\n+ timeLog(`Alice owes ${q(await E(vault).getCurrentDebt())}`);\n// advance time enough that governance updates the interest rate\nawait Promise.all(new Array(daysForVoting).fill(E(timer).tick()));\ntimeLog('vote ready to close');\n- timeLog(`Alice owes ${q(await E(vault).getDebtAmount())}`);\n+ timeLog(`Alice owes ${q(await E(vault).getCurrentDebt())}`);\nawait E(timer).tick();\ntimeLog('vote closed');\n- timeLog(`Alice owes ${q(await E(vault).getDebtAmount())}`);\n+ timeLog(`Alice owes ${q(await E(vault).getCurrentDebt())}`);\nconst uiDescription = async () => {\nconst current = await E(uiNotifier).getUpdateSince();\n@@ -72,7 +72,7 @@ const build = async (log, zoe, brands, payments, timer) => {\ntimeLog(`1 day after votes cast, ${await uiDescription()}`);\nawait E(timer).tick();\ntimeLog(`2 days after votes cast, ${await uiDescription()}`);\n- timeLog(`Alice owes ${q(await E(vault).getDebtAmount())}`);\n+ timeLog(`Alice owes ${q(await E(vault).getCurrentDebt())}`);\n};\nreturn Far('build', {\n",
"new_path": "packages/run-protocol/test/vaultFactory/swingsetTests/governance/vat-alice.js",
"old_path": "packages/run-protocol/test/vaultFactory/swingsetTests/governance/vat-alice.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -36,9 +36,9 @@ const build = async (log, zoe, brands, payments, timer) => {\n);\nconst { vault } = await E(loanSeat).getOfferResult();\n- log(`Alice owes ${q(await E(vault).getDebtAmount())} after borrowing`);\n+ log(`Alice owes ${q(await E(vault).getCurrentDebt())} after borrowing`);\nawait E(timer).tick();\n- log(`Alice owes ${q(await E(vault).getDebtAmount())} after interest`);\n+ log(`Alice owes ${q(await E(vault).getCurrentDebt())} after interest`);\n};\nreturn Far('build', {\n",
"new_path": "packages/run-protocol/test/vaultFactory/swingsetTests/vaultFactory/vat-alice.js",
"old_path": "packages/run-protocol/test/vaultFactory/swingsetTests/vaultFactory/vat-alice.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -14,7 +14,7 @@ const mockVault = (runCount, collateralCount) => {\nconst collateralAmount = AmountMath.make(brand, collateralCount);\nreturn Far('vault', {\n- getDebtAmount: () => debtAmount,\n+ getCurrentDebt: () => debtAmount,\ngetCollateralAmount: () => collateralAmount,\n});\n};\n",
"new_path": "packages/run-protocol/test/vaultFactory/test-orderedVaultStore.js",
"old_path": "packages/run-protocol/test/vaultFactory/test-orderedVaultStore.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -240,13 +240,13 @@ test('highestRatio', async t => {\nconst debtsOverThreshold = [];\nArray.from(vaults.entriesPrioritizedGTE(percent(45))).map(([_key, vault]) =>\ndebtsOverThreshold.push([\n- vault.getDebtAmount(),\n+ vault.getCurrentDebt(),\nvault.getCollateralAmount(),\n]),\n);\nt.deepEqual(debtsOverThreshold, [\n- [fakeVault6.getDebtAmount(), fakeVault6.getCollateralAmount()],\n+ [fakeVault6.getCurrentDebt(), fakeVault6.getCollateralAmount()],\n]);\nt.deepEqual(vaults.highestRatio(), percent(50), 'expected 50% to be highest');\n});\n",
"new_path": "packages/run-protocol/test/vaultFactory/test-prioritizedVaults.js",
"old_path": "packages/run-protocol/test/vaultFactory/test-prioritizedVaults.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -98,7 +98,7 @@ test('charges', async t => {\nconst startingDebt = 74n;\nt.deepEqual(\n- vault.getDebtAmount(),\n+ vault.getCurrentDebt(),\nAmountMath.make(runBrand, startingDebt),\n'borrower owes 74 RUN',\n);\n@@ -114,7 +114,7 @@ test('charges', async t => {\ntestJig.advanceRecordingPeriod();\ninterest += charge;\nt.is(\n- vault.getDebtAmount().value,\n+ vault.getCurrentDebt().value,\nstartingDebt + interest,\n`interest charge ${i} should have been ${charge}`,\n);\n@@ -136,7 +136,7 @@ test('charges', async t => {\n);\nawait E(paybackSeat).getOfferResult();\nt.deepEqual(\n- vault.getDebtAmount(),\n+ vault.getCurrentDebt(),\nAmountMath.make(runBrand, startingDebt + interest - paybackValue),\n);\nconst normalizedPaybackValue = paybackValue + 1n;\n@@ -151,7 +151,7 @@ test('charges', async t => {\ntestJig.advanceRecordingPeriod();\ninterest += charge;\nt.is(\n- vault.getDebtAmount().value,\n+ vault.getCurrentDebt().value,\nstartingDebt + interest - paybackValue,\n`interest charge ${i} should have been ${charge}`,\n);\n",
"new_path": "packages/run-protocol/test/vaultFactory/test-vault-interest.js",
"old_path": "packages/run-protocol/test/vaultFactory/test-vault-interest.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -100,7 +100,7 @@ test('first', async t => {\nconst { issuer: cIssuer, mint: cMint, brand: cBrand } = collateralKit;\nt.deepEqual(\n- vault.getDebtAmount(),\n+ vault.getCurrentDebt(),\nAmountMath.make(runBrand, 74n),\n'borrower owes 74 RUN',\n);\n@@ -153,7 +153,7 @@ test('first', async t => {\ntrace('returnedCollateral', returnedCollateral, cIssuer);\nconst returnedAmount = await cIssuer.getAmountOf(returnedCollateral);\nt.deepEqual(\n- vault.getDebtAmount(),\n+ vault.getCurrentDebt(),\nAmountMath.make(runBrand, 71n),\n'debt reduced to 71 RUN',\n);\n@@ -188,7 +188,7 @@ test('bad collateral', async t => {\n'vault should hold 50 Collateral',\n);\nt.deepEqual(\n- vault.getDebtAmount(),\n+ vault.getCurrentDebt(),\nAmountMath.make(runBrand, 74n),\n'borrower owes 74 RUN',\n);\n",
"new_path": "packages/run-protocol/test/vaultFactory/test-vault.js",
"old_path": "packages/run-protocol/test/vaultFactory/test-vault.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -359,7 +359,7 @@ test('first', async t => {\n);\nconst { vault } = await E(loanSeat).getOfferResult();\n- const debtAmount = await E(vault).getDebtAmount();\n+ const debtAmount = await E(vault).getCurrentDebt();\nconst fee = ceilMultiplyBy(AmountMath.make(runBrand, 470n), rates.loanFee);\nt.deepEqual(\ndebtAmount,\n@@ -403,7 +403,7 @@ test('first', async t => {\nconst payouts = E(seat).getPayouts();\nconst { Collateral: returnedCollateral, RUN: returnedRun } = await payouts;\nt.deepEqual(\n- await E(vault).getDebtAmount(),\n+ await E(vault).getCurrentDebt(),\nAmountMath.make(runBrand, 294n),\n'debt reduced to 294 RUN',\n);\n@@ -425,7 +425,7 @@ test('first', async t => {\nawait E(aethVaultManager).liquidateAll();\nt.truthy(\n- AmountMath.isEmpty(await E(vault).getDebtAmount()),\n+ AmountMath.isEmpty(await E(vault).getCurrentDebt()),\n'debt is paid off',\n);\nt.truthy(\n@@ -504,7 +504,7 @@ test('price drop', async t => {\nconst { vault, uiNotifier } = await E(loanSeat).getOfferResult();\ntrace('offer result', vault);\n- const debtAmount = await E(vault).getDebtAmount();\n+ const debtAmount = await E(vault).getCurrentDebt();\nconst fee = ceilMultiplyBy(loanAmount, rates.loanFee);\nt.deepEqual(\ndebtAmount,\n@@ -539,7 +539,7 @@ test('price drop', async t => {\nt.falsy(notification.updateCount);\nt.is(notification.value.vaultState, Phase.LIQUIDATED);\n- const debtAmountAfter = await E(vault).getDebtAmount();\n+ const debtAmountAfter = await E(vault).getCurrentDebt();\nconst finalNotification = await E(uiNotifier).getUpdateSince();\nt.is(finalNotification.value.vaultState, Phase.LIQUIDATED);\nt.truthy(AmountMath.isEmpty(debtAmountAfter));\n@@ -616,7 +616,7 @@ test('price falls precipitously', async t => {\n/** @type {{vault: Vault}} */\nconst { vault } = await E(loanSeat).getOfferResult();\n- const debtAmount = await E(vault).getDebtAmount();\n+ const debtAmount = await E(vault).getCurrentDebt();\nconst fee = ceilMultiplyBy(AmountMath.make(runBrand, 370n), rates.loanFee);\nt.deepEqual(\ndebtAmount,\n@@ -650,7 +650,7 @@ test('price falls precipitously', async t => {\n);\nasync function assertDebtIs(value) {\n- const debt = await E(vault).getDebtAmount();\n+ const debt = await E(vault).getCurrentDebt();\nt.is(\ndebt.value,\nBigInt(value),\n@@ -670,7 +670,7 @@ test('price falls precipitously', async t => {\nawait manualTimer.tick();\nawait waitForPromisesToSettle();\n// An emergency liquidation got less than full value\n- const newDebtAmount = await E(vault).getDebtAmount();\n+ const newDebtAmount = await E(vault).getCurrentDebt();\nt.truthy(\nAmountMath.isGTE(AmountMath.make(runBrand, 70n), newDebtAmount),\n`Expected ${newDebtAmount.value} to be less than 70`,\n@@ -800,7 +800,7 @@ test('interest on multiple vaults', async t => {\naliceLoanSeat,\n).getOfferResult();\n- const debtAmount = await E(aliceVault).getDebtAmount();\n+ const debtAmount = await E(aliceVault).getCurrentDebt();\nconst fee = ceilMultiplyBy(aliceLoanAmount, rates.loanFee);\nt.deepEqual(\ndebtAmount,\n@@ -837,7 +837,7 @@ test('interest on multiple vaults', async t => {\nbobLoanSeat,\n).getOfferResult();\n- const bobDebtAmount = await E(bobVault).getDebtAmount();\n+ const bobDebtAmount = await E(bobVault).getCurrentDebt();\nconst bobFee = ceilMultiplyBy(bobLoanAmount, rates.loanFee);\nt.deepEqual(\nbobDebtAmount,\n@@ -940,7 +940,7 @@ test('interest on multiple vaults', async t => {\ndanLoanSeat,\n).getOfferResult();\nconst danActualDebt = wantedRun + 50n; // includes fees\n- t.is((await E(danVault).getDebtAmount()).value, danActualDebt);\n+ t.is((await E(danVault).getCurrentDebt()).value, danActualDebt);\nconst normalizedDebt = (await E(danVault).getNormalizedDebt()).value;\nt.true(\nnormalizedDebt < danActualDebt,\n@@ -1008,7 +1008,7 @@ test('adjust balances', async t => {\naliceLoanSeat,\n).getOfferResult();\n- let debtAmount = await E(aliceVault).getDebtAmount();\n+ let debtAmount = await E(aliceVault).getCurrentDebt();\nconst fee = ceilMultiplyBy(aliceLoanAmount, rates.loanFee);\nlet runDebtLevel = AmountMath.add(aliceLoanAmount, fee);\nlet collateralLevel = AmountMath.make(aethBrand, 1000n);\n@@ -1058,7 +1058,7 @@ test('adjust balances', async t => {\n);\nawait E(aliceAddCollateralSeat1).getOfferResult();\n- debtAmount = await E(aliceVault).getDebtAmount();\n+ debtAmount = await E(aliceVault).getCurrentDebt();\nt.deepEqual(debtAmount, runDebtLevel);\nconst { RUN: lentAmount2 } = await E(\n@@ -1111,7 +1111,7 @@ test('adjust balances', async t => {\nconst loanProceeds3 = await E(aliceAddCollateralSeat2).getPayouts();\nt.deepEqual(lentAmount3, AmountMath.make(runBrand, 50n));\n- debtAmount = await E(aliceVault).getDebtAmount();\n+ debtAmount = await E(aliceVault).getCurrentDebt();\nt.deepEqual(debtAmount, runDebtLevel);\nconst runLent3 = await loanProceeds3.RUN;\n@@ -1150,7 +1150,7 @@ test('adjust balances', async t => {\nawait E(aliceReduceCollateralSeat).getOfferResult();\n- debtAmount = await E(aliceVault).getDebtAmount();\n+ debtAmount = await E(aliceVault).getCurrentDebt();\nt.deepEqual(debtAmount, runDebtLevel);\nt.deepEqual(collateralLevel, await E(aliceVault).getCollateralAmount());\n@@ -1260,7 +1260,7 @@ test('transfer vault', async t => {\naliceLoanSeat,\n).getOfferResult();\n- const debtAmount = await E(aliceVault).getDebtAmount();\n+ const debtAmount = await E(aliceVault).getCurrentDebt();\n// TODO this should not need `await`\nconst transferInvite = await E(aliceVault).makeTransferInvitation();\n@@ -1268,8 +1268,8 @@ test('transfer vault', async t => {\nconst { vault: transferVault, uiNotifier: transferNotifier } = await E(\ntransferSeat,\n).getOfferResult();\n- t.throwsAsync(() => E(aliceVault).getDebtAmount());\n- const debtAfter = await E(transferVault).getDebtAmount();\n+ t.throwsAsync(() => E(aliceVault).getCurrentDebt());\n+ const debtAfter = await E(transferVault).getCurrentDebt();\nt.deepEqual(debtAmount, debtAfter, 'vault lent 5000 RUN + fees');\nconst collateralAfter = await E(transferVault).getCollateralAmount();\nt.deepEqual(collateralAmount, collateralAfter, 'vault has 1000n aEth');\n@@ -1319,8 +1319,8 @@ test('transfer vault', async t => {\nt2Seat,\n).getOfferResult();\nt.throwsAsync(async () => E(adjustPromise).getOfferResult());\n- t.throwsAsync(() => E(transferVault).getDebtAmount());\n- const debtAfter2 = await E(t2Vault).getDebtAmount();\n+ t.throwsAsync(() => E(transferVault).getCurrentDebt());\n+ const debtAfter2 = await E(t2Vault).getCurrentDebt();\nt.deepEqual(debtAmount, debtAfter2, 'vault lent 5000 RUN + fees');\nconst collateralAfter2 = await E(t2Vault).getCollateralAmount();\n@@ -1398,7 +1398,7 @@ test('overdeposit', async t => {\naliceLoanSeat,\n).getOfferResult();\n- let debtAmount = await E(aliceVault).getDebtAmount();\n+ let debtAmount = await E(aliceVault).getCurrentDebt();\nconst fee = ceilMultiplyBy(aliceLoanAmount, rates.loanFee);\nconst runDebt = AmountMath.add(aliceLoanAmount, fee);\n@@ -1458,7 +1458,7 @@ test('overdeposit', async t => {\n);\nawait E(aliceOverpaySeat).getOfferResult();\n- debtAmount = await E(aliceVault).getDebtAmount();\n+ debtAmount = await E(aliceVault).getCurrentDebt();\nt.deepEqual(debtAmount, AmountMath.makeEmpty(runBrand));\nconst { RUN: lentAmount5 } = await E(aliceOverpaySeat).getCurrentAllocation();\n@@ -1558,7 +1558,7 @@ test('mutable liquidity triggers and interest', async t => {\naliceLoanSeat,\n).getOfferResult();\n- const aliceDebtAmount = await E(aliceVault).getDebtAmount();\n+ const aliceDebtAmount = await E(aliceVault).getCurrentDebt();\nconst fee = ceilMultiplyBy(aliceLoanAmount, rates.loanFee);\nconst aliceRunDebtLevel = AmountMath.add(aliceLoanAmount, fee);\n@@ -1597,7 +1597,7 @@ test('mutable liquidity triggers and interest', async t => {\nbobLoanSeat,\n).getOfferResult();\n- const bobDebtAmount = await E(bobVault).getDebtAmount();\n+ const bobDebtAmount = await E(bobVault).getCurrentDebt();\nconst bobFee = ceilMultiplyBy(bobLoanAmount, rates.loanFee);\nconst bobRunDebtLevel = AmountMath.add(bobLoanAmount, bobFee);\n@@ -1749,7 +1749,7 @@ test('collect fees from loan and AMM', async t => {\n);\nconst { vault } = await E(loanSeat).getOfferResult();\n- const debtAmount = await E(vault).getDebtAmount();\n+ const debtAmount = await E(vault).getCurrentDebt();\nconst fee = ceilMultiplyBy(AmountMath.make(runBrand, 470n), rates.loanFee);\nt.deepEqual(debtAmount, AmountMath.add(loanAmount, fee), 'vault loaned RUN');\ntrace('correct debt', debtAmount);\n@@ -1850,7 +1850,7 @@ test('close loan', async t => {\naliceLoanSeat,\n).getOfferResult();\n- const debtAmount = await E(aliceVault).getDebtAmount();\n+ const debtAmount = await E(aliceVault).getCurrentDebt();\nconst fee = ceilMultiplyBy(aliceLoanAmount, rates.loanFee);\nconst runDebtLevel = AmountMath.add(aliceLoanAmount, fee);\n@@ -2062,7 +2062,7 @@ test('mutable liquidity triggers and interest sensitivity', async t => {\naliceLoanSeat,\n).getOfferResult();\n- const aliceDebtAmount = await E(aliceVault).getDebtAmount();\n+ const aliceDebtAmount = await E(aliceVault).getCurrentDebt();\nconst fee = ceilMultiplyBy(aliceLoanAmount, rates.loanFee);\nconst aliceRunDebtLevel = AmountMath.add(aliceLoanAmount, fee);\n@@ -2101,7 +2101,7 @@ test('mutable liquidity triggers and interest sensitivity', async t => {\nbobLoanSeat,\n).getOfferResult();\n- const bobDebtAmount = await E(bobVault).getDebtAmount();\n+ const bobDebtAmount = await E(bobVault).getCurrentDebt();\nconst bobFee = ceilMultiplyBy(bobLoanAmount, rates.loanFee);\nconst bobRunDebtLevel = AmountMath.add(bobLoanAmount, bobFee);\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
|
refactor(run-protocol): getDebtAmount -> getCurrentDebt
| 1
|
refactor
|
run-protocol
|
865,917
|
25.02.2022 11:21:16
| -3,600
|
880070e5e213c36f74b74ccc858a15be280829d2
|
deps(client): update to
Closes
Closes
Closes
|
[
{
"change_type": "MODIFY",
"diff": "\"resolved\": \"https://registry.npmjs.org/@camunda/element-templates-json-schema/-/element-templates-json-schema-0.6.0.tgz\",\n\"integrity\": \"sha512-sfNIOKSfx/VQesCe1+m1izfIZS64NWDZq3teyMzzfJkn37u0ngwIwEXlc7Voj8Qcg2paePT8HmEgp+TJP39V3Q==\"\n},\n+ \"@camunda/zeebe-element-templates-json-schema\": {\n+ \"version\": \"0.1.0\",\n+ \"resolved\": \"https://registry.npmjs.org/@camunda/zeebe-element-templates-json-schema/-/zeebe-element-templates-json-schema-0.1.0.tgz\",\n+ \"integrity\": \"sha512-E5mie+Q+/0Rk12GerNRWZP6aIWFXo4KfC++6tFJUvKt8la4ZvsPpagB7F8Oiahd56/gUqOicJ7+yPyQ85JnFgA==\"\n+ },\n\"@ibm/plex\": {\n\"version\": \"6.0.0\",\n\"resolved\": \"https://registry.npmjs.org/@ibm/plex/-/plex-6.0.0.tgz\",\n}\n},\n\"camunda-bpmn-js\": {\n- \"version\": \"0.13.0-alpha.2\",\n- \"resolved\": \"https://registry.npmjs.org/camunda-bpmn-js/-/camunda-bpmn-js-0.13.0-alpha.2.tgz\",\n- \"integrity\": \"sha512-J2tR47ouHfIfShlrbO/Zgj9RpouM/rgHGJYM9bnV7TjZ4ktHCw74xtgHDzwIKNNSAhGKrGkg1VvqVO+2VjasFg==\",\n+ \"version\": \"0.13.0-alpha.3\",\n+ \"resolved\": \"https://registry.npmjs.org/camunda-bpmn-js/-/camunda-bpmn-js-0.13.0-alpha.3.tgz\",\n+ \"integrity\": \"sha512-fyjBazCjkXfB1hgxxFFg0g9RdzPwXVDIb5eY133ruiwsW/oxaI4iyVoyiSFiZkA9GNypTzWqzdjKLAcnvkeUsQ==\",\n\"requires\": {\n\"@bpmn-io/align-to-origin\": \"^0.7.0\",\n- \"@bpmn-io/properties-panel\": \"^0.10.2\",\n- \"bpmn-js\": \"^9.0.0-alpha.2\",\n+ \"@bpmn-io/properties-panel\": \"^0.11.0\",\n+ \"bpmn-js\": \"^9.0.2\",\n\"bpmn-js-disable-collapsed-subprocess\": \"^0.1.3\",\n\"bpmn-js-executable-fix\": \"^0.1.3\",\n- \"bpmn-js-properties-panel\": \"~1.0.0-alpha.3\",\n+ \"bpmn-js-properties-panel\": \"~1.0.0-alpha.5\",\n\"camunda-bpmn-moddle\": \"^6.1.1\",\n\"diagram-js\": \"^8.1.1\",\n\"diagram-js-minimap\": \"^2.1.0\",\n\"diagram-js-origin\": \"^1.3.2\",\n\"inherits\": \"^2.0.4\",\n\"min-dash\": \"^3.8.1\",\n- \"zeebe-bpmn-moddle\": \"^0.10.0\"\n+ \"zeebe-bpmn-moddle\": \"^0.11.0\"\n},\n\"dependencies\": {\n+ \"@bpmn-io/element-templates-validator\": {\n+ \"version\": \"0.5.0\",\n+ \"resolved\": \"https://registry.npmjs.org/@bpmn-io/element-templates-validator/-/element-templates-validator-0.5.0.tgz\",\n+ \"integrity\": \"sha512-v/gfuYs7AOsQUzGmWBEupFGZiylCzqapBoZrjavewnPPbDOzLvbHZ1bnYPre/7b/wdnf4ayx0bf/NCC/AEySVg==\",\n+ \"requires\": {\n+ \"@camunda/element-templates-json-schema\": \"^0.7.0\",\n+ \"@camunda/zeebe-element-templates-json-schema\": \"^0.1.0\",\n+ \"json-source-map\": \"^0.6.1\",\n+ \"min-dash\": \"^3.8.1\"\n+ }\n+ },\n+ \"@bpmn-io/extract-process-variables\": {\n+ \"version\": \"0.4.4\",\n+ \"resolved\": \"https://registry.npmjs.org/@bpmn-io/extract-process-variables/-/extract-process-variables-0.4.4.tgz\",\n+ \"integrity\": \"sha512-iStnEVSEtOlZoE3ADMImdwhOhxUjXFdwWsCmmJQlyWH5ISmdRvai0Cxuw0spQEYySgIwFsUB0h+ScOCdW6yEBQ==\",\n+ \"requires\": {\n+ \"min-dash\": \"^3.5.2\"\n+ }\n+ },\n+ \"@bpmn-io/properties-panel\": {\n+ \"version\": \"0.11.0\",\n+ \"resolved\": \"https://registry.npmjs.org/@bpmn-io/properties-panel/-/properties-panel-0.11.0.tgz\",\n+ \"integrity\": \"sha512-/1lZiwhCdAsapXKMjzVFc6jdyzU5Ue8wq/mMSFLVvAatxlHHrxTwYAqEW9zA0ZBqIm8JQbl6wptGMG/6ICZPGA==\",\n+ \"requires\": {\n+ \"classnames\": \"^2.3.1\",\n+ \"min-dash\": \"^3.7.0\",\n+ \"min-dom\": \"^3.1.3\"\n+ }\n+ },\n+ \"@camunda/element-templates-json-schema\": {\n+ \"version\": \"0.7.0\",\n+ \"resolved\": \"https://registry.npmjs.org/@camunda/element-templates-json-schema/-/element-templates-json-schema-0.7.0.tgz\",\n+ \"integrity\": \"sha512-ylBhHzAuzQjX+ZoZTPinHCsIaMa89fqyk10sxVQjgEm63+o40KMomjKf4EM2sXwiy72vDbjeXyb3Z56a7MTETQ==\"\n+ },\n+ \"bpmn-js\": {\n+ \"version\": \"9.0.2\",\n+ \"resolved\": \"https://registry.npmjs.org/bpmn-js/-/bpmn-js-9.0.2.tgz\",\n+ \"integrity\": \"sha512-dl6sErP3tTBSJAvCGcu/v7xw+QCp8UCXSVlAoCA1lSrBkfdVOcHuxyy2svGPv4nJKOUMqFAK3xcemZYyztCwoA==\",\n+ \"requires\": {\n+ \"bpmn-moddle\": \"^7.1.2\",\n+ \"css.escape\": \"^1.5.1\",\n+ \"diagram-js\": \"^8.1.2\",\n+ \"diagram-js-direct-editing\": \"^1.6.3\",\n+ \"ids\": \"^1.0.0\",\n+ \"inherits\": \"^2.0.4\",\n+ \"min-dash\": \"^3.5.2\",\n+ \"min-dom\": \"^3.1.3\",\n+ \"object-refs\": \"^0.3.0\",\n+ \"tiny-svg\": \"^2.2.2\"\n+ }\n+ },\n+ \"bpmn-js-properties-panel\": {\n+ \"version\": \"1.0.0-alpha.5\",\n+ \"resolved\": \"https://registry.npmjs.org/bpmn-js-properties-panel/-/bpmn-js-properties-panel-1.0.0-alpha.5.tgz\",\n+ \"integrity\": \"sha512-AXunjjthnApd25M0A0OIVxwIWoJc/BvNVCObf0Ushh86PqESzjAbDkTdtbUGxnj4ukiFJB390K5b5NezUEL5IQ==\",\n+ \"requires\": {\n+ \"@bpmn-io/element-templates-validator\": \"^0.5.0\",\n+ \"@bpmn-io/extract-process-variables\": \"^0.4.4\",\n+ \"array-move\": \"^3.0.1\",\n+ \"classnames\": \"^2.3.1\",\n+ \"ids\": \"^1.0.0\",\n+ \"min-dash\": \"^3.8.1\",\n+ \"min-dom\": \"^3.1.3\",\n+ \"preact-markup\": \"^2.1.1\",\n+ \"semver\": \"^7.3.5\"\n+ }\n+ },\n+ \"classnames\": {\n+ \"version\": \"2.3.1\",\n+ \"resolved\": \"https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz\",\n+ \"integrity\": \"sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==\"\n+ },\n\"diagram-js\": {\n- \"version\": \"8.1.1\",\n- \"resolved\": \"https://registry.npmjs.org/diagram-js/-/diagram-js-8.1.1.tgz\",\n- \"integrity\": \"sha512-Wy4BxeqYrM7rqLpcKb97Qyz/jR1Wt/gA8IQUOGjRY8rN7CZjiCSaITY2ATW76FwnCOhUvx2oRa+quzEm+s7aVQ==\",\n+ \"version\": \"8.1.2\",\n+ \"resolved\": \"https://registry.npmjs.org/diagram-js/-/diagram-js-8.1.2.tgz\",\n+ \"integrity\": \"sha512-l0UWjWA9zcO3bwGg2C3sybNEWiICdXdkFy4JRjWdPyOcO00v3T0whuNhLwz9kaS5ht67awnPyKr+RWgsx3H0Rw==\",\n\"requires\": {\n\"css.escape\": \"^1.5.1\",\n\"didi\": \"^5.2.1\",\n\"resolved\": \"https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz\",\n\"integrity\": \"sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==\"\n},\n+ \"lru-cache\": {\n+ \"version\": \"6.0.0\",\n+ \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz\",\n+ \"integrity\": \"sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==\",\n+ \"requires\": {\n+ \"yallist\": \"^4.0.0\"\n+ }\n+ },\n\"path-intersection\": {\n\"version\": \"2.2.1\",\n\"resolved\": \"https://registry.npmjs.org/path-intersection/-/path-intersection-2.2.1.tgz\",\n\"integrity\": \"sha512-9u8xvMcSfuOiStv9bPdnRJQhGQXLKurew94n4GPQCdH1nj9QKC9ObbNoIpiRq8skiOBxKkt277PgOoFgAt3/rA==\"\n},\n+ \"semver\": {\n+ \"version\": \"7.3.5\",\n+ \"resolved\": \"https://registry.npmjs.org/semver/-/semver-7.3.5.tgz\",\n+ \"integrity\": \"sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==\",\n+ \"requires\": {\n+ \"lru-cache\": \"^6.0.0\"\n+ }\n+ },\n\"tiny-svg\": {\n\"version\": \"2.2.2\",\n\"resolved\": \"https://registry.npmjs.org/tiny-svg/-/tiny-svg-2.2.2.tgz\",\n\"integrity\": \"sha512-u6zCuMkDR/3VAh83X7hDRn/pi0XhwG2ycuNS0cTFtQjGdOG2tSvEb8ds65VeGWc3H6PUjJKeunueXqgkZqtMsg==\"\n+ },\n+ \"yallist\": {\n+ \"version\": \"4.0.0\",\n+ \"resolved\": \"https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz\",\n+ \"integrity\": \"sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==\"\n+ },\n+ \"zeebe-bpmn-moddle\": {\n+ \"version\": \"0.11.0\",\n+ \"resolved\": \"https://registry.npmjs.org/zeebe-bpmn-moddle/-/zeebe-bpmn-moddle-0.11.0.tgz\",\n+ \"integrity\": \"sha512-ehNQa2Kt9B1bwWJCF8Fs4SkroaSe+VH5Y4ql4T1hHuOSMJiwuMekFIs3UAJyS0ZyBhcJbUW1C1NPwXcD8u5IRA==\"\n}\n}\n},\n}\n},\n\"diagram-js-minimap\": {\n- \"version\": \"2.1.0\",\n- \"resolved\": \"https://registry.npmjs.org/diagram-js-minimap/-/diagram-js-minimap-2.1.0.tgz\",\n- \"integrity\": \"sha512-BgNb2P7iIkl2FxUF+InZsLWdJ6TF7vTfAieWcqULR+FbklAF+JPySErQfegQclXt+ra0QybIQgjzIOUMJnvzvA==\",\n+ \"version\": \"2.1.1\",\n+ \"resolved\": \"https://registry.npmjs.org/diagram-js-minimap/-/diagram-js-minimap-2.1.1.tgz\",\n+ \"integrity\": \"sha512-H+UM6qoIVgJAOJgm3kZ57zpPyTx41YtAQAs0c/rrRube25ljygA0PSO5x42CJNulJdgK0AEWdsnhefMzlxyKfQ==\",\n\"requires\": {\n\"css.escape\": \"^1.5.1\",\n\"min-dash\": \"^3.5.2\",\n",
"new_path": "client/package-lock.json",
"old_path": "client/package-lock.json"
},
{
"change_type": "MODIFY",
"diff": "\"bpmn-js-properties-panel\": \"^1.0.0-alpha.3\",\n\"bpmn-moddle\": \"^7.1.2\",\n\"bpmnlint\": \"^7.2.1\",\n- \"camunda-bpmn-js\": \"^0.13.0-alpha.2\",\n+ \"camunda-bpmn-js\": \"^0.13.0-alpha.3\",\n\"camunda-bpmn-moddle\": \"^6.1.1\",\n\"camunda-cmmn-moddle\": \"^1.0.0\",\n\"camunda-dmn-moddle\": \"^1.1.0\",\n",
"new_path": "client/package.json",
"old_path": "client/package.json"
}
] |
JavaScript
|
MIT License
|
camunda/camunda-modeler
|
deps(client): update to camunda-bpmn-js@0.13.0-alpha.3
Closes #2496
Closes #2749
Closes #2673
| 1
|
deps
|
client
|
866,395
|
25.02.2022 11:32:31
| 18,000
|
92dbfec1c23e1a7292a53bf668c0f81cd6fd2e34
|
feat(search): adds formdata event handling
|
[
{
"change_type": "MODIFY",
"diff": "/**\n* @license\n*\n- * Copyright IBM Corp. 2019, 2021\n+ * Copyright IBM Corp. 2019, 2022\n*\n* This source code is licensed under the Apache-2.0 license found in the\n* LICENSE file in the root directory of this source tree.\n@@ -15,6 +15,7 @@ import Search16 from '@carbon/icons/lib/search/16';\nimport settings from 'carbon-components/es/globals/js/settings';\nimport ifNonEmpty from '../../globals/directives/if-non-empty';\nimport FocusMixin from '../../globals/mixins/focus';\n+import FormMixin from '../../globals/mixins/form';\nimport { INPUT_SIZE } from '../input/input';\nimport { SEARCH_COLOR_SCHEME } from './defs';\nimport styles from './search.scss';\n@@ -34,7 +35,7 @@ const { prefix } = settings;\n* @fires bx-search-input - The custom event fired after the search content is changed upon a user gesture.\n*/\n@customElement(`${prefix}-search`)\n-class BXSearch extends FocusMixin(LitElement) {\n+class BXSearch extends FocusMixin(FormMixin(LitElement)) {\n/**\n* Handles `input` event on the `<input>` in the shadow DOM.\n*/\n@@ -77,6 +78,14 @@ class BXSearch extends FocusMixin(LitElement) {\n}\n}\n+ _handleFormdata(event: Event) {\n+ const { formData } = event as any; // TODO: Wait for `FormDataEvent` being available in `lib.dom.d.ts`\n+ const { disabled, name, value } = this;\n+ if (!disabled) {\n+ formData.append(name, value);\n+ }\n+ }\n+\n/**\n* The assistive text for the close button.\n*/\n@@ -102,7 +111,7 @@ class BXSearch extends FocusMixin(LitElement) {\nlabelText = '';\n/**\n- * The form name.\n+ * The form name in `FormData`.\n*/\n@property()\nname = '';\n",
"new_path": "src/components/search/search.ts",
"old_path": "src/components/search/search.ts"
}
] |
TypeScript
|
Apache License 2.0
|
carbon-design-system/carbon-for-ibm-dotcom
|
feat(search): adds formdata event handling (#967)
| 1
|
feat
|
search
|
815,574
|
25.02.2022 11:34:09
| -28,800
|
79370b24fb2f0666ba0f6b9779c717472d6134c4
|
fix(ckb-bin): replay command crash if profile time under 1 second
subcommand replay crash due to divide profile_time(zero) if the time is less than 1 second
|
[
{
"change_type": "MODIFY",
"diff": "@@ -9,6 +9,8 @@ use ckb_store::ChainStore;\nuse ckb_verification_traits::Switch;\nuse std::sync::Arc;\n+const MIN_PROFILING_TIME: u64 = 5;\n+\npub fn replay(args: ReplayArgs, async_handle: Handle) -> Result<(), ExitCode> {\nlet shared_builder = SharedBuilder::new(\n&args.config.bin_name,\n@@ -75,12 +77,25 @@ fn profile(shared: Shared, mut chain: ChainService, from: Option<u64>, to: Optio\nlet now = std::time::Instant::now();\nlet tx_count = process_range_block(&shared, &mut chain, from..=to);\nlet duration = std::time::Instant::now().saturating_duration_since(now);\n+ if duration.as_secs() >= MIN_PROFILING_TIME {\nprintln!(\n- \"end profiling, duration {:?} txs {} tps {}\",\n+ \"\\n----------------------------\\nEnd profiling, duration:{:?}, txs:{}, tps:{}\\n----------------------------\",\nduration,\ntx_count,\ntx_count as u64 / duration.as_secs()\n);\n+ } else {\n+ println!(\n+ concat!(\n+ \"----------------------------\\n\",\n+ r#\"Profiling with too short time({:?}) is inaccurate and referential; it's recommended to modify\"#,\n+ \"\\n\",\n+ r#\"parameters(--from, --to) to increase block range, to make profiling time is greater than \"#,\n+ \"{} seconds\\n----------------------------\",\n+ ),\n+ duration, MIN_PROFILING_TIME\n+ );\n+ }\n}\nfn process_range_block(\n",
"new_path": "ckb-bin/src/subcommand/replay.rs",
"old_path": "ckb-bin/src/subcommand/replay.rs"
}
] |
Rust
|
MIT License
|
nervosnetwork/ckb
|
fix(ckb-bin): replay command crash if profile time under 1 second
subcommand replay crash due to divide profile_time(zero) if the time is less than 1 second
| 1
|
fix
|
ckb-bin
|
667,713
|
25.02.2022 11:34:09
| -28,800
|
80a85caa4e3bf653a2918360d8f3c3588458eff5
|
fix(android): remove color property in HippyForegroundColorSpan
|
[
{
"change_type": "MODIFY",
"diff": "package com.tencent.mtt.hippy.dom.node;\nimport android.text.style.ForegroundColorSpan;\n+import androidx.annotation.Nullable;\npublic final class HippyForegroundColorSpan extends ForegroundColorSpan {\n- private final Object customData;\n- private final int color;\n+ // Support host set custom colors data, such as change skin or night mode.\n+ @Nullable\n+ private Object mCustomColors;\n- public HippyForegroundColorSpan(int color, Object customData) {\n+ public HippyForegroundColorSpan(int color, Object customColors) {\nsuper(color);\n- this.color = color;\n- this.customData = customData;\n+ mCustomColors = customColors;\n}\npublic HippyForegroundColorSpan(int color) {\nthis(color, null);\n}\n- public int getColor() {\n- return color;\n- }\n-\n- public Object getCustomData() {\n- return customData;\n+ public Object getCustomColors() {\n+ return mCustomColors;\n}\n}\n",
"new_path": "android/sdk/src/main/java/com/tencent/mtt/hippy/dom/node/HippyForegroundColorSpan.java",
"old_path": "android/sdk/src/main/java/com/tencent/mtt/hippy/dom/node/HippyForegroundColorSpan.java"
},
{
"change_type": "MODIFY",
"diff": "@@ -57,7 +57,7 @@ public class TextNode extends StyleNode {\nprotected float mLineSpacingMultiplier = UNSET;\nprotected float mLineSpacingExtra;\n- private int mColor = Color.BLACK;\n+ protected int mColor = Color.BLACK;\nprivate final boolean mIsBackgroundColorSet = false;\nprivate int mBackgroundColor;\nprivate String mFontFamily = null;\n",
"new_path": "android/sdk/src/main/java/com/tencent/mtt/hippy/dom/node/TextNode.java",
"old_path": "android/sdk/src/main/java/com/tencent/mtt/hippy/dom/node/TextNode.java"
},
{
"change_type": "MODIFY",
"diff": "@@ -236,7 +236,7 @@ public class HippyTextView extends View implements CommonBorder, HippyViewBase,\nspanFlags = Spannable.SPAN_INCLUSIVE_INCLUSIVE;\n}\ntextSpan.setSpan(\n- new HippyForegroundColorSpan(textColor, span.getCustomData()), start, end, spanFlags);\n+ new HippyForegroundColorSpan(textColor, span.getCustomColors()), start, end, spanFlags);\n}\n}\nif (spans == null || spans.length == 0) {\n",
"new_path": "android/sdk/src/main/java/com/tencent/mtt/hippy/views/text/HippyTextView.java",
"old_path": "android/sdk/src/main/java/com/tencent/mtt/hippy/views/text/HippyTextView.java"
}
] |
C++
|
Apache License 2.0
|
tencent/hippy
|
fix(android): remove color property in HippyForegroundColorSpan
| 1
|
fix
|
android
|
67,475
|
25.02.2022 11:36:34
| 0
|
552f8db49a9808d0e35453945697ec020d03dc41
|
GitBook: Routing improvements
|
[
{
"change_type": "MODIFY",
"diff": "## Developer Guides\n* [Routing](developer-guides/routing/README.md)\n- * [Routing fundamentals](developer-guides/routing/common-routing-tasks.md)\n+ * [Router configuration](developer-guides/routing/router-configuration.md)\n* [Creating routes](developer-guides/routing/creating-routes.md)\n* [Routing lifecycle](developer-guides/routing/routing-lifecycle.md)\n* [Viewports](developer-guides/routing/viewports.md)\n* [Navigating](developer-guides/routing/navigating.md)\n* [Route hooks](developer-guides/routing/router-hooks.md)\n* [Route events](developer-guides/routing/route-events.md)\n+ * [Direct Routing](developer-guides/routing/direct-routing.md)\n+ * [Routing fundamentals](developer-guides/routing/common-routing-tasks.md)\n* [Validation](developer-guides/validation/README.md)\n* [Plugin configuration](developer-guides/validation/registering-the-plugin.md)\n* [Defining & Customizing Rules](developer-guides/validation/defining-rules.md)\n",
"new_path": "docs/user-docs/TOC.md",
"old_path": "docs/user-docs/TOC.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -4,6 +4,28 @@ This section details common scenarios and tasks using the router in your Aurelia\nIt is highly recommended that you familiarize yourself with other parts of the router documentation before consulting this section, as we will introduce concepts that you might not be familiar with just yet that are mentioned in other sections of the router documentation.\n+## Styling Active Router Links\n+\n+A common scenario is styling an active router link with styling to signify that the link is active, such as making the text bold. The `load` attribute has a bindable property named `active` which you can bind to a property on your view-model to use for conditionally applying a class:\n+\n+```css\n+.active {\n+ font-weight: bold;\n+}\n+```\n+\n+```html\n+<a active.class=\"_settings\" load=\"route:settings; active.bind:_settings\">\n+ Settings\n+</a>\n+```\n+\n+The `active` property is a boolean value that we bind to. In this example, we use an underscore to signify this is a private property.\n+\n+{% hint style=\"info\" %}\n+You do not need to explicitly declare this property in your view model since it is a from-view binding. The underscore prefix of \\_settings has no special meaning to the framework, it is just a common convention for private properties which can make sense for properties that are not explicitly declared in the view model.\n+{% endhint %}\n+\n## Setting The Title\nWhile you would in many cases set the title of a route in your route configuration object using the `title` property, sometimes you want the ability to specify the title property from within the routed component itself.\n",
"new_path": "docs/user-docs/developer-guides/routing/common-routing-tasks.md",
"old_path": "docs/user-docs/developer-guides/routing/common-routing-tasks.md"
},
{
"change_type": "MODIFY",
"diff": "---\ndescription: >-\n- How to leverage direct routing in your Aurelia applications using the\n- convention-based direct router feature.\n+ Learn about an alternative routing option available in the Aurelia router that\n+ offers zero-configuration routing.\n---\n-# Direct routing\n+# Direct Routing\n-{% hint style=\"info\" %}\n-`Please note that we currently have an interim router implementation and that some (minor) changes to application code might be required when the original router is added back in.`\n-{% endhint %}\n+The Aurelia router supports different ways of routing. In sections such as Creating Routes, we talk about configured routes, which require you to map out your routes ahead of time and have an understanding of how things are mapped. With direct routing, the router works on the basis of zero-configuration routing.\n-Aurelia is known for its conventions-based approach to building applications. It provides you with a set of sane defaults and ways of doing certain things in your app, which help save time and make your life easier. The router in Aurelia 2 is no exception.\n+It might sound like some kind of developer-hype, but zero-configuration routing in the form of direct routing allows you to route in your application without configuring your routes. Think of the direct router as a form of dynamic composition for routing.\n-{% hint style=\"success\" %}\n-**What you will learn in this section**\n+By default, you don't need to tell the router you want to use direct routing. Instead of referencing route names or paths, you reference component names.\n-* What direct routing is\n-* How to create parameter-less routes\n-* How to create routes with parameters\n-* How to pass data through routes\n-* How to name parameters\n-{% endhint %}\n-\n-## What Is Direct Routing?\n-\n-To put it in simple terms, direct routing is routing without route configuration. Unlike other routers you might be familiar with, you do not need to specify your routes upfront in code. The direct routing functionality works for all kinds of routing from standard routes to routes with parameters, child routing and more.\n-\n-### How it works\n-\n-You start off by registering the plugin in your app, you add in an `<au-viewport>` element where your routes will be displayed. Then using the `load` attribute on your links, you can tell the router to render a specific component.\n-\n-Components which have been globally registered inside the `register` method, or imported inside of the view can be rendered through the router.\n-\n-## Direct routing example\n-\n-As you will see, the direct routing approach requires no configuration. We import our component and then reference it by name inside of the `load` attribute.\n-\n-{% tabs %}\n-{% tab title=\"my-app.html\" %}\n-```markup\n-<import from=\"./test-component.html\"></import>\n-\n-<ul>\n- <li><a load=\"test-component\">Test Component</a></li>\n-</ul>\n-\n-<au-viewport></au-viewport>\n-```\n-{% endtab %}\n-\n-{% tab title=\"test-component.html\" %}\n-```markup\n-<h1>Hello world, I'm a test component.</h1>\n-```\n-{% endtab %}\n-{% endtabs %}\n-\n-The `load` attribute on our link denotes that this link is to navigate to a component using the router. Inside of the `load` attribute, we pass in the name of the component \\(without any file extension\\). As you can see, HTML only components are supported by the router.\n-\n-## Routes with parameters\n-\n-The simple example above shows you how to render a component using the router, and now we are going to introduce support for parameters. A parameter is a dynamic value in your route which can be accessed inside of the routed component. For example, this might be a product ID or a category name.\n-\n-To access parameters from the route, we can get those from the router lifecycle hook called `load` which also supports promises and can be asynchronous.\n-\n-{% tabs %}\n-{% tab title=\"my-app.html\" %}\n-```markup\n-<import from=\"./test-component\"></import>\n-\n-<ul>\n- <li><a load=\"test-component(hello)\">Test Component</a></li>\n-</ul>\n-\n-<au-viewport></au-viewport>\n-```\n-{% endtab %}\n-\n-{% tab title=\"test-component.ts\" %}\n-```typescript\n-import { IRouteViewModel } from 'aurelia';\n-\n-export class TestComponent implements IRouteViewModel {\n- load(parameters) {\n- console.log(parameters); // Should display {0: \"hello\"} in the browser developer tools console\n- }\n-}\n-```\n-{% endtab %}\n-\n-{% tab title=\"test-component.html\" %}\n-```markup\n-<h1>Hello world, I'm a test component.</h1>\n-```\n-{% endtab %}\n-{% endtabs %}\n-\n-In this example, we are not telling the router the name of our parameters. By default, the router will pass an object keyed by index \\(starting at 0\\) for unnamed parameters. To access the value being given to our test component, we would reference it using `parameters['0']` which would contain `1` as the value.\n-\n-### **Inline named route parameters**\n-\n-You can name your route parameters inline by specifying the name inside of the `load` attribute on the component.\n-\n-{% tabs %}\n-{% tab title=\"my-app.html\" %}\n-```markup\n-<import from=\"./test-component\"></import>\n-\n-<ul>\n- <li><a load=\"test-component(named=hello)\">Test Component</a></li>\n-</ul>\n-\n-<au-viewport></au-viewport>\n-```\n-{% endtab %}\n-\n-{% tab title=\"test-component.ts\" %}\n-```typescript\n-import { IRouteViewModel } from 'aurelia';\n-\n-export class TestComponent implements IRouteViewModel {\n- load(parameters) {\n- console.log(parameters); // Should display {named: \"hello\"} in the browser developer tools console\n- }\n-}\n-```\n-{% endtab %}\n-\n-{% tab title=\"test-component.html\" %}\n-```markup\n-<h1>Hello world, I'm a test component.</h1>\n-```\n-{% endtab %}\n-{% endtabs %}\n-\n-### **Named route parameters**\n-\n-It is recommended that unless you do not know the names of the parameters, that you supply the names inside of your routed component using the static class property `parameters` which accepts an array of strings corresponding to parameters in your route.\n-\n-While you can name them inline, specifying them inside of your component makes it easier for other people working in your codebase to determine how the component work.\n-\n-{% tabs %}\n-{% tab title=\"my-app.html\" %}\n-```markup\n-<import from=\"./test-component\"></import>\n-\n-<ul>\n- <li><a load=\"test-component(hello)\">Test Component</a></li>\n-</ul>\n-\n-<au-viewport></au-viewport>\n-```\n-{% endtab %}\n-\n-{% tab title=\"test-component.ts\" %}\n-```typescript\n-import { IRouteViewModel } from 'aurelia';\n-\n-export class TestComponent implements IRouteViewModel {\n- static parameters = ['id'];\n-\n- load(parameters) {\n- console.log(parameters); // Should display {id: \"hello\"} in the browser developer tools console\n- }\n-}\n-```\n-{% endtab %}\n-\n-{% tab title=\"test-component.html\" %}\n-```markup\n-<h1>Hello world, I'm a test component.</h1>\n-```\n-{% endtab %}\n-{% endtabs %}\n+## Direct Routing explained in code\n+A picture is worth a thousand words, so let's go through the makeup of a direct router-based Aurelia application. Fortunately, for us, by choosing \"direct routing\" when prompted via `npx makes aurelia` we will have an application that uses direct routing by default.\n",
"new_path": "docs/user-docs/developer-guides/routing/direct-routing.md",
"old_path": "docs/user-docs/developer-guides/routing/direct-routing.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -154,7 +154,7 @@ In this example, we will create a service class that will contain our methods fo\nIn a real application, your login and logout methods would obtain a token and authentication data. For the purposes of this example, we have an if statement which checks for a specific username and password being supplied.\n{% hint style=\"warning\" %}\n-This is only an example. It is by no means an officially recommended way in how you should handle authentication using router hooks. Please use this code as a guide for creating your own solutions.\n+This is only an example. Please use this code as a guide for creating your own solutions. Never blindly copy and paste code without taking the time to understand it first, especially when it comes to authentication.\n{% endhint %}\n{% tabs %}\n",
"new_path": "docs/user-docs/developer-guides/routing/router-hooks.md",
"old_path": "docs/user-docs/developer-guides/routing/router-hooks.md"
}
] |
TypeScript
|
MIT License
|
aurelia/aurelia
|
GitBook: [#130] Routing improvements
| 1
|
gitbook
| null |
392,551
|
25.02.2022 11:46:37
| 28,800
|
9d37f914bcc5444a3286b6577e78f3669ded6d2f
|
fix: simplify generated filter flow types
Make it possible to use filter expression flow types.
Relax typing slightly.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -3033,13 +3033,16 @@ export type ComparisonFilterExpression = [\nFilterKey,\nFilterValue\n];\n-export type SetMembershipFilterExpression = [\n- SetMembershipFilterOperator,\n- FilterKey\n-] &\n- FilterValue[];\n-export type CombiningFilterExpression = [CombiningFilterOperator] &\n- (ComparisonFilterExpression | SetMembershipFilterExpression)[];\n+export type SetMembershipFilterExpression = (\n+ | SetMembershipFilterOperator\n+ | FilterKey\n+ | FilterValue\n+)[];\n+export type CombiningFilterExpression = (\n+ | CombiningFilterOperator\n+ | ComparisonFilterExpression\n+ | SetMembershipFilterExpression\n+)[];\nexport type FilterExpression =\n| ComparisonFilterExpression\n| SetMembershipFilterExpression\n",
"new_path": "declarations/mapillary.js.flow",
"old_path": "declarations/mapillary.js.flow"
}
] |
TypeScript
|
MIT License
|
mapillary/mapillary-js
|
fix: simplify generated filter flow types
Make it possible to use filter expression flow types.
Relax typing slightly.
| 1
|
fix
| null |
438,921
|
25.02.2022 12:06:14
| -32,400
|
541885327ce7bdd55de0588427be56baf57f2bcf
|
fix(axis): fix hidden axis rescale on dynamic load
Remove conditional added from
Fix
|
[
{
"change_type": "MODIFY",
"diff": "@@ -894,7 +894,7 @@ class Axis {\nconst prefix = `axis_${key}_`;\nconst axisScale = scale[key];\n- if (config[`${prefix}show`] && axisScale) {\n+ if (axisScale) {\nconst tickValues = config[`${prefix}tick_values`];\nconst tickCount = config[`${prefix}tick_count`];\n",
"new_path": "src/ChartInternal/Axis/Axis.ts",
"old_path": "src/ChartInternal/Axis/Axis.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -2291,6 +2291,26 @@ describe(\"AXIS\", function() {\nexpect(main.select(`.bb-axis-${v}`).style(\"visibility\")).to.be.equal(\"hidden\");\n});\n});\n+\n+ it(\"y Axis domain should update even is hidden\", done => {\n+ const yDomain = chart.internal.scale.y.domain();\n+\n+ // when\n+ chart.load({\n+ columns: [\n+ ['data1', 500, 600, 500, 4000, 750, 2000],\n+ ['data2', 123, 444, 555, 112, 3321, 232],\n+ ],\n+ done: function() {\n+ // after dynamic data load, y axis domain should be updated\n+ expect(yDomain).to.not.be.deep.equal(\n+ this.internal.scale.y.domain()\n+ );\n+\n+ done();\n+ }\n+ });\n+ });\n});\ndescribe(\"Multi axes\", () => {\n",
"new_path": "test/internals/axis-spec.ts",
"old_path": "test/internals/axis-spec.ts"
}
] |
TypeScript
|
MIT License
|
naver/billboard.js
|
fix(axis): fix hidden axis rescale on dynamic load
Remove conditional added from #2523
Fix #2571
| 1
|
fix
|
axis
|
104,828
|
25.02.2022 12:07:13
| -3,600
|
f6f294909a24f4389ec98bad754bfb736b03035f
|
test(table): udated snapshots
|
[
{
"change_type": "MODIFY",
"diff": "@@ -27436,7 +27436,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/T\n</div>\n`;\n-exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/Table With search 1`] = `\n+exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/Table With searching 1`] = `\n<div\nclassName=\"storybook-container\"\n>\n",
"new_path": "packages/react/src/components/Table/__snapshots__/Table.main.story.storyshot",
"old_path": "packages/react/src/components/Table/__snapshots__/Table.main.story.storyshot"
}
] |
JavaScript
|
Apache License 2.0
|
carbon-design-system/carbon-addons-iot-react
|
test(table): udated snapshots
| 1
|
test
|
table
|
472,066
|
25.02.2022 12:22:10
| -32,400
|
af07e8177a13bed7ef2c8b42981cc3e6189950b2
|
fix(spindle-ui): do not use CSS import in component
|
[
{
"change_type": "MODIFY",
"diff": "+@import './HeroCarouselItem.css';\n/*\n* HeroCarousel\n* NOTE: Styles can be overridden with \"--HeroCarousel-*\" variables\n",
"new_path": "packages/spindle-ui/src/HeroCarousel/HeroCarousel.css",
"old_path": "packages/spindle-ui/src/HeroCarousel/HeroCarousel.css"
},
{
"change_type": "MODIFY",
"diff": "import React, { useCallback, FC } from 'react';\n-import './HeroCarouselItem.css';\nexport type CarouselItem = {\nimageUrl: string;\n",
"new_path": "packages/spindle-ui/src/HeroCarousel/HeroCarouselItem.tsx",
"old_path": "packages/spindle-ui/src/HeroCarousel/HeroCarouselItem.tsx"
}
] |
TypeScript
|
MIT License
|
openameba/spindle
|
fix(spindle-ui): do not use CSS import in component
| 1
|
fix
|
spindle-ui
|
841,509
|
25.02.2022 12:28:17
| 28,800
|
5c29f156404002d6946fbc7a71d76a6c97d7b82a
|
feat(plugin): Support tracing plugin execution
|
[
{
"change_type": "MODIFY",
"diff": "@@ -53,3 +53,5 @@ pkg/\n# Used to see output of babel.\n/lab\n+\n+*.mm_profdata\n\\ No newline at end of file\n",
"new_path": ".gitignore",
"old_path": ".gitignore"
},
{
"change_type": "MODIFY",
"diff": "@@ -3549,6 +3549,7 @@ dependencies = [\n\"swc_ecma_parser\",\n\"swc_ecma_visit\",\n\"testing\",\n+ \"tracing\",\n\"wasmer\",\n\"wasmer-cache\",\n\"wasmer-wasi\",\n",
"new_path": "Cargo.lock",
"old_path": "Cargo.lock"
},
{
"change_type": "MODIFY",
"diff": "@@ -34,9 +34,11 @@ pub fn init_trace_once(\nFLUSH_GUARD.get_or_init(|| {\nif enable_chrome_trace {\nlet layer = if let Some(trace_out_file) = trace_out_file {\n- ChromeLayerBuilder::new().file(trace_out_file)\n- } else {\nChromeLayerBuilder::new()\n+ .file(trace_out_file)\n+ .include_args(true)\n+ } else {\n+ ChromeLayerBuilder::new().include_args(true)\n};\nlet (chrome_layer, guard) = layer.build();\n",
"new_path": "crates/node/src/util.rs",
"old_path": "crates/node/src/util.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -68,6 +68,7 @@ struct RustPlugins {\n}\nimpl RustPlugins {\n+ #[tracing::instrument(level = \"trace\", skip_all, name = \"apply_plugins\")]\n#[cfg(feature = \"plugin\")]\nfn apply(&mut self, n: Program) -> Result<Program, anyhow::Error> {\nuse std::{path::PathBuf, sync::Arc};\n@@ -86,6 +87,13 @@ impl RustPlugins {\n// transform.\nif let Some(plugins) = &self.plugins {\nfor p in plugins {\n+ let span = tracing::span!(\n+ tracing::Level::TRACE,\n+ \"serialize_context\",\n+ plugin_module = p.0.as_str()\n+ );\n+ let context_span_guard = span.enter();\n+\nlet config_json = serde_json::to_string(&p.1)\n.context(\"Failed to serialize plugin config as json\")\n.and_then(|value| Serialized::serialize(&value))?;\n@@ -103,7 +111,14 @@ impl RustPlugins {\n} else {\nanyhow::bail!(\"Failed to resolve plugin path: {:?}\", resolved_path);\n};\n-\n+ drop(context_span_guard);\n+\n+ let span = tracing::span!(\n+ tracing::Level::TRACE,\n+ \"execute_plugin_runner\",\n+ plugin_module = p.0.as_str()\n+ );\n+ let transform_span_guard = span.enter();\nserialized = swc_plugin_runner::apply_js_plugin(\n&p.0,\n&path,\n@@ -112,6 +127,7 @@ impl RustPlugins {\nconfig_json,\ncontext_json,\n)?;\n+ drop(transform_span_guard);\n}\n}\n",
"new_path": "crates/swc/src/plugin.rs",
"old_path": "crates/swc/src/plugin.rs"
},
{
"change_type": "MODIFY",
"diff": "@@ -34,7 +34,7 @@ swc_ecma_transforms_classes = {version = \"0.50.0\", path = \"../swc_ecma_transform\nswc_ecma_transforms_macros = {version = \"0.3.0\", path = \"../swc_ecma_transforms_macros\"}\nswc_ecma_utils = {version = \"0.68.0\", path = \"../swc_ecma_utils\"}\nswc_ecma_visit = {version = \"0.54.0\", path = \"../swc_ecma_visit\"}\n-swc_trace_macro = {versio = \"0.1.0\", path = \"../swc_trace_macro\"}\n+swc_trace_macro = {version = \"0.1.0\", path = \"../swc_trace_macro\"}\ntracing = \"0.1.31\"\n[dev-dependencies]\n",
"new_path": "crates/swc_ecma_transforms_compat/Cargo.toml",
"old_path": "crates/swc_ecma_transforms_compat/Cargo.toml"
},
{
"change_type": "MODIFY",
"diff": "@@ -16,6 +16,7 @@ serde = {version = \"1.0.126\", features = [\"derive\"]}\nserde_json = \"1.0.64\"\nswc_common = {version = \"0.17.0\", path = \"../swc_common\", features = [\"plugin-rt\", \"concurrent\"]}\nswc_ecma_ast = {version = \"0.68.0\", path = \"../swc_ecma_ast\", features = [\"rkyv-impl\"]}\n+tracing = \"0.1.31\"\nwasmer = \"2.1.1\"\nwasmer-cache = \"2.1.1\"\nwasmer-wasi = \"2.1.1\"\n",
"new_path": "crates/swc_plugin_runner/Cargo.toml",
"old_path": "crates/swc_plugin_runner/Cargo.toml"
},
{
"change_type": "MODIFY",
"diff": "@@ -195,6 +195,7 @@ struct HostEnvironment {\ntransform_result: Arc<Mutex<Vec<u8>>>,\n}\n+#[tracing::instrument(level = \"trace\", skip_all)]\nfn load_plugin(\nplugin_path: &Path,\ncache: &Lazy<PluginModuleCache>,\n@@ -347,6 +348,7 @@ struct PluginTransformTracker {\n}\nimpl PluginTransformTracker {\n+ #[tracing::instrument(level = \"trace\", skip(cache))]\nfn new(path: &Path, cache: &Lazy<PluginModuleCache>) -> Result<PluginTransformTracker, Error> {\nlet (instance, transform_result) = load_plugin(path, cache)?;\n@@ -414,6 +416,7 @@ impl PluginTransformTracker {\n}\n}\n+ #[tracing::instrument(level = \"trace\", skip_all)]\nfn transform(\n&mut self,\nprogram: &Serialized,\n",
"new_path": "crates/swc_plugin_runner/src/lib.rs",
"old_path": "crates/swc_plugin_runner/src/lib.rs"
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
feat(plugin): Support tracing plugin execution (#3744)
| 1
|
feat
|
plugin
|
306,885
|
25.02.2022 12:33:00
| -3,600
|
7e7816b5a856952f7f7d168bac595ac9ff0b01c2
|
chore(elements): enable source-maps in dev mode
|
[
{
"change_type": "MODIFY",
"diff": "\"scripts\": {\n\"build\": \"stencil build --docs --legacy && node scripts/generateWrappedIcons.js\",\n\"clean\": \"shx rm -rf dist\",\n- \"dev\": \"stencil build --docs --watch --legacy\",\n+ \"dev\": \"cross-env NODE_ENV=development stencil build --docs --watch --legacy\",\n\"lint\": \"eslint src\",\n\"lint:fix\": \"eslint src --fix\",\n\"test\": \"stencil test --e2e --ci\",\n\"@material/typography\": \"^8.0.0\",\n\"@stencil/core\": \"2.14.0\",\n\"@tiptap/core\": \"^2.0.0-beta.159\",\n- \"@tiptap/starter-kit\": \"^2.0.0-beta.164\",\n\"@tiptap/extension-link\": \"^2.0.0-beta.33\",\n+ \"@tiptap/starter-kit\": \"^2.0.0-beta.164\",\n\"autosize\": \"^4.0.2\",\n\"classnames\": \"^2.2.6\",\n\"date-fns\": \"^2.16.1\",\n\"@typescript-eslint/eslint-plugin\": \"^4.14.2\",\n\"@typescript-eslint/parser\": \"^4.14.2\",\n\"camelcase\": \"^5.0.0\",\n+ \"cross-env\": \"^7.0.3\",\n\"eslint\": \"^7.19.0\",\n\"eslint-config-prettier\": \"^7.2.0\",\n\"eslint-plugin-no-null\": \"^1.0.2\",\n",
"new_path": "packages/elements/package.json",
"old_path": "packages/elements/package.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -18,6 +18,7 @@ export const config: Config = {\n},\nglobalScript: './src/util/import-fonts.ts',\nenableCache: true,\n+ sourceMap: process.env.NODE_ENV === 'development',\nnamespace: 'inovex-elements',\noutputTargets: [\n{\n",
"new_path": "packages/elements/stencil.config.ts",
"old_path": "packages/elements/stencil.config.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -11450,7 +11450,14 @@ critters@0.0.10:\nparse5-htmlparser2-tree-adapter \"^6.0.1\"\npretty-bytes \"^5.3.0\"\n-cross-spawn@7.0.3, cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3:\n+cross-env@^7.0.3:\n+ version \"7.0.3\"\n+ resolved \"https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf\"\n+ integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==\n+ dependencies:\n+ cross-spawn \"^7.0.1\"\n+\n+cross-spawn@7.0.3, cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3:\nversion \"7.0.3\"\nresolved \"https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6\"\nintegrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==\n",
"new_path": "yarn.lock",
"old_path": "yarn.lock"
}
] |
TypeScript
|
MIT License
|
inovex/elements
|
chore(elements): enable source-maps in dev mode (#538)
| 1
|
chore
|
elements
|
129,350
|
25.02.2022 12:47:06
| -3,600
|
c5e65ccd006892990bea9c23cc3bf193c9b77523
|
refactor(git): use date as a function in GitTag to easily patch
|
[
{
"change_type": "MODIFY",
"diff": "@@ -320,7 +320,6 @@ def get_start_and_end_rev(\n\"\"\"\nstart: Optional[str] = None\nend: Optional[str] = None\n-\ntry:\nstart, end = version.split(\"..\")\nexcept ValueError:\n",
"new_path": "commitizen/changelog.py",
"old_path": "commitizen/changelog.py"
},
{
"change_type": "MODIFY",
"diff": "@@ -39,11 +39,15 @@ class GitTag(GitObject):\ndef __init__(self, name, rev, date):\nself.rev = rev.strip()\nself.name = name.strip()\n- self.date = date.strip()\n+ self._date = date.strip()\ndef __repr__(self):\nreturn f\"GitTag('{self.name}', '{self.rev}', '{self.date}')\"\n+ @property\n+ def date(self):\n+ return self._date\n+\n@classmethod\ndef from_line(cls, line: str, inner_delimiter: str) -> \"GitTag\":\n",
"new_path": "commitizen/git.py",
"old_path": "commitizen/git.py"
},
{
"change_type": "MODIFY",
"diff": "import sys\n+import time\n+\nfrom datetime import date\n+from unittest import mock\nimport pytest\n@@ -533,6 +536,7 @@ def test_changelog_with_filename_as_empty_string(mocker, changelog_path, config_\n@pytest.mark.usefixtures(\"tmp_commitizen_project\")\n@pytest.mark.freeze_time(\"2022-02-13\")\n+@mock.patch(\"commitizen.git.GitTag.date\", \"2022-02-13\")\ndef test_changelog_from_rev_first_version_from_arg(\nmocker, config_path, changelog_path, file_regression\n):\n@@ -541,17 +545,18 @@ def test_changelog_from_rev_first_version_from_arg(\n# create commit and tag\ncreate_file_and_commit(\"feat: new file\")\n+\ntestargs = [\"cz\", \"bump\", \"--yes\"]\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\n-\n+ time.sleep(0.5)\ncreate_file_and_commit(\"feat: after 0.2.0\")\ncreate_file_and_commit(\"feat: another feature\")\ntestargs = [\"cz\", \"bump\", \"--yes\"]\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\n-\n+ time.sleep(0.5)\ntestargs = [\"cz\", \"changelog\", \"0.2.0\"]\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\n@@ -564,6 +569,7 @@ def test_changelog_from_rev_first_version_from_arg(\n@pytest.mark.usefixtures(\"tmp_commitizen_project\")\n@pytest.mark.freeze_time(\"2022-02-13\")\n+@mock.patch(\"commitizen.git.GitTag.date\", \"2022-02-13\")\ndef test_changelog_from_rev_latest_version_from_arg(\nmocker, config_path, changelog_path, file_regression\n):\n@@ -575,14 +581,14 @@ def test_changelog_from_rev_latest_version_from_arg(\ntestargs = [\"cz\", \"bump\", \"--yes\"]\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\n-\n+ time.sleep(0.5)\ncreate_file_and_commit(\"feat: after 0.2.0\")\ncreate_file_and_commit(\"feat: another feature\")\ntestargs = [\"cz\", \"bump\", \"--yes\"]\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\n-\n+ time.sleep(0.5)\ntestargs = [\"cz\", \"changelog\", \"0.3.0\"]\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\n@@ -651,6 +657,7 @@ def test_changelog_from_rev_range_version_not_found(mocker, config_path):\n@pytest.mark.usefixtures(\"tmp_commitizen_project\")\n@pytest.mark.freeze_time(\"2022-02-13\")\n+@mock.patch(\"commitizen.git.GitTag.date\", \"2022-02-13\")\ndef test_changelog_from_rev_version_range_including_first_tag(\nmocker, config_path, changelog_path, file_regression\n):\n@@ -682,6 +689,7 @@ def test_changelog_from_rev_version_range_including_first_tag(\n@pytest.mark.usefixtures(\"tmp_commitizen_project\")\n@pytest.mark.freeze_time(\"2022-02-13\")\n+@mock.patch(\"commitizen.git.GitTag.date\", \"2022-02-13\")\ndef test_changelog_from_rev_version_range_from_arg(\nmocker, config_path, changelog_path, file_regression\n):\n@@ -693,19 +701,21 @@ def test_changelog_from_rev_version_range_from_arg(\ntestargs = [\"cz\", \"bump\", \"--yes\"]\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\n-\n+ time.sleep(0.5)\ncreate_file_and_commit(\"feat: after 0.2.0\")\ncreate_file_and_commit(\"feat: another feature\")\ntestargs = [\"cz\", \"bump\", \"--yes\"]\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\n+ time.sleep(0.5)\ncreate_file_and_commit(\"feat: getting ready for this\")\ntestargs = [\"cz\", \"bump\", \"--yes\"]\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\n+ time.sleep(0.5)\ntestargs = [\"cz\", \"changelog\", \"0.3.0..0.4.0\"]\nmocker.patch.object(sys, \"argv\", testargs)\n@@ -718,6 +728,7 @@ def test_changelog_from_rev_version_range_from_arg(\n@pytest.mark.usefixtures(\"tmp_commitizen_project\")\n@pytest.mark.freeze_time(\"2022-02-13\")\n+@mock.patch(\"commitizen.git.GitTag.date\", \"2022-02-13\")\ndef test_changelog_from_rev_version_with_big_range_from_arg(\nmocker, config_path, changelog_path, file_regression\n):\n@@ -726,9 +737,11 @@ def test_changelog_from_rev_version_with_big_range_from_arg(\n# create commit and tag\ncreate_file_and_commit(\"feat: new file\")\n+\ntestargs = [\"cz\", \"bump\", \"--yes\"]\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\n+ time.sleep(0.5)\ncreate_file_and_commit(\"feat: after 0.2.0\")\ncreate_file_and_commit(\"feat: another feature\")\n@@ -736,30 +749,32 @@ def test_changelog_from_rev_version_with_big_range_from_arg(\ntestargs = [\"cz\", \"bump\", \"--yes\"] # 0.3.0\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\n-\n+ time.sleep(0.5)\ncreate_file_and_commit(\"feat: getting ready for this\")\ntestargs = [\"cz\", \"bump\", \"--yes\"] # 0.4.0\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\n-\n+ time.sleep(0.5)\ncreate_file_and_commit(\"fix: small error\")\ntestargs = [\"cz\", \"bump\", \"--yes\"] # 0.4.1\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\n-\n+ time.sleep(0.5)\ncreate_file_and_commit(\"feat: new shinny feature\")\ntestargs = [\"cz\", \"bump\", \"--yes\"] # 0.5.0\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\n-\n+ time.sleep(0.5)\ncreate_file_and_commit(\"feat: amazing different shinny feature\")\n+ # dirty hack to avoid same time between tags\ntestargs = [\"cz\", \"bump\", \"--yes\"] # 0.6.0\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\n+ time.sleep(0.5)\ntestargs = [\"cz\", \"changelog\", \"0.3.0..0.5.0\"]\nmocker.patch.object(sys, \"argv\", testargs)\n@@ -772,6 +787,7 @@ def test_changelog_from_rev_version_with_big_range_from_arg(\n@pytest.mark.usefixtures(\"tmp_commitizen_project\")\n@pytest.mark.freeze_time(\"2022-02-13\")\n+@mock.patch(\"commitizen.git.GitTag.date\", \"2022-02-13\")\ndef test_changelog_from_rev_latest_version_dry_run(\nmocker, capsys, config_path, changelog_path, file_regression\n):\n@@ -784,7 +800,7 @@ def test_changelog_from_rev_latest_version_dry_run(\ntestargs = [\"cz\", \"bump\", \"--yes\"]\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\n-\n+ time.sleep(0.5)\ncreate_file_and_commit(\"feat: after 0.2.0\")\ncreate_file_and_commit(\"feat: another feature\")\n@@ -792,7 +808,7 @@ def test_changelog_from_rev_latest_version_dry_run(\nmocker.patch.object(sys, \"argv\", testargs)\ncli.main()\ncapsys.readouterr()\n-\n+ time.sleep(0.5)\ntestargs = [\"cz\", \"changelog\", \"0.3.0\", \"--dry-run\"]\nmocker.patch.object(sys, \"argv\", testargs)\nwith pytest.raises(DryRunExit):\n",
"new_path": "tests/commands/test_changelog_command.py",
"old_path": "tests/commands/test_changelog_command.py"
}
] |
Python
|
MIT License
|
commitizen-tools/commitizen
|
refactor(git): use date as a function in GitTag to easily patch
| 1
|
refactor
|
git
|
841,498
|
25.02.2022 12:50:04
| 0
|
342dccce473aa507eabb3eed96485e2ff0674188
|
fix(es/parser): Handle trailing comma and bracket after an arrow function in conditional
|
[
{
"change_type": "MODIFY",
"diff": "@@ -707,7 +707,7 @@ impl<'a, I: Tokens> Parser<I> {\nparams.is_simple_parameter_list(),\n)?;\n- if is_direct_child_of_cond && !is_one_of!(p, ':', ';') {\n+ if is_direct_child_of_cond && !is_one_of!(p, ':', ';', ',', ')') {\ntrace_cur!(p, parse_arrow_in_cond__fail);\nunexpected!(p, \"fail\")\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": "@@ -494,6 +494,26 @@ fn super_expr_computed() {\n);\n}\n+#[test]\n+fn issue_3672_1() {\n+ test_parser(\n+ \"report({\n+ fix: fixable ? null : (): RuleFix => {},\n+});\",\n+ Syntax::Typescript(Default::default()),\n+ |p| p.parse_module(),\n+ );\n+}\n+\n+#[test]\n+fn issue_3672_2() {\n+ test_parser(\n+ \"f(a ? (): void => { } : (): void => { })\",\n+ Syntax::Typescript(Default::default()),\n+ |p| p.parse_module(),\n+ );\n+}\n+\n#[bench]\nfn bench_new_expr_ts(b: &mut Bencher) {\nbench_parser(\n",
"new_path": "crates/swc_ecma_parser/src/parser/expr/tests.rs",
"old_path": "crates/swc_ecma_parser/src/parser/expr/tests.rs"
},
{
"change_type": "DELETE",
"diff": "-const x = {\n- prop: isCorrect\n- ? fn => ({ })\n- : fn => true,\n-};\n\\ No newline at end of file\n",
"new_path": null,
"old_path": "crates/swc_ecma_parser/tests/typescript/issue-2174/case1/input.ts"
},
{
"change_type": "DELETE",
"diff": "-{\n- \"type\": \"Script\",\n- \"span\": {\n- \"start\": 0,\n- \"end\": 82,\n- \"ctxt\": 0\n- },\n- \"body\": [\n- {\n- \"type\": \"VariableDeclaration\",\n- \"span\": {\n- \"start\": 0,\n- \"end\": 82,\n- \"ctxt\": 0\n- },\n- \"kind\": \"const\",\n- \"declare\": false,\n- \"declarations\": [\n- {\n- \"type\": \"VariableDeclarator\",\n- \"span\": {\n- \"start\": 6,\n- \"end\": 81,\n- \"ctxt\": 0\n- },\n- \"id\": {\n- \"type\": \"Identifier\",\n- \"span\": {\n- \"start\": 6,\n- \"end\": 7,\n- \"ctxt\": 0\n- },\n- \"value\": \"x\",\n- \"optional\": false,\n- \"typeAnnotation\": null\n- },\n- \"init\": {\n- \"type\": \"ObjectExpression\",\n- \"span\": {\n- \"start\": 10,\n- \"end\": 81,\n- \"ctxt\": 0\n- },\n- \"properties\": [\n- {\n- \"type\": \"KeyValueProperty\",\n- \"key\": {\n- \"type\": \"Identifier\",\n- \"span\": {\n- \"start\": 16,\n- \"end\": 20,\n- \"ctxt\": 0\n- },\n- \"value\": \"prop\",\n- \"optional\": false\n- },\n- \"value\": {\n- \"type\": \"ConditionalExpression\",\n- \"span\": {\n- \"start\": 22,\n- \"end\": 78,\n- \"ctxt\": 0\n- },\n- \"test\": {\n- \"type\": \"Identifier\",\n- \"span\": {\n- \"start\": 22,\n- \"end\": 31,\n- \"ctxt\": 0\n- },\n- \"value\": \"isCorrect\",\n- \"optional\": false\n- },\n- \"consequent\": {\n- \"type\": \"ArrowFunctionExpression\",\n- \"span\": {\n- \"start\": 42,\n- \"end\": 53,\n- \"ctxt\": 0\n- },\n- \"params\": [\n- {\n- \"type\": \"Identifier\",\n- \"span\": {\n- \"start\": 42,\n- \"end\": 44,\n- \"ctxt\": 0\n- },\n- \"value\": \"fn\",\n- \"optional\": false,\n- \"typeAnnotation\": null\n- }\n- ],\n- \"body\": {\n- \"type\": \"ParenthesisExpression\",\n- \"span\": {\n- \"start\": 48,\n- \"end\": 53,\n- \"ctxt\": 0\n- },\n- \"expression\": {\n- \"type\": \"ObjectExpression\",\n- \"span\": {\n- \"start\": 49,\n- \"end\": 52,\n- \"ctxt\": 0\n- },\n- \"properties\": []\n- }\n- },\n- \"async\": false,\n- \"generator\": false,\n- \"typeParameters\": null,\n- \"returnType\": null\n- },\n- \"alternate\": {\n- \"type\": \"ArrowFunctionExpression\",\n- \"span\": {\n- \"start\": 68,\n- \"end\": 78,\n- \"ctxt\": 0\n- },\n- \"params\": [\n- {\n- \"type\": \"Identifier\",\n- \"span\": {\n- \"start\": 68,\n- \"end\": 70,\n- \"ctxt\": 0\n- },\n- \"value\": \"fn\",\n- \"optional\": false,\n- \"typeAnnotation\": null\n- }\n- ],\n- \"body\": {\n- \"type\": \"BooleanLiteral\",\n- \"span\": {\n- \"start\": 74,\n- \"end\": 78,\n- \"ctxt\": 0\n- },\n- \"value\": true\n- },\n- \"async\": false,\n- \"generator\": false,\n- \"typeParameters\": null,\n- \"returnType\": null\n- }\n- }\n- }\n- ]\n- },\n- \"definite\": false\n- }\n- ]\n- }\n- ],\n- \"interpreter\": null\n-}\n",
"new_path": null,
"old_path": "crates/swc_ecma_parser/tests/typescript/issue-2174/case1/input.ts.json"
},
{
"change_type": "DELETE",
"diff": "-const x = {\n- prop: isCorrect\n- ? fn => ({ })\n- : fn => true,\n-};\n\\ No newline at end of file\n",
"new_path": null,
"old_path": "crates/swc_ecma_parser/tests/typescript/issue-2174/case2/input.tsx"
},
{
"change_type": "DELETE",
"diff": "-{\n- \"type\": \"Script\",\n- \"span\": {\n- \"start\": 0,\n- \"end\": 82,\n- \"ctxt\": 0\n- },\n- \"body\": [\n- {\n- \"type\": \"VariableDeclaration\",\n- \"span\": {\n- \"start\": 0,\n- \"end\": 82,\n- \"ctxt\": 0\n- },\n- \"kind\": \"const\",\n- \"declare\": false,\n- \"declarations\": [\n- {\n- \"type\": \"VariableDeclarator\",\n- \"span\": {\n- \"start\": 6,\n- \"end\": 81,\n- \"ctxt\": 0\n- },\n- \"id\": {\n- \"type\": \"Identifier\",\n- \"span\": {\n- \"start\": 6,\n- \"end\": 7,\n- \"ctxt\": 0\n- },\n- \"value\": \"x\",\n- \"optional\": false,\n- \"typeAnnotation\": null\n- },\n- \"init\": {\n- \"type\": \"ObjectExpression\",\n- \"span\": {\n- \"start\": 10,\n- \"end\": 81,\n- \"ctxt\": 0\n- },\n- \"properties\": [\n- {\n- \"type\": \"KeyValueProperty\",\n- \"key\": {\n- \"type\": \"Identifier\",\n- \"span\": {\n- \"start\": 16,\n- \"end\": 20,\n- \"ctxt\": 0\n- },\n- \"value\": \"prop\",\n- \"optional\": false\n- },\n- \"value\": {\n- \"type\": \"ConditionalExpression\",\n- \"span\": {\n- \"start\": 22,\n- \"end\": 78,\n- \"ctxt\": 0\n- },\n- \"test\": {\n- \"type\": \"Identifier\",\n- \"span\": {\n- \"start\": 22,\n- \"end\": 31,\n- \"ctxt\": 0\n- },\n- \"value\": \"isCorrect\",\n- \"optional\": false\n- },\n- \"consequent\": {\n- \"type\": \"ArrowFunctionExpression\",\n- \"span\": {\n- \"start\": 42,\n- \"end\": 53,\n- \"ctxt\": 0\n- },\n- \"params\": [\n- {\n- \"type\": \"Identifier\",\n- \"span\": {\n- \"start\": 42,\n- \"end\": 44,\n- \"ctxt\": 0\n- },\n- \"value\": \"fn\",\n- \"optional\": false,\n- \"typeAnnotation\": null\n- }\n- ],\n- \"body\": {\n- \"type\": \"ParenthesisExpression\",\n- \"span\": {\n- \"start\": 48,\n- \"end\": 53,\n- \"ctxt\": 0\n- },\n- \"expression\": {\n- \"type\": \"ObjectExpression\",\n- \"span\": {\n- \"start\": 49,\n- \"end\": 52,\n- \"ctxt\": 0\n- },\n- \"properties\": []\n- }\n- },\n- \"async\": false,\n- \"generator\": false,\n- \"typeParameters\": null,\n- \"returnType\": null\n- },\n- \"alternate\": {\n- \"type\": \"ArrowFunctionExpression\",\n- \"span\": {\n- \"start\": 68,\n- \"end\": 78,\n- \"ctxt\": 0\n- },\n- \"params\": [\n- {\n- \"type\": \"Identifier\",\n- \"span\": {\n- \"start\": 68,\n- \"end\": 70,\n- \"ctxt\": 0\n- },\n- \"value\": \"fn\",\n- \"optional\": false,\n- \"typeAnnotation\": null\n- }\n- ],\n- \"body\": {\n- \"type\": \"BooleanLiteral\",\n- \"span\": {\n- \"start\": 74,\n- \"end\": 78,\n- \"ctxt\": 0\n- },\n- \"value\": true\n- },\n- \"async\": false,\n- \"generator\": false,\n- \"typeParameters\": null,\n- \"returnType\": null\n- }\n- }\n- }\n- ]\n- },\n- \"definite\": false\n- }\n- ]\n- }\n- ],\n- \"interpreter\": null\n-}\n",
"new_path": null,
"old_path": "crates/swc_ecma_parser/tests/typescript/issue-2174/case2/input.tsx.json"
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
fix(es/parser): Handle trailing comma and bracket after an arrow function in conditional (#3685)
| 1
|
fix
|
es/parser
|
317,646
|
25.02.2022 12:51:38
| -3,600
|
e6fd50a48f42d8684393a26833364015501188bb
|
feat(init): remote config
|
[
{
"change_type": "MODIFY",
"diff": "@@ -30,9 +30,6 @@ brew update && brew upgrade && exec zsh\n## Replace your existing prompt\n-The guides below assume you copied the theme called `jandedobbeleer.omp.json` to your user's `$HOME` folder.\n-When using brew, you can find this one at `$(brew --prefix oh-my-posh)/share/oh-my-posh/themes/jandedobbeleer.omp.json`.\n-\n[brew]: https://brew.sh\n[nextsteps]: https://docs.brew.sh/Homebrew-on-Linux#install\n[themes]: https://ohmyposh.dev/docs/themes\n",
"new_path": "docs/docs/install-homebrew.mdx",
"old_path": "docs/docs/install-homebrew.mdx"
},
{
"change_type": "MODIFY",
"diff": "@@ -60,9 +60,6 @@ rm ~/.poshthemes/themes.zip\n## Replace your existing prompt\n-The guides below assume you copied the theme called `jandedobbeleer.omp.json` to your user's `$HOME` folder.\n-When you've downloaded the themes, you can find this one at `~/.poshthemes/jandedobbeleer.omp.json`.\n-\n</TabItem>\n</Tabs>\n",
"new_path": "docs/docs/install-linux.mdx",
"old_path": "docs/docs/install-linux.mdx"
},
{
"change_type": "MODIFY",
"diff": "@@ -41,7 +41,7 @@ Import-Module oh-my-posh\n:::\n```powershell\n-oh-my-posh --init --shell pwsh --config ~/jandedobbeleer.omp.json | Invoke-Expression\n+oh-my-posh --init --shell pwsh --config https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v$(oh-my-posh --version)/themes/jandedobbeleer.omp.json | Invoke-Expression\n```\nOnce added, reload your profile for the changes to take effect.\n@@ -65,7 +65,7 @@ Use the full path to the config file, not the relative path.\n:::\n```lua title=\"oh-my-posh.lua\"\n-load(io.popen('oh-my-posh --config=\"C:/Users/jan/jandedobbeleer.omp.json\" --init --shell cmd'):read(\"*a\"))()\n+load(io.popen('oh-my-posh --config=\"https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/jandedobbeleer.omp.json\" --init --shell cmd'):read(\"*a\"))()\n```\nOnce added, restart cmd for the changes to take effect.\n@@ -76,7 +76,7 @@ Once added, restart cmd for the changes to take effect.\nAdd the following to `~/.zshrc`:\n```bash\n-eval \"$(oh-my-posh --init --shell zsh --config ~/jandedobbeleer.omp.json)\"\n+eval \"$(oh-my-posh --init --shell zsh --config https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v$(oh-my-posh --version)/themes/jandedobbeleer.omp.json)\"\n```\nOnce added, reload your profile for the changes to take effect.\n@@ -91,7 +91,7 @@ source ~/.zshrc\nAdd the following to `~/.bashrc` (could be `~/.profile` or `~/.bash_profile` depending on your environment):\n```bash\n-eval \"$(oh-my-posh --init --shell bash --config ~/jandedobbeleer.omp.json)\"\n+eval \"$(oh-my-posh --init --shell bash --config https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v$(oh-my-posh --version)/themes/jandedobbeleer.omp.json)\"\n```\nOnce added, reload your profile for the changes to take effect.\n@@ -116,7 +116,7 @@ It's advised to be on the latest version of fish. Versions below 3.1.2 have issu\nInitialize Oh My Posh in `~/.config/fish/config.fish`:\n```bash\n-oh-my-posh --init --shell fish --config ~/jandedobbeleer.omp.json | source\n+oh-my-posh --init --shell fish --config hhttps://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v(oh-my-posh --version)/themes/jandedobbeleer.omp.json | source\n```\nOnce added, reload your config for the changes to take effect.\n@@ -133,13 +133,13 @@ Set the prompt and restart nu shell:\n### Nu < 0.32.0\n```bash\n-config set prompt \"= `{{$(oh-my-posh --config ~/jandedobbeleer.omp.json | str collect)}}`\"\n+config set prompt \"= `{{$(oh-my-posh --config https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/jandedobbeleer.omp.json | str collect)}}`\"\n```\n### Nu >= 0.32.0\n```bash\n-config set prompt \"(oh-my-posh --config ~/jandedobbeleer.omp.json | str collect)\"\n+config set prompt \"(oh-my-posh --config https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/jandedobbeleer.omp.json | str collect)\"\n```\nRestart nu shell 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": "@@ -164,8 +164,6 @@ when setting the prompt using the `--config` flag.\n</TabItem>\n</Tabs>\n-The guides below assume you copied the theme called `jandedobbeleer.omp.json` to your user's `$HOME` folder.\n-\n:::caution\nWhen using oh-my-posh inside the WSL, make sure to follow the [linux][linux] installation guide.\n:::\n",
"new_path": "docs/docs/install-windows.mdx",
"old_path": "docs/docs/install-windows.mdx"
},
{
"change_type": "MODIFY",
"diff": "@@ -37,7 +37,7 @@ const (\nplain = \"shell\"\n)\n-func getExecutablePath(shell string) (string, error) {\n+func getExecutablePath(env environment.Environment) (string, error) {\nexecutable, err := os.Executable()\nif err != nil {\nreturn \"\", err\n@@ -46,7 +46,7 @@ func getExecutablePath(shell string) (string, error) {\n// which uses unix style paths to resolve the executable's location.\n// PowerShell knows how to resolve both, so we can swap this without any issue.\nexecutable = strings.ReplaceAll(executable, \"\\\\\", \"/\")\n- switch shell {\n+ switch *env.Args().Shell {\ncase bash, zsh:\nexecutable = strings.ReplaceAll(executable, \" \", \"\\\\ \")\nexecutable = strings.ReplaceAll(executable, \"(\", \"\\\\(\")\n@@ -56,26 +56,29 @@ func getExecutablePath(shell string) (string, error) {\nreturn executable, nil\n}\n-func InitShell(shell, configFile string) string {\n- executable, err := getExecutablePath(shell)\n+func InitShell(env environment.Environment) string {\n+ executable, err := getExecutablePath(env)\nif err != nil {\nreturn noExe\n}\n+ shell := *env.Args().Shell\nswitch shell {\ncase pwsh, powershell5:\n- return fmt.Sprintf(\"(@(&\\\"%s\\\" --print-init --shell=%s --config=\\\"%s\\\") -join \\\"`n\\\") | Invoke-Expression\", executable, shell, configFile)\n+ return fmt.Sprintf(\"(@(&\\\"%s\\\" --print-init --shell=%s --config=\\\"%s\\\") -join \\\"`n\\\") | Invoke-Expression\", executable, shell, *env.Args().Config)\ncase zsh, bash, fish, winCMD:\n- return PrintShellInit(shell, configFile)\n+ return PrintShellInit(env)\ndefault:\nreturn fmt.Sprintf(\"echo \\\"No initialization script available for %s\\\"\", shell)\n}\n}\n-func PrintShellInit(shell, configFile string) string {\n- executable, err := getExecutablePath(shell)\n+func PrintShellInit(env environment.Environment) string {\n+ executable, err := getExecutablePath(env)\nif err != nil {\nreturn noExe\n}\n+ shell := *env.Args().Shell\n+ configFile := *env.Args().Config\nswitch shell {\ncase pwsh, powershell5:\nreturn getShellInitScript(executable, configFile, pwshInit)\n",
"new_path": "src/engine/init.go",
"old_path": "src/engine/init.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -5,9 +5,11 @@ import (\n\"context\"\n\"errors\"\n\"fmt\"\n+ \"io\"\n\"io/ioutil\"\n\"log\"\n\"net/http\"\n+ \"net/url\"\n\"oh-my-posh/regex\"\n\"os\"\n\"os/exec\"\n@@ -228,10 +230,33 @@ func (env *ShellEnvironment) Init(args *Args) {\n}\n}\n+func (env *ShellEnvironment) getConfigPath(location string) {\n+ cfg, err := env.HTTPRequest(location, 5000)\n+ if err != nil {\n+ return\n+ }\n+ configPath := filepath.Join(env.CachePath(), \"config.omp.json\")\n+ out, err := os.Create(configPath)\n+ if err != nil {\n+ return\n+ }\n+ defer out.Close()\n+ _, err = io.Copy(out, bytes.NewReader(cfg))\n+ if err != nil {\n+ return\n+ }\n+ env.args.Config = &configPath\n+}\n+\nfunc (env *ShellEnvironment) ResolveConfigPath() {\nif env.args == nil || env.args.Config == nil || len(*env.args.Config) == 0 {\nreturn\n}\n+ location, err := url.ParseRequestURI(*env.Args().Config)\n+ if err == nil {\n+ env.getConfigPath(location.String())\n+ return\n+ }\n// Cygwin path always needs the full path as we're on Windows but not really.\n// Doing filepath actions will convert it to a Windows path and break the init script.\nif env.Platform() == WindowsPlatform && env.Shell() == \"bash\" {\n@@ -560,11 +585,11 @@ func (env *ShellEnvironment) Shell() string {\nreturn *env.args.Shell\n}\n-func (env *ShellEnvironment) HTTPRequest(url string, timeout int, requestModifiers ...HTTPRequestModifier) ([]byte, error) {\n- defer env.trace(time.Now(), \"HTTPRequest\", url)\n+func (env *ShellEnvironment) HTTPRequest(targetURL string, timeout int, requestModifiers ...HTTPRequestModifier) ([]byte, error) {\n+ defer env.trace(time.Now(), \"HTTPRequest\", targetURL)\nctx, cncl := context.WithTimeout(context.Background(), time.Millisecond*time.Duration(timeout))\ndefer cncl()\n- request, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)\n+ request, err := http.NewRequestWithContext(ctx, http.MethodGet, targetURL, nil)\nif err != nil {\nreturn nil, err\n}\n",
"new_path": "src/environment/shell.go",
"old_path": "src/environment/shell.go"
},
{
"change_type": "MODIFY",
"diff": "@@ -167,12 +167,12 @@ func main() {\nreturn\n}\nif *args.Init {\n- init := engine.InitShell(*args.Shell, *args.Config)\n+ init := engine.InitShell(env)\nfmt.Print(init)\nreturn\n}\nif *args.PrintInit {\n- init := engine.PrintShellInit(*args.Shell, *args.Config)\n+ init := engine.PrintShellInit(env)\nfmt.Print(init)\nreturn\n}\n",
"new_path": "src/main.go",
"old_path": "src/main.go"
}
] |
Go
|
MIT License
|
jandedobbeleer/oh-my-posh
|
feat(init): remote config
| 1
|
feat
|
init
|
73,354
|
25.02.2022 12:56:29
| 28,800
|
0234b72f3758137f0abf68485a7032eef385821f
|
ci: add yuth to mergify
|
[
{
"change_type": "MODIFY",
"diff": "@@ -30,7 +30,7 @@ pull_request_rules:\nlabel:\nadd: [contribution/core]\nconditions:\n- - author~=^(eladb|RomainMuller|garnaat|nija-at|skinny85|rix0rrr|NGL321|Jerry-AWS|SomayaB|MrArnoldPalmer|NetaNir|iliapolo|njlynch|madeline-k|BenChaimberg|comcalvi|kaizen3031593|Chriscbr|corymhall|otaviomacedo)$\n+ - author~=^(eladb|RomainMuller|garnaat|nija-at|skinny85|rix0rrr|NGL321|Jerry-AWS|SomayaB|MrArnoldPalmer|NetaNir|iliapolo|njlynch|madeline-k|BenChaimberg|comcalvi|kaizen3031593|Chriscbr|corymhall|otaviomacedo|yuth)$\n- -label~=\"contribution/core\"\n- name: Tell them we're good now\nactions:\n",
"new_path": ".mergify/config.yml",
"old_path": ".mergify/config.yml"
}
] |
TypeScript
|
Apache License 2.0
|
aws/jsii
|
ci: add yuth to mergify (#3396)
| 1
|
ci
| null |
688,450
|
25.02.2022 13:27:16
| -10,800
|
efbc8711412bb6bf0b3a078fcd2fb7d4edc5948b
|
fix(Tooltip): skip some failing cypress tests
No need to run tests or get approvals. Will get fixed immediately. Just unblocking the master branch.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -307,7 +307,7 @@ describe('Tooltip', () => {\ncy.get('body').happoScreenshot()\n})\n- it('renders on hover, and hides on click', () => {\n+ it.skip('renders on hover, and hides on click', () => {\nmount(<BasicTooltipExample />)\n// hover outside trigger button to be sure that content shouldnt be seen\ncy.get('[data-testid=\"tooltip-trigger\"').realHover({\n@@ -322,7 +322,7 @@ describe('Tooltip', () => {\ncy.get('[data-testid=\"tooltip-content\"').should('not.be.visible')\n})\n- it('renders on hover, and hides on click for Checkbox', () => {\n+ it.skip('renders on hover, and hides on click for Checkbox', () => {\nmount(<CheckboxTooltipExample />)\n// hover outside trigger button to be sure that content shouldnt be seen\ncy.get('[data-testid=\"tooltip-trigger\"]')\n@@ -338,7 +338,7 @@ describe('Tooltip', () => {\ncy.get('[data-testid=\"tooltip-content\"').should('not.be.visible')\n})\n- it('renders on hover, and hides on click for Radio', () => {\n+ it.skip('renders on hover, and hides on click for Radio', () => {\nmount(<RadioTooltipExample />)\n// hover outside trigger button to be sure that content shouldnt be seen\ncy.get('[data-testid=\"trigger\"').realHover({ position: { x: 0, y: -200 } })\n@@ -350,7 +350,7 @@ describe('Tooltip', () => {\ncy.get('[data-testid=\"tooltip-content\"').should('not.be.visible')\n})\n- it('renders on hover, hides on click, and does not render again until the mouse leave trigger element boundaries', () => {\n+ it.skip('renders on hover, hides on click, and does not render again until the mouse leave trigger element boundaries', () => {\nmount(<BasicTooltipExample />)\n// hover outside trigger button to be sure that content shouldnt be seen\ncy.get('[data-testid=\"tooltip-trigger\"').realHover({\n@@ -370,7 +370,7 @@ describe('Tooltip', () => {\ncy.get('[data-testid=\"tooltip-content\"').should('not.be.visible')\n})\n- it('renders interactive content', () => {\n+ it.skip('renders interactive content', () => {\nmount(<LinkTooltipExample />)\ncy.get('[data-testid=\"tooltip-trigger\"]').as('Trigger').realHover()\ncy.get('[data-testid=\"tooltip-content\"]').as('Content').should('be.visible')\n",
"new_path": "cypress/component/Tooltip.spec.tsx",
"old_path": "cypress/component/Tooltip.spec.tsx"
}
] |
TypeScript
|
MIT License
|
toptal/picasso
|
fix(Tooltip): skip some failing cypress tests (#2470)
No need to run tests or get approvals. Will get fixed immediately. Just unblocking the master branch.
| 1
|
fix
|
Tooltip
|
699,187
|
25.02.2022 13:53:18
| 28,800
|
1f564a931b9a844a9d097edb2012c65692af9bd4
|
fix(select): select and option background color
|
[
{
"change_type": "ADD",
"diff": "+---\n+'@twilio-paste/style-props': patch\n+'@twilio-paste/core': patch\n+---\n+\n+[Style Props] add inherit as a background color option\n",
"new_path": ".changeset/late-rules-add.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+---\n+'@twilio-paste/select': patch\n+'@twilio-paste/core': patch\n+---\n+\n+[Select] set the background color on the select, option, and optionGroup\n",
"new_path": ".changeset/twenty-seals-tickle.md",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -23,7 +23,7 @@ const Option = React.forwardRef<HTMLOptionElement, OptionProps>(({children, elem\nsize={undefined}\nheight={undefined}\nwidth={undefined}\n- background=\"none\"\n+ backgroundColor=\"inherit\"\ncolor=\"inherit\"\nfontFamily=\"fontFamilyText\"\nlineHeight=\"lineHeight50\"\n",
"new_path": "packages/paste-core/components/select/src/Option.tsx",
"old_path": "packages/paste-core/components/select/src/Option.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -18,7 +18,7 @@ const OptionGroup = React.forwardRef<HTMLOptGroupElement, OptionGroupProps>(\n{...safelySpreadBoxProps(props)}\nelement={element}\nas=\"optgroup\"\n- background=\"none\"\n+ backgroundColor=\"inherit\"\ncolor=\"inherit\"\nfontFamily=\"fontFamilyText\"\nfontWeight=\"fontWeightMedium\"\n",
"new_path": "packages/paste-core/components/select/src/OptionGroup.tsx",
"old_path": "packages/paste-core/components/select/src/OptionGroup.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -31,7 +31,7 @@ export const SelectElement = React.forwardRef<HTMLSelectElement, SelectProps>(\n// We want the size attribute on the HTML element to set the height, not the css\nheight={undefined}\nappearance=\"none\"\n- background=\"none\"\n+ backgroundColor={variant === 'inverse' ? 'colorBackgroundInverse' : 'colorBackground'}\nborder=\"none\"\nborderRadius=\"borderRadius20\"\nboxShadow=\"none\"\n",
"new_path": "packages/paste-core/components/select/src/Select.tsx",
"old_path": "packages/paste-core/components/select/src/Select.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -6,7 +6,7 @@ import type {StyleReset} from './helpers';\n// Tokens\nexport type BackgroundColorOptions = keyof ThemeShape['backgroundColors'];\n-export type BackgroundColor = ResponsiveValue<BackgroundColorOptions | 'none' | 'transparent'>;\n+export type BackgroundColor = ResponsiveValue<BackgroundColorOptions | 'none' | 'transparent' | 'inherit'>;\n// CSS native\nexport type BackgroundImageOptions = CSS.BackgroundImageProperty;\n",
"new_path": "packages/paste-style-props/src/types/background.ts",
"old_path": "packages/paste-style-props/src/types/background.ts"
}
] |
TypeScript
|
MIT License
|
twilio-labs/paste
|
fix(select): select and option background color (#2242)
| 1
|
fix
|
select
|
865,917
|
25.02.2022 13:54:46
| -3,600
|
12dc1fb848a6e3bd45276f4cc68bb1cee5443d1f
|
chore(applyDefaultTemplates): configure change command
Moved to `bpmn-shared' folder.
|
[
{
"change_type": "RENAME",
"diff": "@@ -158,6 +158,7 @@ function getDependencies(mockModules = {}) {\neventBus: {\non(_, callback) { callback(); }\n},\n+ 'config.changeTemplateCommand': 'propertiesPanel.camunda.changeTemplate',\n...mockModules\n}\n});\n",
"new_path": "client/src/app/tabs/bpmn-shared/modeler/features/apply-default-templates/__tests__/applyDefaultTemplatesSpec.js",
"old_path": "client/src/app/tabs/bpmn/modeler/features/apply-default-templates/__tests__/applyDefaultTemplatesSpec.js"
},
{
"change_type": "RENAME",
"diff": "* except in compliance with the MIT License.\n*/\n-export default function applyDefaultTemplates(elementRegistry, elementTemplates, commandStack) {\n+export default function applyDefaultTemplates(elementRegistry, elementTemplates, commandStack, changeTemplateCommand) {\nconst elements = elementRegistry.getAll();\nconst commands = elements.reduce((currentCommands, element) => {\n@@ -18,7 +18,7 @@ export default function applyDefaultTemplates(elementRegistry, elementTemplates,\nreturn currentCommands;\n}\n- const command = getChangeTemplateCommand(element, template);\n+ const command = getChangeTemplateCommand(element, template, changeTemplateCommand);\nreturn [ ...currentCommands, command ];\n}, []);\n@@ -41,9 +41,9 @@ applyDefaultTemplates.$inject = [\n// helpers //////////\n-function getChangeTemplateCommand(element, template) {\n+function getChangeTemplateCommand(element, template, cmd) {\nreturn {\n- cmd: 'propertiesPanel.camunda.changeTemplate',\n+ cmd: cmd,\ncontext: {\nelement,\nnewTemplate: template\n",
"new_path": "client/src/app/tabs/bpmn-shared/modeler/features/apply-default-templates/applyDefaultTemplates.js",
"old_path": "client/src/app/tabs/bpmn/modeler/features/apply-default-templates/applyDefaultTemplates.js"
}
] |
JavaScript
|
MIT License
|
camunda/camunda-modeler
|
chore(applyDefaultTemplates): configure change command
Moved to `bpmn-shared' folder.
| 1
|
chore
|
applyDefaultTemplates
|
865,917
|
25.02.2022 13:55:24
| -3,600
|
74bd8dd16bab107807be3592c7ec2ff118a34c3c
|
feat(util): add elementTemplates util
|
[
{
"change_type": "ADD",
"diff": "+/**\n+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n+ * under one or more contributor license agreements. See the NOTICE file\n+ * distributed with this work for additional information regarding copyright\n+ * ownership.\n+ *\n+ * Camunda licenses this file to you under the MIT; you may not use this file\n+ * except in compliance with the MIT License.\n+ */\n+\n+import { map } from 'min-dash';\n+\n+import templates from './fixtures/templates.json';\n+\n+import { getPlatformTemplates, getCloudTemplates } from '../elementTemplates';\n+\n+\n+describe('util - elementTemplates', function() {\n+\n+ it('should get platform templates', function() {\n+\n+ // when\n+ const platformTemplates = getPlatformTemplates(templates);\n+\n+ // then\n+ expect(withNames(platformTemplates)).to.eql([\n+ 'Platform Task 1',\n+ 'Platform Task 2',\n+ 'No schema',\n+ 'Platform Task 3'\n+ ]);\n+ });\n+\n+\n+ it('should get cloud templates', function() {\n+\n+ // when\n+ const cloudTemplates = getCloudTemplates(templates);\n+\n+ // then\n+ expect(withNames(cloudTemplates)).to.eql([\n+ 'Cloud Task 1',\n+ 'Cloud Task 2',\n+ 'Cloud Task 3'\n+ ]);\n+ });\n+\n+});\n+\n+\n+// helper /////////////\n+\n+function withNames(templates) {\n+ return map(templates, template => template.name);\n+}\n\\ No newline at end of file\n",
"new_path": "client/src/util/__tests__/elementTemplatesSpec.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+[\n+ {\n+ \"$schema\": \"https://unpkg.com/@camunda/element-templates-json-schema@0.6.0/resources/schema.json\",\n+ \"name\": \"Platform Task 1\",\n+ \"id\": \"com.camunda.example.PlatformTask-1\",\n+ \"appliesTo\": [\n+ \"bpmn:ServiceTask\"\n+ ],\n+ \"properties\": []\n+ },\n+ {\n+ \"$schema\": \"https://unpkg.com/@camunda/element-templates-json-schema@0.6.0/resources/schema.json\",\n+ \"name\": \"Platform Task 2\",\n+ \"id\": \"com.camunda.example.PlatformTask-1\",\n+ \"appliesTo\": [\n+ \"bpmn:ServiceTask\"\n+ ],\n+ \"properties\": []\n+ },\n+ {\n+ \"$schema\": \"https://unpkg.com/@camunda/zeebe-element-templates-json-schema@0.1.0/resources/schema.json\",\n+ \"name\": \"Cloud Task 1\",\n+ \"id\": \"com.camunda.example.CloudTask-1\",\n+ \"appliesTo\": [\n+ \"bpmn:ServiceTask\"\n+ ],\n+ \"properties\": []\n+ },\n+ {\n+ \"$schema\": \"https://unpkg.com/@camunda/zeebe-element-templates-json-schema@0.1.0/resources/schema.json\",\n+ \"name\": \"Cloud Task 2\",\n+ \"id\": \"com.camunda.example.CloudTask-2\",\n+ \"appliesTo\": [\n+ \"bpmn:ServiceTask\"\n+ ],\n+ \"properties\": []\n+ },\n+ {\n+ \"name\": \"No schema\",\n+ \"id\": \"com.camunda.example.NoSchema\",\n+ \"appliesTo\": [\n+ \"bpmn:ServiceTask\"\n+ ],\n+ \"properties\": []\n+ },\n+ {\n+ \"$schema\": \"https://unpkg.com/@camunda/element-templates-json-schema@0.6.0/resources/schema.json\",\n+ \"name\": \"Platform Task 3\",\n+ \"id\": \"com.camunda.example.PlatformTask-3\",\n+ \"appliesTo\": [\n+ \"bpmn:ServiceTask\"\n+ ],\n+ \"properties\": []\n+ },\n+ {\n+ \"$schema\": \"https://unpkg.com/@camunda/zeebe-element-templates-json-schema@0.1.0/resources/schema.json\",\n+ \"name\": \"Cloud Task 3\",\n+ \"id\": \"com.camunda.example.CloudTask-3\",\n+ \"appliesTo\": [\n+ \"bpmn:ServiceTask\"\n+ ],\n+ \"properties\": []\n+ }\n+]\n",
"new_path": "client/src/util/__tests__/fixtures/templates.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+/**\n+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n+ * under one or more contributor license agreements. See the NOTICE file\n+ * distributed with this work for additional information regarding copyright\n+ * ownership.\n+ *\n+ * Camunda licenses this file to you under the MIT; you may not use this file\n+ * except in compliance with the MIT License.\n+ */\n+\n+import { CloudElementTemplatesValidator } from 'camunda-bpmn-js/lib/camunda-cloud/ElementTemplatesValidator';\n+\n+import { filter } from 'min-dash';\n+\n+const elementTemplatesValidator = new CloudElementTemplatesValidator();\n+\n+export function getCloudTemplates(templates) {\n+ return filterTemplatesBySchema(templates, true);\n+}\n+\n+export function getPlatformTemplates(templates) {\n+ return filterTemplatesBySchema(templates, false);\n+}\n+\n+function filterTemplatesBySchema(templates, shouldApply) {\n+ return filter(templates, template => {\n+ const { $schema } = template;\n+ return !!elementTemplatesValidator.isSchemaValid($schema) === shouldApply;\n+ });\n+}\n\\ No newline at end of file\n",
"new_path": "client/src/util/elementTemplates.js",
"old_path": null
}
] |
JavaScript
|
MIT License
|
camunda/camunda-modeler
|
feat(util): add elementTemplates util
| 1
|
feat
|
util
|
865,917
|
25.02.2022 13:56:46
| -3,600
|
731c1b8a60d2ec1d0a56987d1516a0695e21a3fb
|
feat(bpmn): only load platform element templates
|
[
{
"change_type": "MODIFY",
"diff": "@@ -42,7 +42,7 @@ import css from './BpmnEditor.less';\nimport generateImage from '../../util/generateImage';\n-import applyDefaultTemplates from './modeler/features/apply-default-templates/applyDefaultTemplates';\n+import applyDefaultTemplates from '../bpmn-shared/modeler/features/apply-default-templates/applyDefaultTemplates';\nimport {\nfindUsages as findNamespaceUsages,\n@@ -72,6 +72,8 @@ import {\nENGINES\n} from '../../../util/Engines';\n+import { getPlatformTemplates } from '../../../util/elementTemplates';\n+\nconst NAMESPACE_URL_ACTIVITI = 'http://activiti.org/bpmn';\nconst NAMESPACE_CAMUNDA = {\n@@ -230,7 +232,7 @@ export class BpmnEditor extends CachedComponent {\nconst templates = await getConfig('bpmn.elementTemplates');\n- templatesLoader.setTemplates(templates);\n+ templatesLoader.setTemplates(getPlatformTemplates(templates));\nconst propertiesPanel = modeler.get('propertiesPanel', false);\n@@ -846,7 +848,8 @@ export class BpmnEditor extends CachedComponent {\nconst modeler = new BpmnModeler({\n...options,\n- position: 'absolute'\n+ position: 'absolute',\n+ changeTemplateCommand: 'propertiesPanel.camunda.changeTemplate'\n});\nconst commandStack = modeler.get('commandStack');\n",
"new_path": "client/src/app/tabs/bpmn/BpmnEditor.js",
"old_path": "client/src/app/tabs/bpmn/BpmnEditor.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -41,7 +41,7 @@ import missingPatchEngineProfileXML from '../../__tests__/EngineProfile.missing-\nimport patchEngineProfileXML from '../../__tests__/EngineProfile.patch.platform.bpmn';\nimport namespaceEngineProfileXML from '../../__tests__/EngineProfile.namespace.platform.bpmn';\n-import applyDefaultTemplates from '../modeler/features/apply-default-templates/applyDefaultTemplates';\n+import applyDefaultTemplates from '../../bpmn-shared/modeler/features/apply-default-templates/applyDefaultTemplates';\nimport {\ngetCanvasEntries,\n@@ -1122,6 +1122,66 @@ describe('<BpmnEditor>', function() {\n});\n+ it('should only load platform templates', async function() {\n+\n+ // given\n+ const platformTemplates = [\n+ {\n+ '$schema': 'https://unpkg.com/@camunda/element-templates-json-schema/resources/schema.json',\n+ 'id': 'one'\n+ },\n+ {\n+ 'id': 'two'\n+ },\n+ {\n+ '$schema': 'https://unpkg.com/@camunda/element-templates-json-schema0.6.0/resources/schema.json',\n+ 'id': 'three'\n+ },\n+ {\n+ '$schema': 'https://cdn.jsdelivr.net/npm/@camunda/element-templates-json-schema/resources/schema.json',\n+ 'id': 'four'\n+ }\n+ ];\n+\n+ const otherTemplates = [\n+ {\n+ '$schema': 'https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json',\n+ 'id': 'five'\n+ }\n+ ];\n+\n+ const allTemplates = [\n+ ...platformTemplates, ...otherTemplates\n+ ];\n+\n+ const getConfig = () => allTemplates;\n+\n+ const elementTemplatesLoaderStub = sinon.stub({ setTemplates() {} });\n+\n+ const cache = new Cache();\n+\n+ cache.add('editor', {\n+ cached: {\n+ modeler: new BpmnModeler({\n+ modules: {\n+ elementTemplatesLoader: elementTemplatesLoaderStub\n+ }\n+ })\n+ }\n+ });\n+\n+ // when\n+ await renderEditor(diagramXML, {\n+ cache,\n+ getConfig\n+ });\n+\n+ // expect\n+ expect(elementTemplatesLoaderStub.setTemplates).not.to.be.calledWith(allTemplates);\n+ expect(elementTemplatesLoaderStub.setTemplates).to.be.calledWith(platformTemplates);\n+ });\n+\n+\nit('should apply default templates to unsaved diagram', async function() {\n// given\n",
"new_path": "client/src/app/tabs/bpmn/__tests__/BpmnEditorSpec.js",
"old_path": "client/src/app/tabs/bpmn/__tests__/BpmnEditorSpec.js"
}
] |
JavaScript
|
MIT License
|
camunda/camunda-modeler
|
feat(bpmn): only load platform element templates
| 1
|
feat
|
bpmn
|
865,917
|
25.02.2022 13:57:09
| -3,600
|
403ba474d50d60b3b293926d23f49e6e40925bad
|
feat(cloud-bpmn): integrate element templates feature
|
[
{
"change_type": "MODIFY",
"diff": "@@ -42,6 +42,8 @@ import css from './BpmnEditor.less';\nimport generateImage from '../../util/generateImage';\n+import applyDefaultTemplates from '../bpmn-shared/modeler/features/apply-default-templates/applyDefaultTemplates';\n+\nimport configureModeler from '../bpmn-shared/util/configure';\nimport Metadata from '../../../util/Metadata';\n@@ -65,6 +67,8 @@ import {\nENGINES\n} from '../../../util/Engines';\n+import { getCloudTemplates } from '../../../util/elementTemplates';\n+\nconst EXPORT_AS = [ 'png', 'jpeg', 'svg' ];\nexport const DEFAULT_ENGINE_PROFILE = {\n@@ -119,7 +123,7 @@ export class BpmnEditor extends CachedComponent {\nthis.handleLintingDebounced = debounce(this.handleLinting.bind(this));\n}\n- componentDidMount() {\n+ async componentDidMount() {\nthis._isMounted = true;\nconst {\n@@ -142,6 +146,13 @@ export class BpmnEditor extends CachedComponent {\npropertiesPanel.attachTo(this.propertiesPanelRef.current);\n+\n+ try {\n+ await this.loadTemplates();\n+ } catch (error) {\n+ this.handleError({ error });\n+ }\n+\nthis.checkImport();\n}\n@@ -187,6 +198,8 @@ export class BpmnEditor extends CachedComponent {\nmodeler[fn](event, this.handleChanged);\n});\n+ modeler[fn]('elementTemplates.errors', this.handleElementTemplateErrors);\n+\nmodeler[fn]('error', 1500, this.handleError);\nmodeler[fn]('minimap.toggle', this.handleMinimapToggle);\n@@ -198,6 +211,28 @@ export class BpmnEditor extends CachedComponent {\n}\n}\n+ async loadTemplates() {\n+ const { getConfig } = this.props;\n+\n+ const modeler = this.getModeler();\n+\n+ const templatesLoader = modeler.get('elementTemplatesLoader');\n+\n+ let templates = await getConfig('bpmn.elementTemplates');\n+\n+ templatesLoader.setTemplates(getCloudTemplates(templates));\n+\n+ const propertiesPanel = modeler.get('propertiesPanel', false);\n+\n+ if (propertiesPanel) {\n+ const currentElement = propertiesPanel._current && propertiesPanel._current.element;\n+\n+ if (currentElement) {\n+ propertiesPanel.update(currentElement);\n+ }\n+ }\n+ }\n+\nundo = () => {\nconst modeler = this.getModeler();\n@@ -224,6 +259,20 @@ export class BpmnEditor extends CachedComponent {\n});\n}\n+ handleElementTemplateErrors = (event) => {\n+ const {\n+ onWarning\n+ } = this.props;\n+\n+ const {\n+ errors\n+ } = event;\n+\n+ errors.forEach(error => {\n+ onWarning({ message: error.message });\n+ });\n+ }\n+\nhandleError = (event) => {\nconst {\nerror\n@@ -238,10 +287,15 @@ export class BpmnEditor extends CachedComponent {\nhandleImport = (error, warnings) => {\nconst {\n+ isNew,\nonImport,\nxml\n} = this.props;\n+ let {\n+ defaultTemplatesApplied\n+ } = this.getCached();\n+\nconst modeler = this.getModeler();\nconst commandStack = modeler.get('commandStack');\n@@ -263,7 +317,14 @@ export class BpmnEditor extends CachedComponent {\nlastXML: null\n});\n} else {\n+ if (isNew && !defaultTemplatesApplied) {\n+ modeler.invoke(applyDefaultTemplates);\n+\n+ defaultTemplatesApplied = true;\n+ }\n+\nthis.setCached({\n+ defaultTemplatesApplied,\nengineProfile,\nlastXML: xml,\nstackIdx\n@@ -604,6 +665,10 @@ export class BpmnEditor extends CachedComponent {\nreturn;\n}\n+ if (action === 'elementTemplates.reload') {\n+ return this.loadTemplates();\n+ }\n+\n// TODO(nikku): handle all editor actions\nreturn modeler.get('editorActions').trigger(action, context);\n}\n@@ -757,7 +822,8 @@ export class BpmnEditor extends CachedComponent {\nconst modeler = new BpmnModeler({\n...options,\n- position: 'absolute'\n+ position: 'absolute',\n+ changeTemplateCommand: 'propertiesPanel.zeebe.changeTemplate'\n});\nconst commandStack = modeler.get('commandStack');\n@@ -779,7 +845,8 @@ export class BpmnEditor extends CachedComponent {\nengineProfile: null,\nlastXML: null,\nmodeler,\n- stackIdx\n+ stackIdx,\n+ templatesLoaded: false\n};\n}\n",
"new_path": "client/src/app/tabs/cloud-bpmn/BpmnEditor.js",
"old_path": "client/src/app/tabs/cloud-bpmn/BpmnEditor.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -39,6 +39,8 @@ import missingPatchEngineProfileXML from '../../__tests__/EngineProfile.missing-\nimport patchEngineProfileXML from '../../__tests__/EngineProfile.patch.cloud.bpmn';\nimport namespaceEngineProfileXML from '../../__tests__/EngineProfile.namespace.cloud.bpmn';\n+import applyDefaultTemplates from '../../bpmn-shared/modeler/features/apply-default-templates/applyDefaultTemplates';\n+\nimport {\ngetCanvasEntries,\ngetCopyCutPasteEntries,\n@@ -924,9 +926,12 @@ describe('cloud-bpmn - <BpmnEditor>', function() {\n});\n// then\n+ // BpmnEditor#componentDidMount is async\n+ process.nextTick(() => {\nexpect(isImportNeededSpy).to.have.been.calledOnce;\nexpect(isImportNeededSpy).to.have.always.returned(false);\n});\n+ });\nit('should not import when props did not change', async function() {\n@@ -968,6 +973,241 @@ describe('cloud-bpmn - <BpmnEditor>', function() {\n});\n+ describe('element templates', function() {\n+\n+ it('should load templates when mounted', async function() {\n+\n+ // given\n+ const getConfigSpy = sinon.spy(),\n+ elementTemplatesLoaderMock = { setTemplates() {} };\n+\n+ const cache = new Cache();\n+\n+ cache.add('editor', {\n+ cached: {\n+ modeler: new BpmnModeler({\n+ modules: {\n+ elementTemplatesLoader: elementTemplatesLoaderMock\n+ }\n+ })\n+ }\n+ });\n+\n+ // when\n+ await renderEditor(diagramXML, {\n+ cache,\n+ getConfig: getConfigSpy\n+ });\n+\n+ // expect\n+ expect(getConfigSpy).to.be.called;\n+ expect(getConfigSpy).to.be.calledWith('bpmn.elementTemplates');\n+ });\n+\n+\n+ it('should reload templates on action triggered', async function() {\n+\n+ // given\n+ const getConfigSpy = sinon.spy(),\n+ elementTemplatesLoaderStub = sinon.stub({ setTemplates() {} });\n+\n+ const cache = new Cache();\n+\n+ cache.add('editor', {\n+ cached: {\n+ modeler: new BpmnModeler({\n+ modules: {\n+ elementTemplatesLoader: elementTemplatesLoaderStub\n+ }\n+ })\n+ }\n+ });\n+\n+ // when\n+ const { instance } = await renderEditor(diagramXML, {\n+ cache,\n+ getConfig: getConfigSpy\n+ });\n+\n+ const propertiesPanel = instance.getModeler().get('propertiesPanel');\n+\n+ const updateSpy = spy(propertiesPanel, 'update');\n+\n+ await instance.triggerAction('elementTemplates.reload');\n+\n+ // expect\n+ expect(getConfigSpy).to.be.calledTwice;\n+ expect(getConfigSpy).to.be.always.calledWith('bpmn.elementTemplates');\n+ expect(elementTemplatesLoaderStub.setTemplates).to.be.calledTwice;\n+ expect(updateSpy).to.have.been.called;\n+ });\n+\n+\n+ it('should ONLY load platform templates', async function() {\n+\n+ // given\n+ const cloudTemplates = [\n+ {\n+ '$schema': 'https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json',\n+ 'id': 'one'\n+ },\n+ {\n+ '$schema': 'https://unpkg.com/@camunda/zeebe-element-templates-json-schema0.1.0/resources/schema.json',\n+ 'id': 'two'\n+ },\n+ {\n+ '$schema': 'https://cdn.jsdelivr.net/npm/@camunda/zeebe-element-templates-json-schema/resources/schema.json',\n+ 'id': 'three'\n+ }\n+ ];\n+\n+ const otherTemplates = [\n+ {\n+ '$schema': 'https://unpkg.com/@camunda/element-templates-json-schema/resources/schema.json',\n+ 'id': 'four'\n+ },\n+ {\n+ 'id': 'five'\n+ }\n+ ];\n+\n+ const allTemplates = [\n+ ...cloudTemplates, ...otherTemplates\n+ ];\n+\n+ const getConfig = () => allTemplates;\n+\n+ const elementTemplatesLoaderStub = sinon.stub({ setTemplates() {} });\n+\n+ const cache = new Cache();\n+\n+ cache.add('editor', {\n+ cached: {\n+ modeler: new BpmnModeler({\n+ modules: {\n+ elementTemplatesLoader: elementTemplatesLoaderStub\n+ }\n+ })\n+ }\n+ });\n+\n+ // when\n+ await renderEditor(diagramXML, {\n+ cache,\n+ getConfig\n+ });\n+\n+ // expect\n+ expect(elementTemplatesLoaderStub.setTemplates).not.to.be.calledWith(allTemplates);\n+ expect(elementTemplatesLoaderStub.setTemplates).to.be.calledWith(cloudTemplates);\n+ });\n+\n+\n+ it('should apply default templates to unsaved diagram', async function() {\n+\n+ // given\n+ const modeler = new BpmnModeler();\n+\n+ const invokeSpy = sinon.spy(modeler, 'invoke');\n+\n+ const cache = new Cache();\n+\n+ cache.add('editor', {\n+ cached: {\n+ modeler\n+ }\n+ });\n+\n+ // when\n+ await renderEditor(diagramXML, {\n+ cache,\n+ isNew: true\n+ });\n+\n+ // then\n+ expect(invokeSpy).to.have.been.calledWith(applyDefaultTemplates);\n+ });\n+\n+\n+ it('should NOT apply default templates to unsaved diagram twice', async function() {\n+\n+ // given\n+ const modeler = new BpmnModeler();\n+\n+ const invokeSpy = sinon.spy(modeler, 'invoke');\n+\n+ const cache = new Cache();\n+\n+ cache.add('editor', {\n+ cached: {\n+ modeler,\n+ defaultTemplatesApplied: true\n+ }\n+ });\n+\n+ // when\n+ await renderEditor(diagramXML, {\n+ cache,\n+ isNew: true\n+ });\n+\n+ // then\n+ expect(invokeSpy).not.to.have.been.called;\n+ });\n+\n+\n+ it('should NOT apply default templates to saved diagram', async function() {\n+\n+ // given\n+ const modeler = new BpmnModeler();\n+\n+ const invokeSpy = sinon.spy(modeler, 'invoke');\n+\n+ const cache = new Cache();\n+\n+ cache.add('editor', {\n+ cached: {\n+ modeler\n+ }\n+ });\n+\n+ // when\n+ renderEditor(diagramXML, {\n+ cache,\n+ isNew: false\n+ });\n+\n+ // then\n+ expect(invokeSpy).not.to.have.been.called;\n+ });\n+\n+\n+ it('should handle template errors as warning', async function() {\n+\n+ // given\n+ const warningSpy = spy();\n+\n+ const error1 = new Error('template error 1');\n+ const error2 = new Error('template error 2');\n+ const error3 = new Error('template error 3');\n+\n+ const { instance } = await renderEditor(diagramXML, {\n+ onWarning: warningSpy\n+ });\n+\n+ // when\n+ await instance.handleElementTemplateErrors({ errors: [ error1, error2, error3 ] });\n+\n+ // then\n+ expect(warningSpy).to.have.been.calledThrice;\n+ expect(warningSpy).to.have.been.calledWith({ message: error1.message });\n+ expect(warningSpy).to.have.been.calledWith({ message: error2.message });\n+ expect(warningSpy).to.have.been.calledWith({ message: error3.message });\n+ });\n+\n+ });\n+\n+\ndescribe('dirty state', function() {\nlet instance;\n",
"new_path": "client/src/app/tabs/cloud-bpmn/__tests__/BpmnEditorSpec.js",
"old_path": "client/src/app/tabs/cloud-bpmn/__tests__/BpmnEditorSpec.js"
}
] |
JavaScript
|
MIT License
|
camunda/camunda-modeler
|
feat(cloud-bpmn): integrate element templates feature
| 1
|
feat
|
cloud-bpmn
|
865,917
|
25.02.2022 13:57:53
| -3,600
|
848456677651d2ebe5fd2d508d606a1b847b6002
|
feat(element-templates-modal): enable templates chooser for cloud-bpmn
|
[
{
"change_type": "MODIFY",
"diff": "@@ -46,9 +46,7 @@ export default class ElementTemplatesModal extends PureComponent {\nhandleBpmnModelerConfigure = async ({ middlewares, tab }) => {\n- // todo(Skaiir): workaround to deal with the co-dependencies between cloud element templates and plugins\n- // cf. https://github.com/camunda/camunda-modeler/issues/2731\n- if (tab.type !== 'bpmn') {\n+ if (!isBpmnTab(tab)) {\nreturn;\n}\n@@ -72,7 +70,7 @@ export default class ElementTemplatesModal extends PureComponent {\nconst { activeTab } = this.state;\n- if (!activeTab || activeTab.type !== 'bpmn') {\n+ if (!isBpmnTab(activeTab)) {\nreturn;\n}\n@@ -104,3 +102,10 @@ export default class ElementTemplatesModal extends PureComponent {\n: null;\n}\n}\n+\n+\n+// helper /////////////////\n+\n+function isBpmnTab(tab) {\n+ return tab && (tab.type === 'bpmn' || tab.type === 'cloud-bpmn');\n+}\n",
"new_path": "client/src/plugins/element-templates-modal/ElementTemplatesModal.js",
"old_path": "client/src/plugins/element-templates-modal/ElementTemplatesModal.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -76,6 +76,69 @@ describe('<ElementTemplatesModal>', function() {\nexpect(handleBpmnModelerConfigureSpy).to.have.been.called;\n});\n+\n+ it('should configure on <bpmn> tab', async function() {\n+\n+ // given\n+ const {\n+ callSubscriber,\n+ subscribe\n+ } = createSubscribe('bpmn.modeler.configure');\n+\n+ const middlewares = [];\n+ const tab = { type: 'bpmn' };\n+\n+ await createElementTemplatesModal({ subscribe });\n+\n+ // when\n+ callSubscriber({ middlewares, tab });\n+\n+ // then\n+ expect(middlewares).not.to.be.empty;\n+ });\n+\n+\n+ it('should configure on <cloud-bpmn> tab', async function() {\n+\n+ // given\n+ const {\n+ callSubscriber,\n+ subscribe\n+ } = createSubscribe('bpmn.modeler.configure');\n+\n+ const middlewares = [];\n+ const tab = { type: 'cloud-bpmn' };\n+\n+ await createElementTemplatesModal({ subscribe });\n+\n+ // when\n+ callSubscriber({ middlewares, tab });\n+\n+ // then\n+ expect(middlewares).not.to.be.empty;\n+ });\n+\n+\n+ it('should NOT configure on <foo> tab', async function() {\n+\n+ // given\n+ const {\n+ callSubscriber,\n+ subscribe\n+ } = createSubscribe('bpmn.modeler.configure');\n+\n+ const middlewares = [];\n+ const tab = { type: 'foo' };\n+\n+ await createElementTemplatesModal({ subscribe });\n+\n+ // when\n+ callSubscriber({ middlewares, tab });\n+\n+ // then\n+ expect(middlewares).to.be.empty;\n+ });\n+\n});\n",
"new_path": "client/src/plugins/element-templates-modal/__tests__/ElementTemplatesModalSpec.js",
"old_path": "client/src/plugins/element-templates-modal/__tests__/ElementTemplatesModalSpec.js"
},
{
"change_type": "MODIFY",
"diff": "*/\nexport default class EditorActions {\n- constructor(commandStack, editorActions, selection, canvas, elementTemplates) {\n+ constructor(commandStack, editorActions, selection, canvas, elementTemplates, changeTemplateCommand) {\n// Register action to apply an element template to the selected element\neditorActions.register('applyElementTemplate', elementTemplate => {\nconst element = getSelectedElement();\nif (element) {\n- commandStack.execute('propertiesPanel.camunda.changeTemplate', {\n+ commandStack.execute(changeTemplateCommand, {\nelement,\nnewTemplate: elementTemplate\n});\n@@ -39,7 +39,9 @@ export default class EditorActions {\nif (selectedElement) {\nconst { businessObject } = selectedElement;\n- return businessObject.get('camunda:modelerTemplate') || null;\n+ // todo: elementTemplates._getTemplateId\n+ // https://github.com/bpmn-io/bpmn-js-properties-panel/pull/585/files#diff-c59c24ee0669c0f08660111bc3669a775eacc41e5edd877a04beb71560cba11dR17\n+ return businessObject.get('modelerTemplate') || null;\n}\nreturn null;\n@@ -80,5 +82,6 @@ EditorActions.$inject = [\n'editorActions',\n'selection',\n'canvas',\n- 'elementTemplates'\n+ 'elementTemplates',\n+ 'config.changeTemplateCommand'\n];\n",
"new_path": "client/src/plugins/element-templates-modal/modeler/EditorActions.js",
"old_path": "client/src/plugins/element-templates-modal/modeler/EditorActions.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -31,7 +31,8 @@ const DEFAULT_OPTIONS = {\nexporter: {\nname: 'my-tool',\nversion: '120-beta.100'\n- }\n+ },\n+ changeTemplateCommand: 'propertiesPanel.camunda.changeTemplate'\n};\n",
"new_path": "client/src/plugins/element-templates-modal/modeler/__tests__/bpmn-io-modelers/EditorActionsSpec.js",
"old_path": "client/src/plugins/element-templates-modal/modeler/__tests__/bpmn-io-modelers/EditorActionsSpec.js"
}
] |
JavaScript
|
MIT License
|
camunda/camunda-modeler
|
feat(element-templates-modal): enable templates chooser for cloud-bpmn
| 1
|
feat
|
element-templates-modal
|
865,917
|
25.02.2022 13:58:13
| -3,600
|
3806c270c1873653bb7da64db439a585d89e69d7
|
chore(element-templates): add cloud template samples
Closes
|
[
{
"change_type": "ADD",
"diff": "+[\n+ {\n+ \"$schema\": \"https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json\",\n+ \"name\": \"Email Connector\",\n+ \"id\": \"io.camunda.examples.EmailConnector\",\n+ \"description\": \"A Email sending task.\",\n+ \"appliesTo\": [\n+ \"bpmn:ServiceTask\"\n+ ],\n+ \"properties\": [\n+ {\n+ \"type\": \"Hidden\",\n+ \"value\": \"send-email\",\n+ \"binding\": {\n+ \"type\": \"zeebe:taskDefinition:type\"\n+ }\n+ },\n+ {\n+ \"label\": \"Hostname\",\n+ \"description\": \"Specify the email server (SMTP) host name\",\n+ \"type\": \"String\",\n+ \"binding\": {\n+ \"type\": \"zeebe:input\",\n+ \"name\": \"HOST_NAME\"\n+ },\n+ \"constraints\": {\n+ \"notEmpty\": true\n+ }\n+ },\n+ {\n+ \"label\": \"Port\",\n+ \"description\": \"Specify the email server (SMTP) port (default=25)\",\n+ \"type\": \"String\",\n+ \"value\": \"= 25\",\n+ \"optional\": true,\n+ \"binding\": {\n+ \"type\": \"zeebe:input\",\n+ \"name\": \"PORT\"\n+ }\n+ },\n+ {\n+ \"label\": \"Username\",\n+ \"description\": \"Specify the user name to authenticate with\",\n+ \"type\": \"String\",\n+ \"optional\": true,\n+ \"binding\": {\n+ \"type\": \"zeebe:input\",\n+ \"name\": \"USER_NAME\"\n+ }\n+ },\n+ {\n+ \"label\": \"Password\",\n+ \"description\": \"Specify the password to authenticate with\",\n+ \"type\": \"String\",\n+ \"optional\": true,\n+ \"binding\": {\n+ \"type\": \"zeebe:input\",\n+ \"name\": \"PASSWORD\"\n+ }\n+ },\n+ {\n+ \"label\": \"Sender\",\n+ \"description\": \"Enter the FROM field\",\n+ \"type\": \"String\",\n+ \"binding\": {\n+ \"type\": \"zeebe:input\",\n+ \"name\": \"sender\"\n+ },\n+ \"constraints\": {\n+ \"notEmpty\": true\n+ }\n+ },\n+ {\n+ \"label\": \"Recipient\",\n+ \"description\": \"Enter the TO field\",\n+ \"type\": \"String\",\n+ \"binding\": {\n+ \"type\": \"zeebe:input\",\n+ \"name\": \"recipient\"\n+ },\n+ \"constraints\": {\n+ \"notEmpty\": true\n+ }\n+ },\n+ {\n+ \"label\": \"Subject\",\n+ \"description\": \"Enter the mail subject\",\n+ \"type\": \"String\",\n+ \"binding\": {\n+ \"type\": \"zeebe:input\",\n+ \"name\": \"subject\"\n+ },\n+ \"constraints\": {\n+ \"notEmpty\": true\n+ }\n+ },\n+ {\n+ \"label\": \"Body\",\n+ \"description\": \"Enter the email message body\",\n+ \"type\": \"Text\",\n+ \"binding\": {\n+ \"type\": \"zeebe:input\",\n+ \"name\": \"message\"\n+ },\n+ \"constraints\": {\n+ \"notEmpty\": true\n+ }\n+ }\n+ ]\n+ },\n+ {\n+ \"$schema\": \"https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json\",\n+ \"name\": \"REST Connector\",\n+ \"id\": \"io.camunda.examples.RestConnector\",\n+ \"description\": \"A REST API invocation task.\",\n+ \"appliesTo\": [\n+ \"bpmn:ServiceTask\"\n+ ],\n+ \"properties\": [\n+ {\n+ \"type\": \"Hidden\",\n+ \"value\": \"http\",\n+ \"binding\": {\n+ \"type\": \"zeebe:taskDefinition:type\"\n+ }\n+ },\n+ {\n+ \"label\": \"REST Endpoint URL\",\n+ \"description\": \"Specify the url of the REST API to talk to.\",\n+ \"type\": \"String\",\n+ \"binding\": {\n+ \"type\": \"zeebe:taskHeader\",\n+ \"key\": \"url\"\n+ },\n+ \"constraints\": {\n+ \"notEmpty\": true,\n+ \"pattern\": {\n+ \"value\": \"^https?://.*\",\n+ \"message\": \"Must be http(s) URL.\"\n+ }\n+ }\n+ },\n+ {\n+ \"label\": \"REST Method\",\n+ \"description\": \"Specify the HTTP method to use.\",\n+ \"type\": \"Dropdown\",\n+ \"value\": \"get\",\n+ \"choices\": [\n+ { \"name\": \"GET\", \"value\": \"get\" },\n+ { \"name\": \"POST\", \"value\": \"post\" },\n+ { \"name\": \"PATCH\", \"value\": \"patch\" },\n+ { \"name\": \"DELETE\", \"value\": \"delete\" }\n+ ],\n+ \"binding\": {\n+ \"type\": \"zeebe:taskHeader\",\n+ \"key\": \"method\"\n+ }\n+ },\n+ {\n+ \"label\": \"Request Body\",\n+ \"description\": \"Data to send to the endpoint.\",\n+ \"value\": \"\",\n+ \"type\": \"String\",\n+ \"optional\": true,\n+ \"binding\": {\n+ \"type\": \"zeebe:input\",\n+ \"name\": \"body\"\n+ }\n+ },\n+ {\n+ \"label\": \"Result Variable\",\n+ \"description\": \"Name of variable to store the response data in.\",\n+ \"value\": \"response\",\n+ \"type\": \"String\",\n+ \"optional\": true,\n+ \"binding\": {\n+ \"type\": \"zeebe:output\",\n+ \"source\": \"= body\"\n+ }\n+ }\n+ ]\n+ },\n+ {\n+ \"$schema\": \"https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json\",\n+ \"name\": \"Groups\",\n+ \"id\": \"io.camunda.examples.Groups\",\n+ \"description\": \"Example template to provide groups.\",\n+ \"appliesTo\": [\n+ \"bpmn:ServiceTask\"\n+ ],\n+ \"properties\": [\n+ {\n+ \"type\": \"Hidden\",\n+ \"value\": \"http\",\n+ \"binding\": {\n+ \"type\": \"zeebe:taskDefinition:type\"\n+ }\n+ },\n+ {\n+ \"label\": \"REST Endpoint URL\",\n+ \"description\": \"Specify the url of the REST API to talk to.\",\n+ \"group\": \"headers\",\n+ \"type\": \"String\",\n+ \"binding\": {\n+ \"type\": \"zeebe:taskHeader\",\n+ \"key\": \"url\"\n+ },\n+ \"constraints\": {\n+ \"notEmpty\": true,\n+ \"pattern\": {\n+ \"value\": \"^https?://.*\",\n+ \"message\": \"Must be http(s) URL.\"\n+ }\n+ }\n+ },\n+ {\n+ \"label\": \"REST Method\",\n+ \"description\": \"Specify the HTTP method to use.\",\n+ \"group\": \"headers\",\n+ \"type\": \"Dropdown\",\n+ \"value\": \"get\",\n+ \"choices\": [\n+ { \"name\": \"GET\", \"value\": \"get\" },\n+ { \"name\": \"POST\", \"value\": \"post\" },\n+ { \"name\": \"PATCH\", \"value\": \"patch\" },\n+ { \"name\": \"DELETE\", \"value\": \"delete\" }\n+ ],\n+ \"binding\": {\n+ \"type\": \"zeebe:taskHeader\",\n+ \"key\": \"method\"\n+ }\n+ },\n+ {\n+ \"label\": \"Request Body\",\n+ \"description\": \"Data to send to the endpoint.\",\n+ \"value\": \"\",\n+ \"group\": \"payload\",\n+ \"type\": \"String\",\n+ \"binding\": {\n+ \"type\": \"zeebe:input\",\n+ \"name\": \"body\"\n+ }\n+ },\n+ {\n+ \"label\": \"Result Variable\",\n+ \"description\": \"Name of variable to store the response data in.\",\n+ \"group\": \"mapping\",\n+ \"value\": \"response\",\n+ \"type\": \"String\",\n+ \"binding\": {\n+ \"type\": \"zeebe:output\",\n+ \"source\": \"= body\"\n+ }\n+ }\n+ ],\n+ \"groups\": [\n+ {\n+ \"id\": \"headers\",\n+ \"label\": \"Request headers\"\n+ },\n+ {\n+ \"id\": \"payload\",\n+ \"label\": \"Request payload\"\n+ },\n+ {\n+ \"id\": \"mapping\",\n+ \"label\": \"Response mapping\"\n+ }\n+ ]\n+ },\n+ {\n+ \"$schema\": \"https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json\",\n+ \"id\": \"io.camunda.examples.ScriptWorker\",\n+ \"name\": \"Script Worker\",\n+ \"description\": \"A script task worker\",\n+ \"appliesTo\": [\n+ \"bpmn:ScriptTask\"\n+ ],\n+ \"properties\":[\n+ {\n+ \"label\": \"Job type\",\n+ \"type\": \"String\",\n+ \"value\": \"script\",\n+ \"group\": \"job-definition\",\n+ \"binding\": {\n+ \"type\": \"zeebe:taskDefinition:type\"\n+ }\n+ },\n+ {\n+ \"label\": \"Language\",\n+ \"value\": \"javascript\",\n+ \"type\": \"Dropdown\",\n+ \"choices\": [\n+ {\n+ \"name\": \"FEEL\",\n+ \"value\": \"feel\"\n+ },\n+ {\n+ \"name\": \"Groovy\",\n+ \"value\": \"groovy\"\n+ },\n+ {\n+ \"name\": \"JavaScript\",\n+ \"value\": \"javascript\"\n+ },\n+ {\n+ \"name\": \"Kotlin\",\n+ \"value\": \"kotlin\"\n+ },\n+ {\n+ \"name\": \"Mustache\",\n+ \"value\": \"mustache\"\n+ }\n+ ],\n+ \"group\": \"script\",\n+ \"binding\": {\n+ \"type\": \"zeebe:taskHeader\",\n+ \"key\": \"language\"\n+ }\n+ },\n+ {\n+ \"label\": \"Script\",\n+ \"value\": \"a + b\",\n+ \"type\": \"Text\",\n+ \"group\": \"script\",\n+ \"binding\": {\n+ \"type\": \"zeebe:taskHeader\",\n+ \"key\": \"script\"\n+ }\n+ }\n+ ],\n+ \"groups\": [\n+ {\n+ \"id\": \"job-definition\",\n+ \"label\": \"Job definition\"\n+ },\n+ {\n+ \"id\": \"script\",\n+ \"label\": \"Script\"\n+ }\n+ ]\n+ },\n+ {\n+ \"$schema\": \"https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json\",\n+ \"id\": \"io.camunda.examples.PaymentTask\",\n+ \"name\": \"Payment task\",\n+ \"description\": \"A payment task worker\",\n+ \"appliesTo\": [\n+ \"bpmn:ServiceTask\"\n+ ],\n+ \"properties\":[\n+ {\n+ \"label\": \"Job type\",\n+ \"type\": \"String\",\n+ \"value\": \"payment-service\",\n+ \"group\": \"job-definition\",\n+ \"binding\": {\n+ \"type\": \"zeebe:taskDefinition:type\"\n+ }\n+ },\n+ {\n+ \"label\": \"Method\",\n+ \"value\": \"visa\",\n+ \"type\": \"Dropdown\",\n+ \"choices\": [\n+ {\n+ \"name\": \"American Express\",\n+ \"value\": \"american-express\"\n+ },\n+ {\n+ \"name\": \"Mastercard\",\n+ \"value\": \"mastercard\"\n+ },\n+ {\n+ \"name\": \"Visa\",\n+ \"value\": \"visa\"\n+ }\n+ ],\n+ \"group\": \"headers\",\n+ \"binding\": {\n+ \"type\": \"zeebe:taskHeader\",\n+ \"key\": \"method\"\n+ }\n+ }\n+ ],\n+ \"groups\": [\n+ {\n+ \"id\": \"job-definition\",\n+ \"label\": \"Job definition\"\n+ },\n+ {\n+ \"id\": \"headers\",\n+ \"label\": \"Headers\"\n+ }\n+ ]\n+ },\n+ {\n+ \"$schema\": \"https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json\",\n+ \"id\": \"io.camunda.examples.KafkaTask\",\n+ \"name\": \"Kafka worker\",\n+ \"description\": \"A kafka task worker\",\n+ \"appliesTo\": [\n+ \"bpmn:ServiceTask\",\n+ \"bpmn:SendTask\"\n+ ],\n+ \"properties\":[\n+ {\n+ \"type\": \"Hidden\",\n+ \"value\": \"kafka\",\n+ \"binding\": {\n+ \"type\": \"zeebe:taskDefinition:type\"\n+ }\n+ },\n+ {\n+ \"label\": \"Method\",\n+ \"value\": \"payment\",\n+ \"type\": \"String\",\n+ \"group\": \"headers\",\n+ \"binding\": {\n+ \"type\": \"zeebe:taskHeader\",\n+ \"key\": \"kafka-topic\"\n+ }\n+ }\n+ ],\n+ \"groups\": [\n+ {\n+ \"id\": \"headers\",\n+ \"label\": \"Headers\"\n+ }\n+ ]\n+ }\n+]\n\\ No newline at end of file\n",
"new_path": "resources/element-templates/cloud-samples.json",
"old_path": null
}
] |
JavaScript
|
MIT License
|
camunda/camunda-modeler
|
chore(element-templates): add cloud template samples
Closes #2731
| 1
|
chore
|
element-templates
|
688,430
|
25.02.2022 14:03:29
| -7,200
|
63c566ef072d48c37dee5c1d7c1b3c5fd21de7ed
|
chore: remove dashToCamelCase helper
|
[
{
"change_type": "DELETE",
"diff": "-export const dashToCamelCase = (input: string) =>\n- input.replace(/-([a-z])/g, word => word[1].toUpperCase())\n",
"new_path": null,
"old_path": "packages/picasso/src/utils/dash-to-camel-case/dash-to-camel-case.ts"
},
{
"change_type": "DELETE",
"diff": "-export { dashToCamelCase } from './dash-to-camel-case'\n",
"new_path": null,
"old_path": "packages/picasso/src/utils/dash-to-camel-case/index.ts"
},
{
"change_type": "DELETE",
"diff": "-import { dashToCamelCase } from './dash-to-camel-case'\n-\n-describe('dashToCamelCase()', () => {\n- it('converts dash-case to camelCase', () => {\n- expect(dashToCamelCase('test-text-with-dashes')).toEqual(\n- 'testTextWithDashes'\n- )\n- })\n-})\n",
"new_path": null,
"old_path": "packages/picasso/src/utils/dash-to-camel-case/test.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -25,7 +25,6 @@ export {\nexport { default as ClickAwayListener } from '@material-ui/core/ClickAwayListener'\nexport { capitalize } from './capitalize'\n-export { dashToCamelCase } from './dash-to-camel-case'\nexport { default as disableUnsupportedProps } from './disable-unsupported-props'\nexport { forwardRef, documentable } from './forward-ref'\nexport { default as getNameInitials } from './get-name-initials'\n",
"new_path": "packages/picasso/src/utils/index.ts",
"old_path": "packages/picasso/src/utils/index.ts"
}
] |
TypeScript
|
MIT License
|
toptal/picasso
|
chore: remove dashToCamelCase helper (#2472)
| 1
|
chore
| null |
877,037
|
25.02.2022 14:17:37
| -3,600
|
b75179fafb990338f8001ad7506e3e8ed520c795
|
fix(storybook): rollback svelte storybook version
|
[
{
"change_type": "MODIFY",
"diff": "},\n\"devDependencies\": {\n\"@babel/core\": \"^7.17.0\",\n- \"@storybook/addon-a11y\": \"^6.4.18\",\n- \"@storybook/addon-essentials\": \"^6.4.18\",\n+ \"@storybook/addon-a11y\": \"6.3.13\",\n+ \"@storybook/addon-essentials\": \"6.3.13\",\n\"@storybook/addon-svelte-csf\": \"^1.1.0\",\n- \"@storybook/addons\": \"^6.4.18\",\n- \"@storybook/api\": \"^6.4.18\",\n- \"@storybook/client-api\": \"^6.4.18\",\n- \"@storybook/client-logger\": \"^6.4.18\",\n- \"@storybook/components\": \"^6.4.18\",\n- \"@storybook/core-events\": \"^6.4.18\",\n- \"@storybook/svelte\": \"^6.4.18\",\n- \"@storybook/theming\": \"^6.4.18\",\n+ \"@storybook/addons\": \"6.3.13\",\n+ \"@storybook/api\": \"6.3.13\",\n+ \"@storybook/client-api\": \"6.3.13\",\n+ \"@storybook/client-logger\": \"6.3.13\",\n+ \"@storybook/components\": \"6.3.13\",\n+ \"@storybook/core-events\": \"6.3.13\",\n+ \"@storybook/svelte\": \"6.3.13\",\n+ \"@storybook/theming\": \"6.3.13\",\n\"@vtmn/css\": \"*\",\n\"@vtmn/icons\": \"*\",\n\"@vtmn/showcase-core\": \"*\",\n",
"new_path": "packages/showcases/svelte/package.json",
"old_path": "packages/showcases/svelte/package.json"
}
] |
JavaScript
|
Apache License 2.0
|
decathlon/vitamin-web
|
fix(storybook): rollback svelte storybook version (#993)
| 1
|
fix
|
storybook
|
667,713
|
25.02.2022 14:29:07
| -28,800
|
85d7139d53950266dcd61e4cf799eae3d78d7f0b
|
refactor(android): support so loader adapter
|
[
{
"change_type": "MODIFY",
"diff": "@@ -70,10 +70,6 @@ public abstract class HippyEngine {\nprotected int mGroupId;\nModuleListener mModuleListener;\n- static {\n- LibraryLoader.loadLibraryIfNeed();\n- }\n-\n@SuppressWarnings(\"JavaJniMissingFunction\")\nprivate static native void setNativeLogHandler(HippyLogAdapter handler);\n@@ -84,6 +80,7 @@ public abstract class HippyEngine {\nif (params == null) {\nthrow new RuntimeException(\"Hippy: initParams must no be null\");\n}\n+ LibraryLoader.loadLibraryIfNeed(params.soLoader);\nparams.check();\nLogUtils.enableDebugLog(params.enableLog);\nsetNativeLogHandler(params.logAdapter);\n",
"new_path": "android/sdk/src/main/java/com/tencent/mtt/hippy/HippyEngine.java",
"old_path": "android/sdk/src/main/java/com/tencent/mtt/hippy/HippyEngine.java"
},
{
"change_type": "MODIFY",
"diff": "package com.tencent.mtt.hippy.bridge.libraryloader;\n+import android.text.TextUtils;\nimport com.tencent.mtt.hippy.BuildConfig;\n+import com.tencent.mtt.hippy.adapter.soloader.HippySoLoaderAdapter;\npublic class LibraryLoader {\n@@ -25,18 +27,30 @@ public class LibraryLoader {\n\"hippy\", \"flexbox\"\n};\n- public static synchronized void loadLibraryIfNeed() {\n+ public static void loadLibraryIfNeed(HippySoLoaderAdapter soLoaderAdapter) {\nif (hasLoaded || BuildConfig.ENABLE_SO_DOWNLOAD) {\nreturn;\n}\n-\n+ synchronized (LibraryLoader.class) {\n+ if (hasLoaded) {\n+ return;\n+ }\ntry {\nfor (String name : SO_NAME_LIST) {\n+ String tinkerSoPath = null;\n+ if (soLoaderAdapter != null) {\n+ tinkerSoPath = soLoaderAdapter.loadSoPath(name);\n+ }\n+ if (!TextUtils.isEmpty(tinkerSoPath)) {\n+ System.load(tinkerSoPath);\n+ } else {\nSystem.loadLibrary(name);\n}\n+ }\nhasLoaded = true;\n} catch (Throwable e) {\ne.printStackTrace();\n}\n}\n}\n+}\n",
"new_path": "android/sdk/src/main/java/com/tencent/mtt/hippy/bridge/libraryloader/LibraryLoader.java",
"old_path": "android/sdk/src/main/java/com/tencent/mtt/hippy/bridge/libraryloader/LibraryLoader.java"
}
] |
C++
|
Apache License 2.0
|
tencent/hippy
|
refactor(android): support so loader adapter
| 1
|
refactor
|
android
|
865,917
|
25.02.2022 14:29:17
| -3,600
|
0ea525ba4b1d13f9daa8e079347b4070bcbfeab2
|
fix(ci): pin windows-2019
Related to
|
[
{
"change_type": "MODIFY",
"diff": "@@ -12,7 +12,7 @@ jobs:\nBuild:\nstrategy:\nmatrix:\n- os: [ ubuntu-latest, macos-10.15, windows-latest ]\n+ os: [ ubuntu-latest, macos-10.15, windows-2019 ]\nruns-on: ${{ matrix.os }}\nenv:\nON_DEMAND: true\n",
"new_path": ".github/workflows/BUILD_ON_DEMAND.yml",
"old_path": ".github/workflows/BUILD_ON_DEMAND.yml"
},
{
"change_type": "MODIFY",
"diff": "@@ -6,7 +6,7 @@ jobs:\nBuild_nightly:\nstrategy:\nmatrix:\n- os: [ ubuntu-latest, macos-10.15, windows-latest ]\n+ os: [ ubuntu-latest, macos-10.15, windows-2019 ]\nruns-on: ${{ matrix.os }}\nsteps:\n",
"new_path": ".github/workflows/NIGHTLY.yml",
"old_path": ".github/workflows/NIGHTLY.yml"
},
{
"change_type": "MODIFY",
"diff": "@@ -22,7 +22,7 @@ jobs:\nneeds: Pre_release\nstrategy:\nmatrix:\n- os: [ ubuntu-latest, macos-10.15, windows-latest ]\n+ os: [ ubuntu-latest, macos-10.15, windows-2019 ]\nruns-on: ${{ matrix.os }}\n# Required to upload release artifacts to GitHub\n",
"new_path": ".github/workflows/RELEASE.yml",
"old_path": ".github/workflows/RELEASE.yml"
}
] |
JavaScript
|
MIT License
|
camunda/camunda-modeler
|
fix(ci): pin windows-2019
Related to https://github.com/camunda/camunda-modeler/issues/2779
| 1
|
fix
|
ci
|
332,700
|
25.02.2022 15:04:34
| 0
|
0e41f7da44780c79a65100da23e9411ab6c9e826
|
feat(semver): add gitlab releases executor
|
[
{
"change_type": "MODIFY",
"diff": "\"implementation\": \"./src/executors/github/executor\",\n\"schema\": \"./src/executors/github/schema.json\",\n\"description\": \"github executor\"\n+ },\n+ \"gitlab\": {\n+ \"implementation\": \"./src/executors/gitlab/executor\",\n+ \"schema\": \"./src/executors/gitlab/schema.json\",\n+ \"description\": \"gitlab executor\"\n}\n},\n\"builders\": {\n\"implementation\": \"./src/executors/github/compat\",\n\"schema\": \"./src/executors/github/schema.json\",\n\"description\": \"github executor\"\n+ },\n+ \"gitlab\": {\n+ \"implementation\": \"./src/executors/gitlab/compat\",\n+ \"schema\": \"./src/executors/gitlab/schema.json\",\n+ \"description\": \"gitlab executor\"\n}\n}\n}\n",
"new_path": "packages/semver/builders.json",
"old_path": "packages/semver/builders.json"
},
{
"change_type": "ADD",
"diff": "+## @jscutlery/semver:gitlab\n+\n+An executor for creating GitLab Releases.\n+\n+### Requirements\n+\n+This executor requires the [GitLab Release CLI](https://gitlab.com/gitlab-org/release-cli/) to be installed on your machine.\n+\n+### Usage\n+\n+#### Run manually\n+\n+Publish the `v1.0.0` release:\n+\n+```\n+nx run my-project:gitlab --tag_name v1.0.0 [...options]\n+```\n+\n+#### Configuration using post-targets (recommended)\n+\n+This executor aims to be used with [post-targets](https://github.com/jscutlery/semver#post-targets):\n+\n+```json\n+{\n+ \"targets\": {\n+ \"version\": {\n+ \"executor\": \"@jscutlery/semver:version\",\n+ \"options\": {\n+ \"postTargets\": [\"my-project:gitlab\"]\n+ }\n+ },\n+ \"github\": {\n+ \"executor\": \"@jscutlery/semver:gitlab\",\n+ \"options\": {\n+ \"tag_name\": \"${tag}\",\n+ \"description\": \"A description\"\n+ }\n+ }\n+ }\n+}\n+```\n\\ No newline at end of file\n",
"new_path": "packages/semver/src/executors/gitlab/README.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { convertNxExecutor } from '@nrwl/devkit';\n+\n+import runExecutor from './executor';\n+\n+export default convertNxExecutor(runExecutor);\n",
"new_path": "packages/semver/src/executors/gitlab/compat.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { logger } from '@nrwl/devkit';\n+import { of, throwError } from 'rxjs';\n+\n+import { execAsync } from '../common/exec-async';\n+import executor from './executor';\n+\n+import type { GitLabReleaseSchema } from './schema';\n+\n+jest.mock('../common/exec-async');\n+\n+const options: GitLabReleaseSchema = {\n+ tag: 'v1.0.0',\n+};\n+\n+describe('@jscutlery/semver:gitlab', () => {\n+ const mockExec = execAsync as jest.Mock;\n+\n+ beforeEach(() => {\n+ mockExec.mockImplementation(() => {\n+ return of({\n+ stdout: 'success',\n+ });\n+ });\n+ });\n+\n+ it('create release with specified --tag', async () => {\n+ const output = await executor(options);\n+\n+ expect(mockExec).toBeCalledWith(\n+ 'release-cli',\n+ expect.arrayContaining(['create', '--tag-name', 'v1.0.0'])\n+ );\n+ expect(output.success).toBe(true);\n+ });\n+\n+ it('create release with specified --assets', async () => {\n+ const output = await executor({ ...options, assets: [{name: \"asset1\", url: \"./dist/package\"}] });\n+\n+ expect(mockExec).toBeCalledWith(\n+ 'release-cli',\n+ expect.arrayContaining([\"--assets-link='{\\\"name\\\": \\\"asset1\\\", \\\"url\\\": \\\"./dist/package\\\"}'\"])\n+ );\n+ expect(output.success).toBe(true);\n+ });\n+\n+ it('create release with specified --ref', async () => {\n+ const output = await executor({ ...options, ref: 'master' });\n+\n+ expect(mockExec).toBeCalledWith(\n+ 'release-cli',\n+ expect.arrayContaining(['--ref', 'master'])\n+ );\n+ expect(output.success).toBe(true);\n+ });\n+\n+ it('create release with specified --description', async () => {\n+ const output = await executor({ ...options, description: 'add feature' });\n+\n+ expect(mockExec).toBeCalledWith(\n+ 'release-cli',\n+ expect.arrayContaining(['--description', 'add feature'])\n+ );\n+ expect(output.success).toBe(true);\n+ });\n+\n+ it('create release with specified --name', async () => {\n+ const output = await executor({ ...options, name: 'Title for release' });\n+\n+ expect(mockExec).toBeCalledWith(\n+ 'release-cli',\n+ expect.arrayContaining(['--name', 'Title for release'])\n+ );\n+ expect(output.success).toBe(true);\n+ });\n+\n+\n+ it('create release with specified --milestones', async () => {\n+ const output = await executor({\n+ ...options,\n+ milestones: [\"v1.0.0\"],\n+ });\n+\n+ expect(mockExec).toBeCalledWith(\n+ 'release-cli',\n+ expect.arrayContaining(['--milestone', 'v1.0.0'])\n+ );\n+ expect(output.success).toBe(true);\n+ });\n+\n+ it('create release with specified --releasedAt', async () => {\n+ const output = await executor({ ...options, releasedAt: 'XYZ' });\n+\n+ expect(mockExec).toBeCalledWith(\n+ 'release-cli',\n+ expect.arrayContaining(['--released-at', 'XYZ'])\n+ );\n+ expect(output.success).toBe(true);\n+ });\n+\n+ it('handle release CLI errors', async () => {\n+ mockExec.mockImplementation(() => {\n+ return throwError(() => ({\n+ stderr: 'something went wrong'\n+ }));\n+ });\n+ jest.spyOn(logger, 'error').mockImplementation();\n+\n+ const output = await executor(options);\n+\n+ expect(logger.error).toBeCalled();\n+ expect(output.success).toBe(false);\n+ });\n+});\n",
"new_path": "packages/semver/src/executors/gitlab/executor.spec.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { logger } from '@nrwl/devkit';\n+import { lastValueFrom, of } from 'rxjs';\n+import { catchError, mapTo } from 'rxjs/operators';\n+import { ChildProcessResponse, execAsync } from '../common/exec-async';\n+import type { GitLabReleaseSchema } from './schema';\n+\n+export default async function runExecutor({\n+ tag,\n+ ref,\n+ assets,\n+ description,\n+ milestones,\n+ name,\n+ releasedAt,\n+}: GitLabReleaseSchema) {\n+ const createRelease$ = execAsync('release-cli', [\n+ 'create',\n+ ...['--tag-name', tag],\n+ ...(name ? ['--name', name] : []),\n+ ...(description ? ['--description', description] : []),\n+ ...(milestones\n+ ? milestones.map((milestone) => ['--milestone', milestone]).flat()\n+ : []),\n+ ...(releasedAt ? ['--released-at', releasedAt] : []),\n+ ...(ref ? ['--ref', ref] : []),\n+ ...(assets\n+ ? assets.map(\n+ (asset) =>\n+ `--assets-link='{\"name\": \"${asset.name}\", \"url\": \"${asset.url}\"}'`\n+ )\n+ : []),\n+ ]).pipe(\n+ mapTo({ success: true }),\n+ catchError((response: ChildProcessResponse) => {\n+ logger.error(response.stderr);\n+ return of({ success: false });\n+ })\n+ );\n+\n+ return lastValueFrom(createRelease$);\n+}\n",
"new_path": "packages/semver/src/executors/gitlab/executor.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+export interface GitLabReleaseSchema {\n+ tag: string;\n+ ref?: string;\n+ assets?: Asset[];\n+ description?: string;\n+ name?: string;\n+ milestones?: string[];\n+ releasedAt?: string;\n+}\n+\n+export interface Asset {\n+ name: string;\n+ url: string;\n+}\n\\ No newline at end of file\n",
"new_path": "packages/semver/src/executors/gitlab/schema.d.ts",
"old_path": null
}
] |
TypeScript
|
MIT License
|
jscutlery/semver
|
feat(semver): add gitlab releases executor
| 1
|
feat
|
semver
|
711,597
|
25.02.2022 15:11:42
| -3,600
|
335dfb5b67fbb24c8c654a7bf0afbd9bd84d19f8
|
feat(core): Expose RequestContextService and add `create()` method
|
[
{
"change_type": "MODIFY",
"diff": "@@ -10,7 +10,6 @@ import { I18nModule } from '../i18n/i18n.module';\nimport { ServiceModule } from '../service/service.module';\nimport { AdminApiModule, ApiSharedModule, ShopApiModule } from './api-internal-modules';\n-import { RequestContextService } from './common/request-context.service';\nimport { configureGraphQLModule } from './config/configure-graphql-module';\nimport { AuthGuard } from './middleware/auth-guard';\nimport { ExceptionLoggerFilter } from './middleware/exception-logger.filter';\n@@ -52,7 +51,6 @@ import { ValidateCustomFieldsInterceptor } from './middleware/validate-custom-fi\n})),\n],\nproviders: [\n- RequestContextService,\n{\nprovide: APP_GUARD,\nuseClass: AuthGuard,\n",
"new_path": "packages/core/src/api/api.module.ts",
"old_path": "packages/core/src/api/api.module.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -79,7 +79,9 @@ export class RequestContext {\n* @description\n* Creates an \"empty\" RequestContext object. This is only intended to be used\n* when a service method must be called outside the normal request-response\n- * cycle, e.g. when programmatically populating data.\n+ * cycle, e.g. when programmatically populating data. Usually a better alternative\n+ * is to use the {@link RequestContextService} `create()` method, which allows more control\n+ * over the resulting RequestContext object.\n*/\nstatic empty(): RequestContext {\nreturn new RequestContext({\n",
"new_path": "packages/core/src/api/common/request-context.ts",
"old_path": "packages/core/src/api/common/request-context.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -10,13 +10,13 @@ import { ConfigService } from '../../config/config.service';\nimport { LogLevel } from '../../config/logger/vendure-logger';\nimport { CachedSession } from '../../config/session-cache/session-cache-strategy';\nimport { Customer } from '../../entity/customer/customer.entity';\n+import { RequestContextService } from '../../service/helpers/request-context/request-context.service';\nimport { ChannelService } from '../../service/services/channel.service';\nimport { CustomerService } from '../../service/services/customer.service';\nimport { SessionService } from '../../service/services/session.service';\nimport { extractSessionToken } from '../common/extract-session-token';\nimport { parseContext } from '../common/parse-context';\nimport { RequestContext } from '../common/request-context';\n-import { RequestContextService } from '../common/request-context.service';\nimport { setSessionToken } from '../common/set-session-token';\nimport { PERMISSIONS_METADATA_KEY } from '../decorators/allow.decorator';\n",
"new_path": "packages/core/src/api/middleware/auth-guard.ts",
"old_path": "packages/core/src/api/middleware/auth-guard.ts"
},
{
"change_type": "RENAME",
"diff": "import { Injectable } from '@nestjs/common';\nimport { LanguageCode, Permission } from '@vendure/common/lib/generated-types';\n+import { ID } from '@vendure/common/lib/shared-types';\nimport { Request } from 'express';\nimport { GraphQLResolveInfo } from 'graphql';\n+import ms from 'ms';\n-import { idsAreEqual } from '../../common/utils';\n-import { ConfigService } from '../../config/config.service';\n-import { CachedSession, CachedSessionUser } from '../../config/session-cache/session-cache-strategy';\n-import { Channel } from '../../entity/channel/channel.entity';\n-import { ChannelService } from '../../service/services/channel.service';\n-\n-import { getApiType } from './get-api-type';\n-import { RequestContext } from './request-context';\n+import { ApiType, getApiType } from '../../../api/common/get-api-type';\n+import { RequestContext } from '../../../api/common/request-context';\n+import { idsAreEqual } from '../../../common/utils';\n+import { ConfigService } from '../../../config/config.service';\n+import { CachedSession, CachedSessionUser } from '../../../config/session-cache/session-cache-strategy';\n+import { Channel } from '../../../entity/channel/channel.entity';\n+import { User } from '../../../entity/index';\n+import { ChannelService } from '../../services/channel.service';\n+import { getUserChannelsPermissions } from '../utils/get-user-channels-permissions';\n/**\n- * Creates new RequestContext instances.\n+ * @description\n+ * Creates new {@link RequestContext} instances.\n+ *\n+ * @docsCategory request\n*/\n@Injectable()\nexport class RequestContextService {\n+ /** @internal */\nconstructor(private channelService: ChannelService, private configService: ConfigService) {}\n/**\n- * Creates a new RequestContext based on an Express request object.\n+ * @description\n+ * Creates a RequestContext based on the config provided. This can be useful when interacting\n+ * with services outside the request-response cycle, for example in stand-alone scripts or in\n+ * worker jobs.\n+ *\n+ * @since 1.5.0\n+ */\n+ async create(config: {\n+ req?: Request;\n+ apiType: ApiType;\n+ channelOrToken?: Channel | string;\n+ languageCode?: LanguageCode;\n+ user?: User;\n+ activeOrderId?: ID;\n+ }): Promise<RequestContext> {\n+ const { req, apiType, channelOrToken, languageCode, user, activeOrderId } = config;\n+ let channel: Channel;\n+ if (channelOrToken instanceof Channel) {\n+ channel = channelOrToken;\n+ } else if (typeof channelOrToken === 'string') {\n+ channel = await this.channelService.getChannelFromToken(channelOrToken);\n+ } else {\n+ channel = await this.channelService.getDefaultChannel();\n+ }\n+ let session: CachedSession | undefined;\n+ if (user) {\n+ const channelPermissions = user.roles ? getUserChannelsPermissions(user) : [];\n+ session = {\n+ user: {\n+ id: user.id,\n+ identifier: user.identifier,\n+ verified: user.verified,\n+ channelPermissions,\n+ },\n+ id: '__dummy_session_id__',\n+ token: '__dummy_session_token__',\n+ expires: new Date(Date.now() + ms('1y')),\n+ cacheExpiry: ms('1y'),\n+ activeOrderId,\n+ };\n+ }\n+ return new RequestContext({\n+ req,\n+ apiType,\n+ channel,\n+ languageCode,\n+ session,\n+ isAuthorized: true,\n+ authorizedAsOwnerOnly: false,\n+ });\n+ }\n+\n+ /**\n+ * @description\n+ * Creates a new RequestContext based on an Express request object. This is used internally\n+ * in the API layer by the AuthGuard, and creates the RequestContext which is then passed\n+ * to all resolvers & controllers.\n*/\nasync fromRequest(\nreq: Request,\n",
"new_path": "packages/core/src/service/helpers/request-context/request-context.service.ts",
"old_path": "packages/core/src/api/common/request-context.service.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -13,6 +13,8 @@ export * from './helpers/order-state-machine/order-state';\nexport * from './helpers/password-cipher/password-cipher';\nexport * from './helpers/payment-state-machine/payment-state';\nexport * from './helpers/product-price-applicator/product-price-applicator';\n+export * from './helpers/refund-state-machine/refund-state';\n+export * from './helpers/request-context/request-context.service';\nexport * from './helpers/translatable-saver/translatable-saver';\nexport * from './helpers/utils/patch-entity';\nexport * from './helpers/utils/translate-entity';\n",
"new_path": "packages/core/src/service/index.ts",
"old_path": "packages/core/src/service/index.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -22,6 +22,7 @@ import { PasswordCipher } from './helpers/password-cipher/password-cipher';\nimport { PaymentStateMachine } from './helpers/payment-state-machine/payment-state-machine';\nimport { ProductPriceApplicator } from './helpers/product-price-applicator/product-price-applicator';\nimport { RefundStateMachine } from './helpers/refund-state-machine/refund-state-machine';\n+import { RequestContextService } from './helpers/request-context/request-context.service';\nimport { ShippingCalculator } from './helpers/shipping-calculator/shipping-calculator';\nimport { SlugValidator } from './helpers/slug-validator/slug-validator';\nimport { TranslatableSaver } from './helpers/translatable-saver/translatable-saver';\n@@ -116,6 +117,7 @@ const helpers = [\nActiveOrderService,\nProductPriceApplicator,\nEntityHydrator,\n+ RequestContextService,\n];\n/**\n",
"new_path": "packages/core/src/service/service.module.ts",
"old_path": "packages/core/src/service/service.module.ts"
}
] |
TypeScript
|
MIT License
|
vendure-ecommerce/vendure
|
feat(core): Expose RequestContextService and add `create()` method
| 1
|
feat
|
core
|
332,700
|
25.02.2022 15:12:23
| 0
|
530c7867fa2cfac7e50fe2f8a1b6028fe589100a
|
docs(semver): update docs for gitlab executor
|
[
{
"change_type": "MODIFY",
"diff": "@@ -194,6 +194,7 @@ Note that options using the interpolation notation `${variable}` are resolved wi\n#### Built-in post-targets\n- [`@jscutlery/semver:github`](https://github.com/jscutlery/semver/blob/main/packages/semver/src/executors/github/README.md) GiHub Release Support\n+- [`@jscutlery/semver:gitlab`](https://github.com/jscutlery/semver/blob/main/packages/semver/src/executors/gitlab/README.md) GitLab Release Support\n#### Tracking dependencies\n",
"new_path": "README.md",
"old_path": "README.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -32,10 +32,22 @@ This executor aims to be used with [post-targets](https://github.com/jscutlery/s\n\"github\": {\n\"executor\": \"@jscutlery/semver:gitlab\",\n\"options\": {\n- \"tag_name\": \"${tag}\",\n+ \"tag\": \"${tag}\",\n\"description\": \"A description\"\n}\n}\n}\n}\n```\n+\n+#### Available Options\n+\n+| name | type | default | description |\n+| --------------------- | ---------- | ---------------- | ------------------------------------------------------------ |\n+| **`--tag`** | `string` | `$CI_COMMIT_TAG` | attach the release to the specified tag |\n+| **`--name`** | `string` | `undefined` | name of the release |\n+| **`--assets`** | `string[]` | `undefined` | a list of assets to attach new release |\n+| **`--description`** | `string` | `undefined` | release notes |\n+| **`--releasedAt`** | `string` | `undefined` | timestamp which the release will happen/has happened |\n+| **`--ref`** | `boolean` | `$CI_COMMIT_SHA` | commit SHA, another tag name, or a branch name |\n+| **`--milestones`** | `string[]` | `undefined` | list of milestones to associate the release with |\n",
"new_path": "packages/semver/src/executors/gitlab/README.md",
"old_path": "packages/semver/src/executors/gitlab/README.md"
}
] |
TypeScript
|
MIT License
|
jscutlery/semver
|
docs(semver): update docs for gitlab executor
| 1
|
docs
|
semver
|
711,597
|
25.02.2022 15:14:19
| -3,600
|
03b9fe15d43b8ef5cbff298e65f0075d6f6bfc60
|
feat(core): Allow channel to be specified in `populate()` function
Closes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -204,7 +204,9 @@ populate(\n() => bootstrap(config),\ninitialData,\nproductsCsvFile,\n-)\n+ 'my-channel-token' // optional - used to assign imported\n+) // entities to the specified Channel\n+\n.then(app => {\nreturn app.close();\n})\n",
"new_path": "docs/content/developer-guide/importing-product-data.md",
"old_path": "docs/content/developer-guide/importing-product-data.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -48,6 +48,7 @@ import {\nDELETE_PRODUCT,\nDELETE_PRODUCT_VARIANT,\nGET_ASSET_LIST,\n+ GET_COLLECTIONS,\nUPDATE_COLLECTION,\nUPDATE_PRODUCT,\nUPDATE_PRODUCT_VARIANTS,\n@@ -1809,22 +1810,6 @@ const GET_FACET_VALUES = gql`\n${FACET_VALUE_FRAGMENT}\n`;\n-const GET_COLLECTIONS = gql`\n- query GetCollections {\n- collections {\n- items {\n- id\n- name\n- position\n- parent {\n- id\n- name\n- }\n- }\n- }\n- }\n-`;\n-\nconst GET_COLLECTION_PRODUCT_VARIANTS = gql`\nquery GetCollectionProducts($id: ID!) {\ncollection(id: $id) {\n",
"new_path": "packages/core/e2e/collection.e2e-spec.ts",
"old_path": "packages/core/e2e/collection.e2e-spec.ts"
},
{
"change_type": "ADD",
"diff": "+name ,slug ,description ,assets ,facets ,optionGroups ,optionValues ,sku ,price,taxCategory,stockOnHand,trackInventory,variantAssets ,variantFacets ,product:pageType,variant:weight,product:owner,product:keywords ,product:localName\n+Model Hand ,model-hand ,For when you want to draw a hand ,vincent-botta-736919-unsplash.jpg ,Material:wood ,size ,Small ,MHS ,15.45 ,standard ,0 ,false , , ,default ,100 ,\"{\"\"id\"\": 1}\",paper|stretching|watercolor,localModelHand\n+ , , , , , ,Large ,MHL ,19.95 ,standard ,0 ,false , , , ,100 ,\"{\"\"id\"\": 1}\", ,\n",
"new_path": "packages/core/e2e/fixtures/product-import-channel.csv",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -933,3 +933,19 @@ export const GET_SHIPPING_METHOD_LIST = gql`\n}\n${SHIPPING_METHOD_FRAGMENT}\n`;\n+\n+export const GET_COLLECTIONS = gql`\n+ query GetCollections {\n+ collections {\n+ items {\n+ id\n+ name\n+ position\n+ parent {\n+ id\n+ name\n+ }\n+ }\n+ }\n+ }\n+`;\n",
"new_path": "packages/core/e2e/graphql/shared-definitions.ts",
"old_path": "packages/core/e2e/graphql/shared-definitions.ts"
},
{
"change_type": "ADD",
"diff": "+import { INestApplication } from '@nestjs/common';\n+import { DefaultLogger, User } from '@vendure/core';\n+import { populate } from '@vendure/core/cli';\n+import { createTestEnvironment, E2E_DEFAULT_CHANNEL_TOKEN } from '@vendure/testing';\n+import path from 'path';\n+\n+import { initialData } from '../../../e2e-common/e2e-initial-data';\n+import { testConfig, TEST_SETUP_TIMEOUT_MS } from '../../../e2e-common/test-config';\n+import { InitialData } from '../src/index';\n+\n+import {\n+ ChannelFragment,\n+ CreateChannelMutation,\n+ CreateChannelMutationVariables,\n+ CurrencyCode,\n+ GetAssetListQuery,\n+ GetCollectionsQuery,\n+ GetProductListQuery,\n+ LanguageCode,\n+} from './graphql/generated-e2e-admin-types';\n+import {\n+ CREATE_CHANNEL,\n+ GET_ASSET_LIST,\n+ GET_COLLECTIONS,\n+ GET_PRODUCT_LIST,\n+} from './graphql/shared-definitions';\n+\n+describe('populate() function', () => {\n+ let channel2: ChannelFragment;\n+ const { server, adminClient } = createTestEnvironment({\n+ ...testConfig(),\n+ // logger: new DefaultLogger(),\n+ customFields: {\n+ Product: [\n+ { type: 'string', name: 'pageType' },\n+ {\n+ name: 'owner',\n+ public: true,\n+ nullable: true,\n+ type: 'relation',\n+ entity: User,\n+ eager: true,\n+ },\n+ {\n+ name: 'keywords',\n+ public: true,\n+ nullable: true,\n+ type: 'string',\n+ list: true,\n+ },\n+ {\n+ name: 'localName',\n+ type: 'localeString',\n+ },\n+ ],\n+ ProductVariant: [{ type: 'int', name: 'weight' }],\n+ },\n+ });\n+\n+ beforeAll(async () => {\n+ await server.init({\n+ initialData: { ...initialData, collections: [] },\n+ productsCsvPath: path.join(__dirname, 'fixtures/e2e-products-empty.csv'),\n+ customerCount: 1,\n+ });\n+ await adminClient.asSuperAdmin();\n+ const { createChannel } = await adminClient.query<\n+ CreateChannelMutation,\n+ CreateChannelMutationVariables\n+ >(CREATE_CHANNEL, {\n+ input: {\n+ code: 'Channel 2',\n+ token: 'channel-2',\n+ currencyCode: CurrencyCode.EUR,\n+ defaultLanguageCode: LanguageCode.en,\n+ defaultShippingZoneId: 'T_1',\n+ defaultTaxZoneId: 'T_2',\n+ pricesIncludeTax: true,\n+ },\n+ });\n+ channel2 = createChannel as ChannelFragment;\n+ await server.destroy();\n+ }, TEST_SETUP_TIMEOUT_MS);\n+\n+ describe('populating default channel', () => {\n+ let app: INestApplication;\n+\n+ beforeAll(async () => {\n+ const initialDataForPopulate: InitialData = {\n+ defaultLanguage: initialData.defaultLanguage,\n+ defaultZone: initialData.defaultZone,\n+ taxRates: [],\n+ shippingMethods: [],\n+ paymentMethods: [],\n+ countries: [],\n+ collections: [{ name: 'Collection 1', filters: [] }],\n+ };\n+ const csvFile = path.join(__dirname, 'fixtures', 'product-import.csv');\n+ app = await populate(\n+ async () => {\n+ await server.bootstrap();\n+ return server.app;\n+ },\n+ initialDataForPopulate,\n+ csvFile,\n+ );\n+ }, TEST_SETUP_TIMEOUT_MS);\n+\n+ afterAll(async () => {\n+ await app.close();\n+ });\n+\n+ it('populates products', async () => {\n+ await adminClient.asSuperAdmin();\n+ const { products } = await adminClient.query<GetProductListQuery>(GET_PRODUCT_LIST);\n+ expect(products.totalItems).toBe(4);\n+ expect(products.items.map(i => i.name).sort()).toEqual([\n+ 'Artists Smock',\n+ 'Giotto Mega Pencils',\n+ 'Mabef M/02 Studio Easel',\n+ 'Perfect Paper Stretcher',\n+ ]);\n+ });\n+\n+ it('populates assets', async () => {\n+ const { assets } = await adminClient.query<GetAssetListQuery>(GET_ASSET_LIST);\n+ expect(assets.items.map(i => i.name).sort()).toEqual([\n+ 'box-of-12.jpg',\n+ 'box-of-8.jpg',\n+ 'pps1.jpg',\n+ 'pps2.jpg',\n+ ]);\n+ });\n+\n+ it('populates collections', async () => {\n+ const { collections } = await adminClient.query<GetCollectionsQuery>(GET_COLLECTIONS);\n+ expect(collections.items.map(i => i.name).sort()).toEqual(['Collection 1']);\n+ });\n+ });\n+\n+ describe('populating a non-default channel', () => {\n+ let app: INestApplication;\n+ beforeAll(async () => {\n+ const initialDataForPopulate: InitialData = {\n+ defaultLanguage: initialData.defaultLanguage,\n+ defaultZone: initialData.defaultZone,\n+ taxRates: [],\n+ shippingMethods: [],\n+ paymentMethods: [],\n+ countries: [],\n+ collections: [{ name: 'Collection 2', filters: [] }],\n+ };\n+ const csvFile = path.join(__dirname, 'fixtures', 'product-import-channel.csv');\n+\n+ app = await populate(\n+ async () => {\n+ await server.bootstrap();\n+ return server.app;\n+ },\n+ initialDataForPopulate,\n+ csvFile,\n+ channel2.token,\n+ );\n+ });\n+\n+ afterAll(async () => {\n+ await app.close();\n+ });\n+\n+ it('populates products', async () => {\n+ await adminClient.asSuperAdmin();\n+ await adminClient.setChannelToken(channel2.token);\n+ const { products } = await adminClient.query<GetProductListQuery>(GET_PRODUCT_LIST);\n+ expect(products.totalItems).toBe(1);\n+ expect(products.items.map(i => i.name).sort()).toEqual(['Model Hand']);\n+ });\n+\n+ it('populates assets', async () => {\n+ const { assets } = await adminClient.query<GetAssetListQuery>(GET_ASSET_LIST);\n+ expect(assets.items.map(i => i.name).sort()).toEqual(['vincent-botta-736919-unsplash.jpg']);\n+ });\n+\n+ it('populates collections', async () => {\n+ const { collections } = await adminClient.query<GetCollectionsQuery>(GET_COLLECTIONS);\n+ expect(collections.items.map(i => i.name).sort()).toEqual(['Collection 2']);\n+ });\n+\n+ it('product also assigned to default channel', async () => {\n+ await adminClient.setChannelToken(E2E_DEFAULT_CHANNEL_TOKEN);\n+ const { products } = await adminClient.query<GetProductListQuery>(GET_PRODUCT_LIST);\n+ expect(products.totalItems).toBe(1);\n+ expect(products.items.map(i => i.name).sort()).toEqual(['Model Hand']);\n+ });\n+ });\n+});\n",
"new_path": "packages/core/e2e/populate.e2e-spec.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -2,7 +2,7 @@ import { INestApplicationContext } from '@nestjs/common';\nimport fs from 'fs-extra';\nimport path from 'path';\n-import { logColored } from './cli-utils';\n+const loggerCtx = 'Populate';\n// tslint:disable:no-console\n/**\n@@ -11,6 +11,10 @@ import { logColored } from './cli-utils';\n* a supplied CSV file. The format of the CSV file is described in the section\n* [Importing Product Data](/docs/developer-guide/importing-product-data).\n*\n+ * If the `channelOrToken` argument is provided, all ChannelAware entities (Products, ProductVariants,\n+ * Assets, ShippingMethods, PaymentMethods etc.) will be assigned to the specified Channel.\n+ * The argument can be either a Channel object or a valid channel `token`.\n+ *\n* Internally the `populate()` function does the following:\n*\n* 1. Uses the {@link Populator} to populate the {@link InitialData}.\n@@ -47,20 +51,39 @@ export async function populate<T extends INestApplicationContext>(\nbootstrapFn: () => Promise<T | undefined>,\ninitialDataPathOrObject: string | object,\nproductsCsvPath?: string,\n+ channelOrToken?: string | import('@vendure/core').Channel,\n): Promise<T> {\nconst app = await bootstrapFn();\nif (!app) {\nthrow new Error('Could not bootstrap the Vendure app');\n}\n+ let channel: import('@vendure/core').Channel | undefined;\n+ const { ChannelService, Channel, Logger } = await import('@vendure/core');\n+ if (typeof channelOrToken === 'string') {\n+ channel = await app.get(ChannelService).getChannelFromToken(channelOrToken);\n+ if (!channel) {\n+ Logger.warn(\n+ `Warning: channel with token \"${channelOrToken}\" was not found. Using default Channel instead.`,\n+ loggerCtx,\n+ );\n+ }\n+ } else if (channelOrToken instanceof Channel) {\n+ channel = channelOrToken;\n+ }\nconst initialData: import('@vendure/core').InitialData =\ntypeof initialDataPathOrObject === 'string'\n? require(initialDataPathOrObject)\n: initialDataPathOrObject;\n- await populateInitialData(app, initialData, logColored);\n+ await populateInitialData(app, initialData, channel);\nif (productsCsvPath) {\n- const importResult = await importProductsFromCsv(app, productsCsvPath, initialData.defaultLanguage);\n+ const importResult = await importProductsFromCsv(\n+ app,\n+ productsCsvPath,\n+ initialData.defaultLanguage,\n+ channel,\n+ );\nif (importResult.errors && importResult.errors.length) {\nconst errorFile = path.join(process.cwd(), 'vendure-import-error.log');\nconsole.log(\n@@ -69,48 +92,44 @@ export async function populate<T extends INestApplicationContext>(\nawait fs.writeFile(errorFile, importResult.errors.join('\\n'));\n}\n- logColored(`\\nImported ${importResult.imported} products`);\n+ Logger.info(`Imported ${importResult.imported} products`, loggerCtx);\n- await populateCollections(app, initialData, logColored);\n+ await populateCollections(app, initialData);\n}\n- logColored('\\nDone!');\n+ Logger.info('Done!', loggerCtx);\nreturn app;\n}\nexport async function populateInitialData(\napp: INestApplicationContext,\ninitialData: import('@vendure/core').InitialData,\n- loggingFn?: (message: string) => void,\n+ channel?: import('@vendure/core').Channel,\n) {\n- const { Populator } = await import('@vendure/core');\n+ const { Populator, Logger } = await import('@vendure/core');\nconst populator = app.get(Populator);\ntry {\n- await populator.populateInitialData(initialData);\n- if (typeof loggingFn === 'function') {\n- loggingFn(`Populated initial data`);\n- }\n+ await populator.populateInitialData(initialData, channel);\n+ Logger.info(`Populated initial data`, loggerCtx);\n} catch (err) {\n- console.log(err.message);\n+ Logger.error(err.message, loggerCtx);\n}\n}\nexport async function populateCollections(\napp: INestApplicationContext,\ninitialData: import('@vendure/core').InitialData,\n- loggingFn?: (message: string) => void,\n+ channel?: import('@vendure/core').Channel,\n) {\n- const { Populator } = await import('@vendure/core');\n+ const { Populator, Logger } = await import('@vendure/core');\nconst populator = app.get(Populator);\ntry {\nif (initialData.collections.length) {\n- await populator.populateCollections(initialData);\n- if (typeof loggingFn === 'function') {\n- loggingFn(`Created ${initialData.collections.length} Collections`);\n- }\n+ await populator.populateCollections(initialData, channel);\n+ Logger.info(`Created ${initialData.collections.length} Collections`, loggerCtx);\n}\n} catch (err) {\n- console.log(err.message);\n+ Logger.info(err.message, loggerCtx);\n}\n}\n@@ -118,10 +137,16 @@ export async function importProductsFromCsv(\napp: INestApplicationContext,\nproductsCsvPath: string,\nlanguageCode: import('@vendure/core').LanguageCode,\n+ channel?: import('@vendure/core').Channel,\n): Promise<import('@vendure/core').ImportProgress> {\n- const { Importer } = await import('@vendure/core');\n+ const { Importer, RequestContextService } = await import('@vendure/core');\nconst importer = app.get(Importer);\n+ const requestContextService = app.get(RequestContextService);\nconst productData = await fs.readFile(productsCsvPath, 'utf-8');\n-\n- return importer.parseAndImport(productData, languageCode, true).toPromise();\n+ const ctx = await requestContextService.create({\n+ apiType: 'admin',\n+ languageCode,\n+ channelOrToken: channel,\n+ });\n+ return importer.parseAndImport(productData, ctx, true).toPromise();\n}\n",
"new_path": "packages/core/src/cli/populate.ts",
"old_path": "packages/core/src/cli/populate.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -2,6 +2,7 @@ import { Injectable } from '@nestjs/common';\nimport fs from 'fs-extra';\nimport path from 'path';\n+import { RequestContext } from '../../../api/index';\nimport { ConfigService } from '../../../config/config.service';\nimport { Asset } from '../../../entity/asset/asset.entity';\nimport { AssetService } from '../../../service/services/asset.service';\n@@ -26,7 +27,10 @@ export class AssetImporter {\n* Creates Asset entities for the given paths, using the assetMap cache to prevent the\n* creation of duplicates.\n*/\n- async getAssets(assetPaths: string[]): Promise<{ assets: Asset[]; errors: string[] }> {\n+ async getAssets(\n+ assetPaths: string[],\n+ ctx?: RequestContext,\n+ ): Promise<{ assets: Asset[]; errors: string[] }> {\nconst assets: Asset[] = [];\nconst errors: string[] = [];\nconst { importAssetsDir } = this.configService.importExportOptions;\n@@ -43,7 +47,10 @@ export class AssetImporter {\nif (fileStat.isFile()) {\ntry {\nconst stream = fs.createReadStream(filename);\n- const asset = (await this.assetService.createFromFileStream(stream)) as Asset;\n+ const asset = (await this.assetService.createFromFileStream(\n+ stream,\n+ ctx,\n+ )) as Asset;\nthis.assetMap.set(assetPath, asset);\nassets.push(asset);\n} catch (err) {\n",
"new_path": "packages/core/src/data-import/providers/asset-importer/asset-importer.ts",
"old_path": "packages/core/src/data-import/providers/asset-importer/asset-importer.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -6,6 +6,7 @@ import {\nCreateProductVariantInput,\n} from '@vendure/common/lib/generated-types';\nimport { ID } from '@vendure/common/lib/shared-types';\n+import { unique } from '@vendure/common/lib/unique';\nimport { RequestContext } from '../../../api/common/request-context';\nimport { TransactionalConnection } from '../../../connection/transactional-connection';\n@@ -22,6 +23,7 @@ import { ProductAsset } from '../../../entity/product/product-asset.entity';\nimport { ProductTranslation } from '../../../entity/product/product-translation.entity';\nimport { Product } from '../../../entity/product/product.entity';\nimport { TranslatableSaver } from '../../../service/helpers/translatable-saver/translatable-saver';\n+import { RequestContextService } from '../../../service/index';\nimport { ChannelService } from '../../../service/services/channel.service';\nimport { StockMovementService } from '../../../service/services/stock-movement.service';\n@@ -38,6 +40,7 @@ import { StockMovementService } from '../../../service/services/stock-movement.s\n@Injectable()\nexport class FastImporterService {\nprivate defaultChannel: Channel;\n+ private importCtx: RequestContext;\n/** @internal */\nconstructor(\n@@ -45,20 +48,36 @@ export class FastImporterService {\nprivate channelService: ChannelService,\nprivate stockMovementService: StockMovementService,\nprivate translatableSaver: TranslatableSaver,\n+ private requestContextService: RequestContextService,\n) {}\n- async initialize() {\n+ /**\n+ * @description\n+ * This should be called prior to any of the import methods, as it establishes the\n+ * default Channel as well as the context in which the new entities will be created.\n+ *\n+ * Passing a `channel` argument means that Products and ProductVariants will be assigned\n+ * to that Channel.\n+ */\n+ async initialize(channel?: Channel) {\n+ this.importCtx = channel\n+ ? await this.requestContextService.create({\n+ apiType: 'admin',\n+ channelOrToken: channel,\n+ })\n+ : RequestContext.empty();\nthis.defaultChannel = await this.channelService.getDefaultChannel();\n}\nasync createProduct(input: CreateProductInput): Promise<ID> {\n+ this.ensureInitialized();\nconst product = await this.translatableSaver.create({\n- ctx: RequestContext.empty(),\n+ ctx: this.importCtx,\ninput,\nentityType: Product,\ntranslationType: ProductTranslation,\nbeforeSave: async p => {\n- p.channels = [this.defaultChannel];\n+ p.channels = unique([this.defaultChannel, this.importCtx.channel], 'id');\nif (input.facetValueIds) {\np.facetValues = input.facetValueIds.map(id => ({ id } as any));\n}\n@@ -82,8 +101,9 @@ export class FastImporterService {\n}\nasync createProductOptionGroup(input: CreateProductOptionGroupInput): Promise<ID> {\n+ this.ensureInitialized();\nconst group = await this.translatableSaver.create({\n- ctx: RequestContext.empty(),\n+ ctx: this.importCtx,\ninput,\nentityType: ProductOptionGroup,\ntranslationType: ProductOptionGroupTranslation,\n@@ -92,8 +112,9 @@ export class FastImporterService {\n}\nasync createProductOption(input: CreateProductOptionInput): Promise<ID> {\n+ this.ensureInitialized();\nconst option = await this.translatableSaver.create({\n- ctx: RequestContext.empty(),\n+ ctx: this.importCtx,\ninput,\nentityType: ProductOption,\ntranslationType: ProductOptionTranslation,\n@@ -103,6 +124,7 @@ export class FastImporterService {\n}\nasync addOptionGroupToProduct(productId: ID, optionGroupId: ID) {\n+ this.ensureInitialized();\nawait this.connection\n.getRepository(Product)\n.createQueryBuilder()\n@@ -112,6 +134,7 @@ export class FastImporterService {\n}\nasync createProductVariant(input: CreateProductVariantInput): Promise<ID> {\n+ this.ensureInitialized();\nif (!input.optionIds) {\ninput.optionIds = [];\n}\n@@ -125,12 +148,12 @@ export class FastImporterService {\ndelete inputWithoutPrice.price;\nconst createdVariant = await this.translatableSaver.create({\n- ctx: RequestContext.empty(),\n+ ctx: this.importCtx,\ninput: inputWithoutPrice,\nentityType: ProductVariant,\ntranslationType: ProductVariantTranslation,\nbeforeSave: async variant => {\n- variant.channels = [this.defaultChannel];\n+ variant.channels = unique([this.defaultChannel, this.importCtx.channel], 'id');\nconst { optionIds } = input;\nif (optionIds && optionIds.length) {\nvariant.options = optionIds.map(id => ({ id } as any));\n@@ -158,18 +181,30 @@ export class FastImporterService {\n}\nif (input.stockOnHand != null && input.stockOnHand !== 0) {\nawait this.stockMovementService.adjustProductVariantStock(\n- RequestContext.empty(),\n+ this.importCtx,\ncreatedVariant.id,\n0,\ninput.stockOnHand,\n);\n}\n+ const assignedChannelIds = unique([this.defaultChannel, this.importCtx.channel], 'id').map(c => c.id);\n+ for (const channelId of assignedChannelIds) {\nconst variantPrice = new ProductVariantPrice({\nprice: input.price,\n- channelId: this.defaultChannel.id,\n+ channelId,\n});\nvariantPrice.variant = createdVariant;\nawait this.connection.getRepository(ProductVariantPrice).save(variantPrice, { reload: false });\n+ }\n+\nreturn createdVariant.id;\n}\n+\n+ private ensureInitialized() {\n+ if (!this.defaultChannel || !this.importCtx) {\n+ throw new Error(\n+ `The FastImporterService must be initialized with a call to 'initialize()' before importing data`,\n+ );\n+ }\n+ }\n}\n",
"new_path": "packages/core/src/data-import/providers/importer/fast-importer.service.ts",
"old_path": "packages/core/src/data-import/providers/importer/fast-importer.service.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -158,13 +158,13 @@ export class Importer {\nlet imported = 0;\nconst languageCode = ctx.languageCode;\nconst taxCategories = await this.taxCategoryService.findAll(ctx);\n- await this.fastImporter.initialize();\n+ await this.fastImporter.initialize(ctx.channel);\nfor (const { product, variants } of rows) {\nconst productMainTranslation = this.getTranslationByCodeOrFirst(\nproduct.translations,\nctx.languageCode,\n);\n- const createProductAssets = await this.assetImporter.getAssets(product.assetPaths);\n+ const createProductAssets = await this.assetImporter.getAssets(product.assetPaths, ctx);\nconst productAssets = createProductAssets.assets;\nif (createProductAssets.errors.length) {\nerrors = errors.concat(createProductAssets.errors);\n@@ -176,7 +176,7 @@ export class Importer {\nconst createdProductId = await this.fastImporter.createProduct({\nfeaturedAssetId: productAssets.length ? productAssets[0].id : undefined,\nassetIds: productAssets.map(a => a.id),\n- facetValueIds: await this.getFacetValueIds(product.facets, languageCode),\n+ facetValueIds: await this.getFacetValueIds(ctx, product.facets, ctx.languageCode),\ntranslations: product.translations.map(translation => {\nreturn {\nlanguageCode: translation.languageCode,\n@@ -240,7 +240,7 @@ export class Importer {\n}\nlet facetValueIds: ID[] = [];\nif (0 < variant.facets.length) {\n- facetValueIds = await this.getFacetValueIds(variant.facets, languageCode);\n+ facetValueIds = await this.getFacetValueIds(ctx, variant.facets, languageCode);\n}\nconst variantCustomFields = this.processCustomFieldValues(\nvariantMainTranslation.customFields,\n@@ -289,16 +289,12 @@ export class Importer {\nreturn errors;\n}\n- private async getFacetValueIds(facets: ParsedFacet[], languageCode: LanguageCode): Promise<ID[]> {\n+ private async getFacetValueIds(\n+ ctx: RequestContext,\n+ facets: ParsedFacet[],\n+ languageCode: LanguageCode,\n+ ): Promise<ID[]> {\nconst facetValueIds: ID[] = [];\n- const ctx = new RequestContext({\n- channel: await this.channelService.getDefaultChannel(),\n- apiType: 'admin',\n- isAuthorized: true,\n- authorizedAsOwnerOnly: false,\n- session: {} as any,\n- });\n-\nfor (const item of facets) {\nconst itemMainTranslation = this.getTranslationByCodeOrFirst(item.translations, languageCode);\nconst facetName = itemMainTranslation.facet;\n",
"new_path": "packages/core/src/data-import/providers/importer/importer.ts",
"old_path": "packages/core/src/data-import/providers/importer/importer.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -57,10 +57,11 @@ export class Populator {\n/**\n* @description\n* Should be run *before* populating the products, so that there are TaxRates by which\n- * product prices can be set.\n+ * product prices can be set. If the `channel` argument is set, then any {@link ChannelAware}\n+ * entities will be assigned to that Channel.\n*/\n- async populateInitialData(data: InitialData) {\n- const { channel, ctx } = await this.createRequestContext(data);\n+ async populateInitialData(data: InitialData, channel?: Channel) {\n+ const ctx = await this.createRequestContext(data, channel);\nlet zoneMap: ZoneMap;\ntry {\nzoneMap = await this.populateCountries(ctx, data.countries);\n@@ -88,7 +89,7 @@ export class Populator {\nLogger.error(e, 'populator', e.stack);\n}\ntry {\n- await this.setChannelDefaults(zoneMap, data, channel);\n+ await this.setChannelDefaults(zoneMap, data, ctx.channel);\n} catch (e) {\nLogger.error(`Could not set channel defaults`);\nLogger.error(e, 'populator', e.stack);\n@@ -106,8 +107,8 @@ export class Populator {\n* Should be run *after* the products have been populated, otherwise the expected FacetValues will not\n* yet exist.\n*/\n- async populateCollections(data: InitialData) {\n- const { ctx } = await this.createRequestContext(data);\n+ async populateCollections(data: InitialData, channel?: Channel) {\n+ const ctx = await this.createRequestContext(data, channel);\nconst allFacetValues = await this.facetValueService.findAll(ctx.languageCode);\nconst collectionMap = new Map<string, Collection>();\n@@ -189,23 +190,22 @@ export class Populator {\n}\n}\n- private async createRequestContext(data: InitialData) {\n- const channel = await this.channelService.getDefaultChannel();\n+ private async createRequestContext(data: InitialData, channel?: Channel) {\nconst ctx = new RequestContext({\napiType: 'admin',\nisAuthorized: true,\nauthorizedAsOwnerOnly: false,\n- channel,\n+ channel: channel ?? (await this.channelService.getDefaultChannel()),\nlanguageCode: data.defaultLanguage,\n});\n- return { channel, ctx };\n+ return ctx;\n}\nprivate async setChannelDefaults(zoneMap: ZoneMap, data: InitialData, channel: Channel) {\nconst defaultZone = zoneMap.get(data.defaultZone);\nif (!defaultZone) {\nthrow new Error(\n- `The defaultZone (${data.defaultZone}) did not match any zones from the InitialData`,\n+ `The defaultZone (${data.defaultZone}) did not match any existing or created zone names`,\n);\n}\nconst defaultZoneId = defaultZone.entity.id;\n@@ -217,7 +217,11 @@ export class Populator {\n}\nprivate async populateCountries(ctx: RequestContext, countries: CountryDefinition[]): Promise<ZoneMap> {\n- const zones: ZoneMap = new Map();\n+ const zoneMap: ZoneMap = new Map();\n+ const existingZones = await this.zoneService.findAll(ctx);\n+ for (const zone of existingZones) {\n+ zoneMap.set(zone.name, { entity: zone, members: zone.members.map(m => m.id) });\n+ }\nfor (const { name, code, zone } of countries) {\nconst countryEntity = await this.countryService.create(ctx, {\ncode,\n@@ -225,23 +229,26 @@ export class Populator {\ntranslations: [{ languageCode: ctx.languageCode, name }],\n});\n- let zoneItem = zones.get(zone);\n+ let zoneItem = zoneMap.get(zone);\nif (!zoneItem) {\nconst zoneEntity = await this.zoneService.create(ctx, { name: zone });\nzoneItem = { entity: zoneEntity, members: [] };\n- zones.set(zone, zoneItem);\n+ zoneMap.set(zone, zoneItem);\n}\n+ if (!zoneItem.members.includes(countryEntity.id)) {\nzoneItem.members.push(countryEntity.id);\n}\n+ }\n// add the countries to the respective zones\n- for (const zoneItem of zones.values()) {\n+ for (const zoneItem of zoneMap.values()) {\nawait this.zoneService.addMembersToZone(ctx, {\nzoneId: zoneItem.entity.id,\nmemberIds: zoneItem.members,\n});\n}\n- return zones;\n+\n+ return zoneMap;\n}\nprivate async populateTaxRates(\n",
"new_path": "packages/core/src/data-import/providers/populator/populator.ts",
"old_path": "packages/core/src/data-import/providers/populator/populator.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -425,18 +425,22 @@ export class AssetService {\n* @description\n* Create an Asset from a file stream, for example to create an Asset during data import.\n*/\n- async createFromFileStream(stream: ReadStream): Promise<CreateAssetResult>;\n+ async createFromFileStream(stream: ReadStream, ctx?: RequestContext): Promise<CreateAssetResult>;\nasync createFromFileStream(stream: Readable, filePath: string): Promise<CreateAssetResult>;\nasync createFromFileStream(\nstream: ReadStream | Readable,\n- maybeFilePath?: string,\n+ maybeFilePathOrCtx?: string | RequestContext,\n): Promise<CreateAssetResult> {\n+ const filePathFromArgs =\n+ maybeFilePathOrCtx instanceof RequestContext ? undefined : maybeFilePathOrCtx;\nconst filePath =\n- stream instanceof ReadStream || stream instanceof FSReadStream ? stream.path : maybeFilePath;\n+ stream instanceof ReadStream || stream instanceof FSReadStream ? stream.path : filePathFromArgs;\nif (typeof filePath === 'string') {\nconst filename = path.basename(filePath);\nconst mimetype = mime.lookup(filename) || 'application/octet-stream';\n- return this.createAssetInternal(RequestContext.empty(), stream, filename, mimetype);\n+ const ctx =\n+ maybeFilePathOrCtx instanceof RequestContext ? maybeFilePathOrCtx : RequestContext.empty();\n+ return this.createAssetInternal(ctx, stream, filename, mimetype);\n} else {\nthrow new InternalServerError(`error.path-should-be-a-string-got-buffer`);\n}\n",
"new_path": "packages/core/src/service/services/asset.service.ts",
"old_path": "packages/core/src/service/services/asset.service.ts"
}
] |
TypeScript
|
MIT License
|
vendure-ecommerce/vendure
|
feat(core): Allow channel to be specified in `populate()` function
Closes #877
| 1
|
feat
|
core
|
841,421
|
25.02.2022 15:20:25
| -32,400
|
65637e7419233ffadc6bb32ce35f91629fa74c05
|
chore: Publish `@swc/helpers@v0.3.5`
|
[
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@swc/helpers\",\n- \"version\": \"0.3.4\",\n+ \"version\": \"0.3.5\",\n\"description\": \"External helpers for the swc project.\",\n\"esnext\": \"src/index.js\",\n\"module\": \"src/index.js\",\n",
"new_path": "packages/swc-helpers/package.json",
"old_path": "packages/swc-helpers/package.json"
}
] |
Rust
|
Apache License 2.0
|
swc-project/swc
|
chore: Publish `@swc/helpers@v0.3.5`
| 1
|
chore
| null |
688,450
|
25.02.2022 15:24:35
| -10,800
|
a6cf5a4d55e748861031b84537a17505bb07c3e4
|
fix(Tooltip): add missing closing brackets to several cypress test files
|
[
{
"change_type": "MODIFY",
"diff": "@@ -38,7 +38,7 @@ describe('ApplicationUpdateNotification', () => {\n</TestingPicasso>\n)\n- cy.get('[data-testid=\"trigger\"').click()\n+ cy.get('[data-testid=\"trigger\"]').click()\ncy.get('body').happoScreenshot()\n})\n@@ -49,14 +49,14 @@ describe('ApplicationUpdateNotification', () => {\n</TestingPicasso>\n)\n- cy.get('[data-testid=\"trigger\"').click()\n- cy.get('[data-testid=\"application-update-notification\"').should(\n+ cy.get('[data-testid=\"trigger\"]').click()\n+ cy.get('[data-testid=\"application-update-notification\"]').should(\n'be.visible'\n)\n- cy.get('[data-testid=\"update-later-button\"').click()\n+ cy.get('[data-testid=\"update-later-button\"]').click()\n- cy.get('[data-testid=\"application-update-notification\"').should(\n+ cy.get('[data-testid=\"application-update-notification\"]').should(\n'not.be.visible'\n)\n})\n",
"new_path": "cypress/component/ApplicationUpdateNotification.spec.tsx",
"old_path": "cypress/component/ApplicationUpdateNotification.spec.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -126,7 +126,7 @@ describe('Link', () => {\n</TestingPicasso>\n)\n- cy.get('[data-testid=\"link\"')\n+ cy.get('[data-testid=\"link\"]')\n.realHover()\n.should(\n'have.css',\n@@ -148,7 +148,7 @@ describe('Link', () => {\n</TestingPicasso>\n)\n- cy.get('[data-testid=\"link\"')\n+ cy.get('[data-testid=\"link\"]')\n.realHover()\n.should(\n'have.css',\n@@ -170,7 +170,7 @@ describe('Link', () => {\n</TestingPicasso>\n)\n- cy.get('[data-testid=\"link\"')\n+ cy.get('[data-testid=\"link\"]')\n.realHover()\n.should('have.css', 'text-decoration', 'none solid rgb(32, 78, 207)')\n})\n@@ -188,7 +188,7 @@ describe('Link', () => {\n</TestingPicasso>\n)\n- cy.get('[data-testid=\"link\"')\n+ cy.get('[data-testid=\"link\"]')\n.realHover()\n.should('have.css', 'text-decoration', 'none solid rgb(32, 78, 207)')\n})\n@@ -207,13 +207,13 @@ describe('Link', () => {\n</TestingPicasso>\n)\n- cy.get('[data-testid=\"blue-link\"').should(\n+ cy.get('[data-testid=\"blue-link\"]').should(\n'have.css',\n'color',\nDARKER_BLUE\n)\n- cy.get('[data-testid=\"white-link\"').should('have.css', 'color', GREY)\n+ cy.get('[data-testid=\"white-link\"]').should('have.css', 'color', GREY)\n})\n})\n})\n",
"new_path": "cypress/component/Link.spec.tsx",
"old_path": "cypress/component/Link.spec.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -75,7 +75,7 @@ describe('List', () => {\n</TestingPicasso>\n)\n- cy.get('[data-testid=\"list\"').children().last().contains(13)\n+ cy.get('[data-testid=\"list\"]').children().last().contains(13)\n})\n})\n})\n",
"new_path": "cypress/component/List.spec.tsx",
"old_path": "cypress/component/List.spec.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -54,12 +54,12 @@ describe('Menu', () => {\ncy.get(`[data-testid=\"${testIds.menuItem}\"]`).should('not.exist')\ncy.get('body').happoScreenshot()\n- cy.get('[data-testid=\"item-b\"').click()\n+ cy.get('[data-testid=\"item-b\"]').click()\ncy.get('[data-testid=\"menu-b\"]').should('be.visible')\ncy.get('[data-testid=\"menu-b1\"]').should('not.exist')\ncy.get('body').happoScreenshot()\n- cy.get('[data-testid=\"item-b1\"').click()\n+ cy.get('[data-testid=\"item-b1\"]').click()\ncy.get('[data-testid=\"menu-b1\"]').should('be.visible')\ncy.get('[data-testid=\"menu-b2\"]').should('not.exist')\ncy.get('body').happoScreenshot()\n@@ -80,18 +80,18 @@ describe('Menu', () => {\ncy.get('[data-testid=\"menu-b\"]').should('not.exist')\ncy.get('body').happoScreenshot()\n- cy.get('[data-testid=\"item-b\"').trigger('mouseover')\n+ cy.get('[data-testid=\"item-b\"]').trigger('mouseover')\ncy.get('[data-testid=\"menu-b\"]').should('be.visible')\ncy.get('[data-testid=\"menu-b1\"]').should('not.exist')\ncy.get('body').happoScreenshot()\n- cy.get('[data-testid=\"item-b1\"').trigger('mouseover')\n+ cy.get('[data-testid=\"item-b1\"]').trigger('mouseover')\ncy.get('[data-testid=\"menu-b\"]').should('be.visible')\ncy.get('[data-testid=\"menu-b1\"]').should('be.visible')\ncy.get('body').happoScreenshot()\ncy.get('[data-testid=\"menu-b1\"]').trigger('mouseout')\n- cy.get('[data-testid=\"item-b\"').trigger('mouseover')\n+ cy.get('[data-testid=\"item-b\"]').trigger('mouseover')\ncy.get('[data-testid=\"menu-b\"]').should('be.visible')\ncy.get('[data-testid=\"menu-b1\"]').should('not.exist')\ncy.get('body').happoScreenshot()\n",
"new_path": "cypress/component/Menu.spec.tsx",
"old_path": "cypress/component/Menu.spec.tsx"
},
{
"change_type": "MODIFY",
"diff": "@@ -307,22 +307,22 @@ describe('Tooltip', () => {\ncy.get('body').happoScreenshot()\n})\n- it.skip('renders on hover, and hides on click', () => {\n+ it('renders on hover, and hides on click', () => {\nmount(<BasicTooltipExample />)\n// hover outside trigger button to be sure that content shouldnt be seen\n- cy.get('[data-testid=\"tooltip-trigger\"').realHover({\n+ cy.get('[data-testid=\"tooltip-trigger\"]').realHover({\nposition: { x: 0, y: -200 }\n})\n- cy.get('[data-testid=\"tooltip-content\"').should('not.exist')\n- cy.get('[data-testid=\"tooltip-trigger\"').realHover()\n+ cy.get('[data-testid=\"tooltip-content\"]').should('not.exist')\n+ cy.get('[data-testid=\"tooltip-trigger\"]').realHover()\n- cy.get('[data-testid=\"tooltip-content\"').should('be.visible')\n+ cy.get('[data-testid=\"tooltip-content\"]').should('be.visible')\n- cy.get('[data-testid=\"tooltip-trigger\"').click()\n- cy.get('[data-testid=\"tooltip-content\"').should('not.be.visible')\n+ cy.get('[data-testid=\"tooltip-trigger\"]').click()\n+ cy.get('[data-testid=\"tooltip-content\"]').should('not.be.visible')\n})\n- it.skip('renders on hover, and hides on click for Checkbox', () => {\n+ it('renders on hover, and hides on click for Checkbox', () => {\nmount(<CheckboxTooltipExample />)\n// hover outside trigger button to be sure that content shouldnt be seen\ncy.get('[data-testid=\"tooltip-trigger\"]')\n@@ -335,42 +335,42 @@ describe('Tooltip', () => {\ncy.get('[data-testid=\"tooltip-content\"]').should('exist')\ncy.get('body').happoScreenshot()\ncy.get('@trigger').click()\n- cy.get('[data-testid=\"tooltip-content\"').should('not.be.visible')\n+ cy.get('[data-testid=\"tooltip-content\"]').should('not.be.visible')\n})\n- it.skip('renders on hover, and hides on click for Radio', () => {\n+ it('renders on hover, and hides on click for Radio', () => {\nmount(<RadioTooltipExample />)\n// hover outside trigger button to be sure that content shouldnt be seen\n- cy.get('[data-testid=\"trigger\"').realHover({ position: { x: 0, y: -200 } })\n- cy.get('[data-testid=\"tooltip-content\"').should('not.exist')\n- cy.get('[data-testid=\"trigger\"').realHover()\n- cy.get('[data-testid=\"tooltip-content\"').should('be.visible')\n+ cy.get('[data-testid=\"trigger\"]').realHover({ position: { x: 0, y: -200 } })\n+ cy.get('[data-testid=\"tooltip-content\"]').should('not.exist')\n+ cy.get('[data-testid=\"trigger\"]').realHover()\n+ cy.get('[data-testid=\"tooltip-content\"]').should('be.visible')\ncy.get('body').happoScreenshot()\n- cy.get('[data-testid=\"trigger\"').click()\n- cy.get('[data-testid=\"tooltip-content\"').should('not.be.visible')\n+ cy.get('[data-testid=\"trigger\"]').click()\n+ cy.get('[data-testid=\"tooltip-content\"]').should('not.be.visible')\n})\n- it.skip('renders on hover, hides on click, and does not render again until the mouse leave trigger element boundaries', () => {\n+ it('renders on hover, hides on click, and does not render again until the mouse leave trigger element boundaries', () => {\nmount(<BasicTooltipExample />)\n// hover outside trigger button to be sure that content shouldnt be seen\n- cy.get('[data-testid=\"tooltip-trigger\"').realHover({\n+ cy.get('[data-testid=\"tooltip-trigger\"]').realHover({\nposition: { x: 0, y: -200 }\n})\n- cy.get('[data-testid=\"tooltip-content\"').should('not.exist')\n- cy.get('[data-testid=\"tooltip-trigger\"').realHover()\n+ cy.get('[data-testid=\"tooltip-content\"]').should('not.exist')\n+ cy.get('[data-testid=\"tooltip-trigger\"]').realHover()\n- cy.get('[data-testid=\"tooltip-content\"').should('be.visible')\n+ cy.get('[data-testid=\"tooltip-content\"]').should('be.visible')\n- cy.get('[data-testid=\"tooltip-trigger\"').click()\n- cy.get('[data-testid=\"tooltip-trigger\"').realHover({ position: 'topLeft' })\n- cy.get('[data-testid=\"tooltip-trigger\"').realHover({\n+ cy.get('[data-testid=\"tooltip-trigger\"]').click()\n+ cy.get('[data-testid=\"tooltip-trigger\"]').realHover({ position: 'topLeft' })\n+ cy.get('[data-testid=\"tooltip-trigger\"]').realHover({\nposition: 'bottomRight'\n})\n- cy.get('[data-testid=\"tooltip-content\"').should('not.be.visible')\n+ cy.get('[data-testid=\"tooltip-content\"]').should('not.be.visible')\n})\n- it.skip('renders interactive content', () => {\n+ it('renders interactive content', () => {\nmount(<LinkTooltipExample />)\ncy.get('[data-testid=\"tooltip-trigger\"]').as('Trigger').realHover()\ncy.get('[data-testid=\"tooltip-content\"]').as('Content').should('be.visible')\n@@ -381,14 +381,14 @@ describe('Tooltip', () => {\ncy.get('@Content').should('be.visible')\ncy.get('@Trigger').click()\n- cy.get('[data-testid=\"tooltip-content\"]').should('not.be.visible')\n+ cy.get('@Content').should('not.be.visible')\n})\nit('renders inside an autocomplete', () => {\nmount(<AutocompleteTooltipExample />)\n- cy.get('[data-testid=\"autocomplete\"').click()\n- cy.get('[data-testid=\"tooltip-content\"').should('exist')\n+ cy.get('[data-testid=\"autocomplete\"]').click()\n+ cy.get('[data-testid=\"tooltip-content\"]').should('exist')\ncy.get('body').happoScreenshot()\n})\n",
"new_path": "cypress/component/Tooltip.spec.tsx",
"old_path": "cypress/component/Tooltip.spec.tsx"
}
] |
TypeScript
|
MIT License
|
toptal/picasso
|
fix(Tooltip): add missing closing brackets to several cypress test files (#2471)
| 1
|
fix
|
Tooltip
|
699,201
|
25.02.2022 15:32:15
| 18,000
|
563a76ba31d60ee43c1e57907c83c502dc1ba5a7
|
fix: separate changesets for different packages
|
[
{
"change_type": "ADD",
"diff": "+---\n+'@twilio-paste/tooltip': patch\n+'@twilio-paste/core': patch\n+---\n+\n+[tooltip]\n+\n+- Update tooltip arrow stroke to `colorBorderInverseWeaker`\n+- Update tooltip border color to `colorBorderInverseWeaker`\n",
"new_path": ".changeset/blue-gorillas-divide.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+---\n+'@twilio-paste/toast': patch\n+'@twilio-paste/core': patch\n+---\n+\n+[toast]\n+\n+- Update neutral Toast border left color to `colorBorderNeutralWeak`\n",
"new_path": ".changeset/eleven-rocks-argue.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+---\n+'@twilio-paste/display-pill-group': patch\n+'@twilio-paste/core': patch\n+---\n+\n+[display-pill-group]\n+\n+- Update text color to `colorText`\n",
"new_path": ".changeset/poor-parents-suffer.md",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "---\n'@twilio-paste/alert': patch\n-'@twilio-paste/base-radio-checkbox': patch\n-'@twilio-paste/button': patch\n-'@twilio-paste/checkbox': patch\n-'@twilio-paste/display-pill-group': patch\n-'@twilio-paste/input-box': patch\n-'@twilio-paste/modal': patch\n-'@twilio-paste/skeleton-loader': patch\n-'@twilio-paste/toast': patch\n-'@twilio-paste/tooltip': patch\n'@twilio-paste/core': patch\n---\n[alert]\n- Update neutral Alert border to `colorBorderNeutralWeak`\n-\n-[button]\n-\n-- Update `DestructiveButton` default text color to `colorTextInverse`\n-- Update `PrimaryButton` default text color to `colorTextInverse`\n-- Update `DestructiveLinkButton` active text color to `colorTextLinkDestructiveStrongest`\n-- Update `InverseButton` box shadow to `shadowBorderInverseWeakest`\n-- Update `LinkButton` active text color to `colorTextLinkStrongest`\n-\n-[checkbox]\n-\n-- Update the check icon to inherit color from `BaseRadioCheckbox`\n-- Update selectAll background color to default to `colorBackground`, and use `colorBackgroundPrimaryWeakest` when checked and not disabled or indeterminate and not disabled\n-- Update default color to `colorTextWeakest`\n-- Update hover text color to `colorTextWeakest` and border color to `colorBorderPrimaryStronger`\n-- Update focus text color to `colorTextWeakest` and border color to `colorBorderPrimaryStronger`\n-- Update active text color to `colorTextWeakest`\n-- Update checked text color to `colorTextInverse`\n-- Update invalid and hover border color to `colorBorderErrorStronger`\n-- Update checked and hover text color to `colorTextWeakest` and background color to `colorBackgroundPrimaryStronger`\n-- Update checked and focus text color to `colorTextWeakest` and background color to `colorBackgroundPrimaryStronger`\n-- Update checked and disabled text color to `colorTextWeakest`\n-- Update checked and invalid text color to `colorTextInverse`\n-- Update checked and invalid and hover background color to `colorBackgroundErrorStronger` and border color to `colorBorderErrorStronger`\n-\n-[display-pill-group]\n-\n-- Update text color to `colorText`\n-\n-[input-box]\n-\n-- Update default box shadow hover to `shadowBorderPrimaryStronger`\n-- Update default box shadow hover when error and not hidden to `shadowBorderErrorStronger`\n-- Update inverse background color when disabled and not hidden to `colorBackgroundInverse`\n-\n-[modal]\n-\n-- Update modal header border bottom color to `colorBorderWeak`\n-- Update modal footer border top color to `colorBorderWeak`\n-\n-[skeleton-loader]\n-\n-- Update animated background color to use `rgba(255, 255, 255, 0.4)`\n-\n-[toast]\n-\n-- Update neutral Toast border left color to `colorBorderNeutralWeak`\n-\n-[tooltip]\n-\n-- Update tooltip arrow stroke to `colorBorderInverseWeaker`\n-- Update tooltip border color to `colorBorderInverseWeaker`\n",
"new_path": ".changeset/shiny-lions-call.md",
"old_path": ".changeset/shiny-lions-call.md"
},
{
"change_type": "ADD",
"diff": "+---\n+'@twilio-paste/base-radio-checkbox': patch\n+'@twilio-paste/checkbox': patch\n+'@twilio-paste/core': patch\n+---\n+\n+[checkbox]\n+\n+- Update the check icon to inherit color from `BaseRadioCheckbox`\n+- Update selectAll background color to default to `colorBackground`, and use `colorBackgroundPrimaryWeakest` when checked and not disabled or indeterminate and not disabled\n+- Update default color to `colorTextWeakest`\n+- Update hover text color to `colorTextWeakest` and border color to `colorBorderPrimaryStronger`\n+- Update focus text color to `colorTextWeakest` and border color to `colorBorderPrimaryStronger`\n+- Update active text color to `colorTextWeakest`\n+- Update checked text color to `colorTextInverse`\n+- Update invalid and hover border color to `colorBorderErrorStronger`\n+- Update checked and hover text color to `colorTextWeakest` and background color to `colorBackgroundPrimaryStronger`\n+- Update checked and focus text color to `colorTextWeakest` and background color to `colorBackgroundPrimaryStronger`\n+- Update checked and disabled text color to `colorTextWeakest`\n+- Update checked and invalid text color to `colorTextInverse`\n+- Update checked and invalid and hover background color to `colorBackgroundErrorStronger` and border color to `colorBorderErrorStronger`\n",
"new_path": ".changeset/sour-geckos-smell.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+---\n+'@twilio-paste/modal': patch\n+'@twilio-paste/core': patch\n+---\n+\n+[modal]\n+\n+- Update modal header border bottom color to `colorBorderWeak`\n+- Update modal footer border top color to `colorBorderWeak`\n",
"new_path": ".changeset/tall-steaks-argue.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+---\n+'@twilio-paste/skeleton-loader': patch\n+'@twilio-paste/core': patch\n+---\n+\n+[skeleton-loader]\n+\n+- Update animated background color to use `rgba(255, 255, 255, 0.4)`\n",
"new_path": ".changeset/tasty-ads-punch.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+---\n+'@twilio-paste/input-box': patch\n+'@twilio-paste/core': patch\n+---\n+\n+[input-box]\n+\n+- Update default box shadow hover to `shadowBorderPrimaryStronger`\n+- Update default box shadow hover when error and not hidden to `shadowBorderErrorStronger`\n+- Update inverse background color when disabled and not hidden to `colorBackgroundInverse`\n",
"new_path": ".changeset/ten-pants-greet.md",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+---\n+'@twilio-paste/button': patch\n+'@twilio-paste/core': patch\n+---\n+\n+[button]\n+\n+- Update `DestructiveButton` default text color to `colorTextInverse`\n+- Update `PrimaryButton` default text color to `colorTextInverse`\n+- Update `DestructiveLinkButton` active text color to `colorTextLinkDestructiveStrongest`\n+- Update `InverseButton` box shadow to `shadowBorderInverseWeakest`\n+- Update `LinkButton` active text color to `colorTextLinkStrongest`\n",
"new_path": ".changeset/twenty-cheetahs-greet.md",
"old_path": null
}
] |
TypeScript
|
MIT License
|
twilio-labs/paste
|
fix: separate changesets for different packages
| 1
|
fix
| null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.