@traqula/rules-sparql-1-1-adjust 0.0.1-alpha.141 → 0.0.1-alpha.143

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.cjs +9 -14
  2. package/package.json +4 -4
package/lib/index.cjs CHANGED
@@ -9550,10 +9550,16 @@ function resolveIRI(iri3, base) {
9550
9550
  return base.replace(/(?:\?.*)?$/u, iri3);
9551
9551
  // Resolve root relative IRIs at the root of the base IRI
9552
9552
  case "/":
9553
- return base + iri3;
9553
+ const baseMatch = base.match(/^(?:[a-z]+:\/*)?[^\/]*/);
9554
+ if (!baseMatch) {
9555
+ throw new Error(`Could not determine relative IRI using base: ${base}`);
9556
+ }
9557
+ const baseRoot = baseMatch[0];
9558
+ return baseRoot + iri3;
9554
9559
  // Resolve all other IRIs at the base IRI's path
9555
9560
  default:
9556
- return base + iri3;
9561
+ const basePath = base.replace(/[^\/:]*$/, "");
9562
+ return basePath + iri3;
9557
9563
  }
9558
9564
  }
9559
9565
 
@@ -10418,12 +10424,6 @@ var blankNode = {
10418
10424
  {
10419
10425
  ALT: () => {
10420
10426
  const label = CONSUME(terminals_exports.blankNodeLabel).image;
10421
- ACTION(() => {
10422
- if (context.flushedBlankNodeLabels.has(label)) {
10423
- throw new Error("Detected reuse blank node across different request string.");
10424
- }
10425
- context.usedBlankNodeLabels.add(label);
10426
- });
10427
10427
  return ACTION(() => context.dataFactory.blankNode(label.replace("_:", "e_")));
10428
10428
  }
10429
10429
  },
@@ -12652,6 +12652,7 @@ var updateUnit = {
12652
12652
  var update = {
12653
12653
  name: "update",
12654
12654
  impl: ({ ACTION, SUBRULE, CONSUME, OPTION1, OPTION2, context }) => () => {
12655
+ const blankLabelsUsedInInsertData = /* @__PURE__ */ new Set();
12655
12656
  const prologueValues = SUBRULE(prologue);
12656
12657
  const result = {
12657
12658
  type: "update",
@@ -12661,12 +12662,6 @@ var update = {
12661
12662
  };
12662
12663
  OPTION1(() => {
12663
12664
  const updateOperation = SUBRULE(update1);
12664
- ACTION(() => {
12665
- for (const label of context.usedBlankNodeLabels) {
12666
- context.flushedBlankNodeLabels.add(label);
12667
- }
12668
- context.usedBlankNodeLabels.clear();
12669
- });
12670
12665
  const recursiveRes = OPTION2(() => {
12671
12666
  CONSUME(symbols_exports.semi);
12672
12667
  return SUBRULE(update);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@traqula/rules-sparql-1-1-adjust",
3
- "version": "0.0.1-alpha.141+caaf4c7",
3
+ "version": "0.0.1-alpha.143+7e8a4c4",
4
4
  "description": "TRAQULA Lexer and Grammar Rules for sparql 1.1-ADJUST",
5
5
  "lsd:module": true,
6
6
  "license": "MIT",
@@ -38,8 +38,8 @@
38
38
  "build:transpile": " node \"../../node_modules/esbuild/bin/esbuild\" --format=cjs --bundle --log-level=error --outfile=lib/index.cjs lib/index.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@traqula/core": "^0.0.1-alpha.141+caaf4c7",
42
- "@traqula/rules-sparql-1-1": "^0.0.1-alpha.141+caaf4c7"
41
+ "@traqula/core": "^0.0.1-alpha.143+7e8a4c4",
42
+ "@traqula/rules-sparql-1-1": "^0.0.1-alpha.143+7e8a4c4"
43
43
  },
44
- "gitHead": "caaf4c71153d27f8fa113b51efb1dae91e182960"
44
+ "gitHead": "7e8a4c4897f112e7291b733121a83726bacfdd0b"
45
45
  }