effect-errors 1.6.1 → 1.6.3

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.
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.stackAtRegex = exports.sourceFileWithMapPointerRegex = void 0;
7
7
  const stackAtRegex = exports.stackAtRegex = / {4}at /g;
8
- const sourceFileWithMapPointerRegex = exports.sourceFileWithMapPointerRegex = /^(file:\/\/)?(.*.([jt])s)(\?.*)?:(\d*):(\d*)$/;
8
+ const sourceFileWithMapPointerRegex = exports.sourceFileWithMapPointerRegex = /^(file:\/\/)?(.*.([jt])sx?)(\?.*)?:(\d*):(\d*)$/;
9
9
  //# sourceMappingURL=stack-regex.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stack-regex.js","names":["stackAtRegex","exports","sourceFileWithMapPointerRegex"],"sources":["../../../../src/logic/stack/stack-regex.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAO,MAAMA,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,UAAU;AAC/B,MAAME,6BAA6B,GAAAD,OAAA,CAAAC,6BAAA,GACxC,+CAA+C","ignoreList":[]}
1
+ {"version":3,"file":"stack-regex.js","names":["stackAtRegex","exports","sourceFileWithMapPointerRegex"],"sources":["../../../../src/logic/stack/stack-regex.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAO,MAAMA,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,UAAU;AAC/B,MAAME,6BAA6B,GAAAD,OAAA,CAAAC,6BAAA,GACxC,iDAAiD","ignoreList":[]}
@@ -18,7 +18,7 @@ const getErrorRelatedSources = sourceFile => _effect.Effect.gen(function* () {
18
18
  line,
19
19
  column
20
20
  } = location;
21
- const isTypescriptFile = filePath.endsWith('.ts');
21
+ const isTypescriptFile = filePath.endsWith('.ts') || filePath.endsWith('.tsx');
22
22
  if (isTypescriptFile) {
23
23
  const source = yield* (0, _getSourceCode.getSourceCode)(location);
24
24
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"get-error-related-sources.js","names":["_effect","require","_getErrorLocationFromFilePath","_getSourceCode","_getSourcesFromMapFile","getErrorRelatedSources","sourceFile","Effect","gen","location","getErrorLocationFrom","undefined","filePath","line","column","isTypescriptFile","endsWith","source","getSourceCode","runPath","sourcesPath","getSourcesFromMapFile","exports"],"sources":["../../../src/source-maps/get-error-related-sources.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,OAAA,gBAAAC,OAAA;AAIA,IAAAC,6BAAA,gBAAAD,OAAA;AACA,IAAAE,cAAA,gBAAAF,OAAA;AACA,IAAAG,sBAAA,gBAAAH,OAAA;AAKO,MAAMI,sBAAsB,GACjCC,UAAkB,IAElBN,OAAA,CAAAO,MAAM,CAACC,GAAG,CAAC,aAAS;EAClB,MAAMC,QAAQ,GAAG,IAAAP,6BAAA,CAAAQ,oBAAoB,EAACJ,UAAU,CAAC;EACjD,IAAIG,QAAQ,KAAKE,SAAS,EAAE;IAC1B;EACF;EAEA,MAAM;IAAEC,QAAQ;IAAEC,IAAI;IAAEC;EAAM,CAAE,GAAGL,QAAQ;EAE3C,MAAMM,gBAAgB,GAAGH,QAAQ,CAACI,QAAQ,CAAC,KAAK,CAAC;EACjD,IAAID,gBAAgB,EAAE;IACpB,MAAME,MAAM,GAAG,OAAO,IAAAd,cAAA,CAAAe,aAAa,EAACT,QAAQ,CAAC;IAE7C,OAAO;MACLU,OAAO,EAAE,GAAGP,QAAQ,IAAIC,IAAI,IAAIC,MAAM,EAAE;MACxCM,WAAW,EAAET,SAAS;MACtBM;KACD;EACH;EAEA,OAAO,OAAO,IAAAb,sBAAA,CAAAiB,qBAAqB,EAACZ,QAAQ,CAAC;AAC/C,CAAC,CAAC;AAACa,OAAA,CAAAjB,sBAAA,GAAAA,sBAAA","ignoreList":[]}
1
+ {"version":3,"file":"get-error-related-sources.js","names":["_effect","require","_getErrorLocationFromFilePath","_getSourceCode","_getSourcesFromMapFile","getErrorRelatedSources","sourceFile","Effect","gen","location","getErrorLocationFrom","undefined","filePath","line","column","isTypescriptFile","endsWith","source","getSourceCode","runPath","sourcesPath","getSourcesFromMapFile","exports"],"sources":["../../../src/source-maps/get-error-related-sources.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,OAAA,gBAAAC,OAAA;AAIA,IAAAC,6BAAA,gBAAAD,OAAA;AACA,IAAAE,cAAA,gBAAAF,OAAA;AACA,IAAAG,sBAAA,gBAAAH,OAAA;AAKO,MAAMI,sBAAsB,GACjCC,UAAkB,IAElBN,OAAA,CAAAO,MAAM,CAACC,GAAG,CAAC,aAAS;EAClB,MAAMC,QAAQ,GAAG,IAAAP,6BAAA,CAAAQ,oBAAoB,EAACJ,UAAU,CAAC;EACjD,IAAIG,QAAQ,KAAKE,SAAS,EAAE;IAC1B;EACF;EAEA,MAAM;IAAEC,QAAQ;IAAEC,IAAI;IAAEC;EAAM,CAAE,GAAGL,QAAQ;EAE3C,MAAMM,gBAAgB,GACpBH,QAAQ,CAACI,QAAQ,CAAC,KAAK,CAAC,IAAIJ,QAAQ,CAACI,QAAQ,CAAC,MAAM,CAAC;EACvD,IAAID,gBAAgB,EAAE;IACpB,MAAME,MAAM,GAAG,OAAO,IAAAd,cAAA,CAAAe,aAAa,EAACT,QAAQ,CAAC;IAE7C,OAAO;MACLU,OAAO,EAAE,GAAGP,QAAQ,IAAIC,IAAI,IAAIC,MAAM,EAAE;MACxCM,WAAW,EAAET,SAAS;MACtBM;KACD;EACH;EAEA,OAAO,OAAO,IAAAb,sBAAA,CAAAiB,qBAAqB,EAACZ,QAAQ,CAAC;AAC/C,CAAC,CAAC;AAACa,OAAA,CAAAjB,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"stack-regex.d.ts","sourceRoot":"","sources":["../../../../src/logic/stack/stack-regex.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,QAAa,CAAC;AACvC,eAAO,MAAM,6BAA6B,QACO,CAAC"}
1
+ {"version":3,"file":"stack-regex.d.ts","sourceRoot":"","sources":["../../../../src/logic/stack/stack-regex.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,QAAa,CAAC;AACvC,eAAO,MAAM,6BAA6B,QACS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-error-related-sources.d.ts","sourceRoot":"","sources":["../../../src/source-maps/get-error-related-sources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAI/D,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,gCAAgC,CAAC;AAExC,eAAO,MAAM,sBAAsB,eACrB,MAAM,KACjB,MAAM,CAAC,MAAM,CAAC,mBAAmB,GAAG,SAAS,EAAE,OAAO,CAqBrD,CAAC"}
1
+ {"version":3,"file":"get-error-related-sources.d.ts","sourceRoot":"","sources":["../../../src/source-maps/get-error-related-sources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAI/D,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,gCAAgC,CAAC;AAExC,eAAO,MAAM,sBAAsB,eACrB,MAAM,KACjB,MAAM,CAAC,MAAM,CAAC,mBAAmB,GAAG,SAAS,EAAE,OAAO,CAsBrD,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export const stackAtRegex = / {4}at /g;
2
- export const sourceFileWithMapPointerRegex = /^(file:\/\/)?(.*.([jt])s)(\?.*)?:(\d*):(\d*)$/;
2
+ export const sourceFileWithMapPointerRegex = /^(file:\/\/)?(.*.([jt])sx?)(\?.*)?:(\d*):(\d*)$/;
3
3
  //# sourceMappingURL=stack-regex.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stack-regex.js","names":["stackAtRegex","sourceFileWithMapPointerRegex"],"sources":["../../../../src/logic/stack/stack-regex.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAO,MAAMA,YAAY,GAAG,UAAU;AACtC,OAAO,MAAMC,6BAA6B,GACxC,+CAA+C","ignoreList":[]}
1
+ {"version":3,"file":"stack-regex.js","names":["stackAtRegex","sourceFileWithMapPointerRegex"],"sources":["../../../../src/logic/stack/stack-regex.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAO,MAAMA,YAAY,GAAG,UAAU;AACtC,OAAO,MAAMC,6BAA6B,GACxC,iDAAiD","ignoreList":[]}
@@ -12,7 +12,7 @@ export const getErrorRelatedSources = sourceFile => Effect.gen(function* () {
12
12
  line,
13
13
  column
14
14
  } = location;
15
- const isTypescriptFile = filePath.endsWith('.ts');
15
+ const isTypescriptFile = filePath.endsWith('.ts') || filePath.endsWith('.tsx');
16
16
  if (isTypescriptFile) {
17
17
  const source = yield* getSourceCode(location);
18
18
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"get-error-related-sources.js","names":["Effect","getErrorLocationFrom","getSourceCode","getSourcesFromMapFile","getErrorRelatedSources","sourceFile","gen","location","undefined","filePath","line","column","isTypescriptFile","endsWith","source","runPath","sourcesPath"],"sources":["../../../src/source-maps/get-error-related-sources.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,MAAM,QAAQ,QAAQ;AAI/B,SAASC,oBAAoB,QAAQ,wCAAwC;AAC7E,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAEEC,qBAAqB,QAChB,gCAAgC;AAEvC,OAAO,MAAMC,sBAAsB,GACjCC,UAAkB,IAElBL,MAAM,CAACM,GAAG,CAAC,aAAS;EAClB,MAAMC,QAAQ,GAAGN,oBAAoB,CAACI,UAAU,CAAC;EACjD,IAAIE,QAAQ,KAAKC,SAAS,EAAE;IAC1B;EACF;EAEA,MAAM;IAAEC,QAAQ;IAAEC,IAAI;IAAEC;EAAM,CAAE,GAAGJ,QAAQ;EAE3C,MAAMK,gBAAgB,GAAGH,QAAQ,CAACI,QAAQ,CAAC,KAAK,CAAC;EACjD,IAAID,gBAAgB,EAAE;IACpB,MAAME,MAAM,GAAG,OAAOZ,aAAa,CAACK,QAAQ,CAAC;IAE7C,OAAO;MACLQ,OAAO,EAAE,GAAGN,QAAQ,IAAIC,IAAI,IAAIC,MAAM,EAAE;MACxCK,WAAW,EAAER,SAAS;MACtBM;KACD;EACH;EAEA,OAAO,OAAOX,qBAAqB,CAACI,QAAQ,CAAC;AAC/C,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"get-error-related-sources.js","names":["Effect","getErrorLocationFrom","getSourceCode","getSourcesFromMapFile","getErrorRelatedSources","sourceFile","gen","location","undefined","filePath","line","column","isTypescriptFile","endsWith","source","runPath","sourcesPath"],"sources":["../../../src/source-maps/get-error-related-sources.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,MAAM,QAAQ,QAAQ;AAI/B,SAASC,oBAAoB,QAAQ,wCAAwC;AAC7E,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAEEC,qBAAqB,QAChB,gCAAgC;AAEvC,OAAO,MAAMC,sBAAsB,GACjCC,UAAkB,IAElBL,MAAM,CAACM,GAAG,CAAC,aAAS;EAClB,MAAMC,QAAQ,GAAGN,oBAAoB,CAACI,UAAU,CAAC;EACjD,IAAIE,QAAQ,KAAKC,SAAS,EAAE;IAC1B;EACF;EAEA,MAAM;IAAEC,QAAQ;IAAEC,IAAI;IAAEC;EAAM,CAAE,GAAGJ,QAAQ;EAE3C,MAAMK,gBAAgB,GACpBH,QAAQ,CAACI,QAAQ,CAAC,KAAK,CAAC,IAAIJ,QAAQ,CAACI,QAAQ,CAAC,MAAM,CAAC;EACvD,IAAID,gBAAgB,EAAE;IACpB,MAAME,MAAM,GAAG,OAAOZ,aAAa,CAACK,QAAQ,CAAC;IAE7C,OAAO;MACLQ,OAAO,EAAE,GAAGN,QAAQ,IAAIC,IAAI,IAAIC,MAAM,EAAE;MACxCK,WAAW,EAAER,SAAS;MACtBM;KACD;EACH;EAEA,OAAO,OAAOX,qBAAqB,CAACI,QAAQ,CAAC;AAC/C,CAAC,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  }
18
18
  },
19
19
  "name": "effect-errors",
20
- "version": "1.6.1",
20
+ "version": "1.6.3",
21
21
  "author": "jpb06 <jp.bois.06@outlook.fr>",
22
22
  "description": "A POC for errors reporting in Effect",
23
23
  "keywords": [
@@ -51,7 +51,7 @@
51
51
  "bundle-example": "bun esbuild --bundle --platform=node --format=esm --sourcemap=external --minify --inject:./src/examples/bundling/cjs-shims.ts --outfile=./src/tests/bundle/from-promise.js ./src/examples/bundling/from-promise.bundle.ts"
52
52
  },
53
53
  "dependencies": {
54
- "@effect/schema": "^0.70.3",
54
+ "@effect/schema": "^0.71.0",
55
55
  "effect": "^3.6.2",
56
56
  "source-map-js": "^1.2.0"
57
57
  },