New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@itwin/presentation-shared

Package Overview
Dependencies
Maintainers
5
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@itwin/presentation-shared - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

6

CHANGELOG.md
# @itwin/presentation-shared
## 0.3.1
### Patch Changes
- [#631](https://github.com/iTwin/presentation/pull/631): Fix `ECSql.createRelationshipPathJoinClause` creating an invalid JOIN clause in case of reversed relationship step that uses a navigation property.
## 0.3.0

@@ -4,0 +10,0 @@

18

lib/cjs/shared/ecsql-snippets/ECSqlJoinSnippets.js

@@ -48,11 +48,15 @@ "use strict";

if (navigationProperty) {
const propertyDirectionMatchesRelationshipDirection = navigationProperty.direction === step.relationship.direction;
const isNavigationPropertyForward = navigationProperty.direction === "Forward";
const relationshipJoinPropertyNames = isNavigationPropertyForward === !step.relationshipReverse
? {
this: (0, ECSqlValueSelectorSnippets_1.createRawPropertyValueSelector)(step.targetAlias, "ECInstanceId"),
next: (0, ECSqlValueSelectorSnippets_1.createRawPropertyValueSelector)(prev.alias, navigationProperty.name, "Id"),
}
: {
this: (0, ECSqlValueSelectorSnippets_1.createRawPropertyValueSelector)(step.targetAlias, navigationProperty.name, "Id"),
next: (0, ECSqlValueSelectorSnippets_1.createRawPropertyValueSelector)(prev.alias, prev.joinPropertyName),
};
clause += `
${getJoinClause(step.joinType)} ${getClassSelectClause(step.target, step.targetAlias)}
ON ${propertyDirectionMatchesRelationshipDirection
? (0, ECSqlValueSelectorSnippets_1.createRawPropertyValueSelector)(step.targetAlias, "ECInstanceId")
: (0, ECSqlValueSelectorSnippets_1.createRawPropertyValueSelector)(step.targetAlias, navigationProperty.name, "Id")}
= ${propertyDirectionMatchesRelationshipDirection
? (0, ECSqlValueSelectorSnippets_1.createRawPropertyValueSelector)(prev.alias, navigationProperty.name, "Id")
: (0, ECSqlValueSelectorSnippets_1.createRawPropertyValueSelector)(prev.alias, prev.joinPropertyName)}
ON ${relationshipJoinPropertyNames.this} = ${relationshipJoinPropertyNames.next}
`;

@@ -59,0 +63,0 @@ prev = {

@@ -45,11 +45,15 @@ /*---------------------------------------------------------------------------------------------

if (navigationProperty) {
const propertyDirectionMatchesRelationshipDirection = navigationProperty.direction === step.relationship.direction;
const isNavigationPropertyForward = navigationProperty.direction === "Forward";
const relationshipJoinPropertyNames = isNavigationPropertyForward === !step.relationshipReverse
? {
this: createRawPropertyValueSelector(step.targetAlias, "ECInstanceId"),
next: createRawPropertyValueSelector(prev.alias, navigationProperty.name, "Id"),
}
: {
this: createRawPropertyValueSelector(step.targetAlias, navigationProperty.name, "Id"),
next: createRawPropertyValueSelector(prev.alias, prev.joinPropertyName),
};
clause += `
${getJoinClause(step.joinType)} ${getClassSelectClause(step.target, step.targetAlias)}
ON ${propertyDirectionMatchesRelationshipDirection
? createRawPropertyValueSelector(step.targetAlias, "ECInstanceId")
: createRawPropertyValueSelector(step.targetAlias, navigationProperty.name, "Id")}
= ${propertyDirectionMatchesRelationshipDirection
? createRawPropertyValueSelector(prev.alias, navigationProperty.name, "Id")
: createRawPropertyValueSelector(prev.alias, prev.joinPropertyName)}
ON ${relationshipJoinPropertyNames.this} = ${relationshipJoinPropertyNames.next}
`;

@@ -56,0 +60,0 @@ prev = {

{
"name": "@itwin/presentation-shared",
"version": "0.3.0",
"version": "0.3.1",
"description": "The package contains types and utilities used across different iTwin.js Presentation packages.",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc