@blazediff/bun 1.1.9 → 1.2.0

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.
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var bun_test=require('bun:test'),matcher=require('@blazediff/matcher');function r(){bun_test.expect.extend({toMatchImageSnapshot:async function(o,e){let a=h(),p=e?.snapshotIdentifier||"snapshot",c=e?.updateSnapshots||process.env.BUN_UPDATE_SNAPSHOTS==="true"||Bun.argv.includes("-u")||Bun.argv.includes("--update-snapshots"),s=await matcher.getOrCreateSnapshot(o,{method:"core",...e,updateSnapshots:c,updateCommand:"--update-snapshots or BUN_UPDATE_SNAPSHOTS=true"},{testPath:a,testName:p}),t=this.snapshotState;if(t&&s.snapshotStatus)switch(s.snapshotStatus){case "added":t.added=(t.added||0)+1;break;case "updated":t.updated=(t.updated||0)+1;break;case "matched":t.matched=(t.matched||0)+1;break;case "failed":t.unmatched=(t.unmatched||0)+1;break}return {pass:s.pass,message:()=>s.message}}});}function h(){if(typeof Bun<"u"&&Bun.main)return Bun.main;let n=new Error().stack;if(n){let o=n.split(`
2
- `);for(let e of o){let a=e.match(/at\s+(.+\.test\.[tj]s)/);if(a)return a[1]}}return "unknown"}r();var f=r;exports.default=f;exports.setupBlazediffMatchers=r;
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var bun_test=require('bun:test'),matcher=require('@blazediff/matcher');function r(){bun_test.expect.extend({toMatchImageSnapshot:async function(o,a){let e=h(),p=a?.snapshotIdentifier||"snapshot",c=a?.updateSnapshots||process.env.BUN_UPDATE_SNAPSHOTS==="true"||Bun.argv.includes("-u")||Bun.argv.includes("--update-snapshots"),s=await matcher.getOrCreateSnapshot(o,{method:"core",...a,updateSnapshots:c,updateCommand:"--update-snapshots or BUN_UPDATE_SNAPSHOTS=true"},{testPath:e,testName:p}),t=this.snapshotState;if(t&&s.snapshotStatus)switch(s.snapshotStatus){case "added":t.added=(t.added||0)+1;break;case "updated":t.updated=(t.updated||0)+1;break;case "matched":t.matched=(t.matched||0)+1;break;case "failed":t.unmatched=(t.unmatched||0)+1;break}return {pass:s.pass,message:()=>s.message}}});}function h(){if(Bun?.main)return Bun.main;let n=new Error().stack;if(n){let o=n.split(`
2
+ `);for(let a of o){let e=a.match(/at\s+(.+\.test\.[tj]s)/);if(e)return e[1]}}return "unknown"}r();var f=r;exports.default=f;exports.setupBlazediffMatchers=r;
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import {expect}from'bun:test';import {getOrCreateSnapshot}from'@blazediff/matcher';function r(){expect.extend({toMatchImageSnapshot:async function(o,e){let a=h(),p=e?.snapshotIdentifier||"snapshot",c=e?.updateSnapshots||process.env.BUN_UPDATE_SNAPSHOTS==="true"||Bun.argv.includes("-u")||Bun.argv.includes("--update-snapshots"),s=await getOrCreateSnapshot(o,{method:"core",...e,updateSnapshots:c,updateCommand:"--update-snapshots or BUN_UPDATE_SNAPSHOTS=true"},{testPath:a,testName:p}),t=this.snapshotState;if(t&&s.snapshotStatus)switch(s.snapshotStatus){case "added":t.added=(t.added||0)+1;break;case "updated":t.updated=(t.updated||0)+1;break;case "matched":t.matched=(t.matched||0)+1;break;case "failed":t.unmatched=(t.unmatched||0)+1;break}return {pass:s.pass,message:()=>s.message}}});}function h(){if(typeof Bun<"u"&&Bun.main)return Bun.main;let n=new Error().stack;if(n){let o=n.split(`
2
- `);for(let e of o){let a=e.match(/at\s+(.+\.test\.[tj]s)/);if(a)return a[1]}}return "unknown"}r();var f=r;export{f as default,r as setupBlazediffMatchers};
1
+ import {expect}from'bun:test';import {getOrCreateSnapshot}from'@blazediff/matcher';function r(){expect.extend({toMatchImageSnapshot:async function(o,a){let e=h(),p=a?.snapshotIdentifier||"snapshot",c=a?.updateSnapshots||process.env.BUN_UPDATE_SNAPSHOTS==="true"||Bun.argv.includes("-u")||Bun.argv.includes("--update-snapshots"),s=await getOrCreateSnapshot(o,{method:"core",...a,updateSnapshots:c,updateCommand:"--update-snapshots or BUN_UPDATE_SNAPSHOTS=true"},{testPath:e,testName:p}),t=this.snapshotState;if(t&&s.snapshotStatus)switch(s.snapshotStatus){case "added":t.added=(t.added||0)+1;break;case "updated":t.updated=(t.updated||0)+1;break;case "matched":t.matched=(t.matched||0)+1;break;case "failed":t.unmatched=(t.unmatched||0)+1;break}return {pass:s.pass,message:()=>s.message}}});}function h(){if(Bun?.main)return Bun.main;let n=new Error().stack;if(n){let o=n.split(`
2
+ `);for(let a of o){let e=a.match(/at\s+(.+\.test\.[tj]s)/);if(e)return e[1]}}return "unknown"}r();var f=r;export{f as default,r as setupBlazediffMatchers};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blazediff/bun",
3
- "version": "1.1.9",
3
+ "version": "1.2.0",
4
4
  "description": "Bun test matcher for visual regression testing with blazediff",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -33,7 +33,7 @@
33
33
  "homepage": "https://blazediff.dev",
34
34
  "license": "MIT",
35
35
  "dependencies": {
36
- "@blazediff/matcher": "1.3.1"
36
+ "@blazediff/matcher": "1.4.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/bun": "^1.2.10",