Skip to content

Commit

Permalink
Fix package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
a-bentofreire committed Oct 23, 2024
1 parent 246221f commit a64b17f
Show file tree
Hide file tree
Showing 23 changed files with 43 additions and 31 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v1.2.1 - 2024-10-23
- Fix package.json

## v1.2.0 - 2024-10-23
- Improve README
- Add commonjs support
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ i0:`Shoes` | Price:`100` | CityTax:`15` | _:`115`
```javascript
import './App.css';
// Without local installation
import { c__, d__ } from 'https://cdn.jsdelivr.net/gh/a-bentofreire/[email protected].0/component/jstracetoix.mjs';
import { c__, d__ } from 'https://cdn.jsdelivr.net/gh/a-bentofreire/[email protected].1/component/jstracetoix.mjs';

// If it's installed locally via "npm install jstracetoix --save-dev"
// import { c__, d__ } from 'jstracetoix/component';
Expand Down Expand Up @@ -128,7 +128,7 @@ This example is similar to the React example, but instead the products are colle
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Product List</title>
<script src="https://cdn.jsdelivr.net/gh/a-bentofreire/[email protected].0/browser/jstracetoix.js"></script>
<script src="https://cdn.jsdelivr.net/gh/a-bentofreire/[email protected].1/browser/jstracetoix.js"></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<style>
table { width: 50%; border-collapse: collapse; margin: 20px auto; }
Expand All @@ -151,7 +151,7 @@ This example is similar to the React example, but instead the products are colle
<script>
const tax = (price) => price > 40 ? 0.15 : 0.10;
axios.get('https://cdn.jsdelivr.net/gh/a-bentofreire/[email protected].0/examples/products.json')
axios.get('https://cdn.jsdelivr.net/gh/a-bentofreire/[email protected].1/examples/products.json')
.then(function (response) {
const products = response.data;
const tableBody = document.querySelector('#productTable tbody');
Expand Down
2 changes: 1 addition & 1 deletion browser/jstracetoix-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright (c) 2024 Alexandre Bento Freire. All rights reserved.
// Licensed under the MIT license
// --------------------------------------------------------------------
// Version: 1.2.0
// Version: 1.2.1
"use strict";
var jstracetoix = (() => {
var __defProp = Object.defineProperty;
Expand Down
2 changes: 1 addition & 1 deletion browser/jstracetoix.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion commonjs/jstracetoix-dev.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright (c) 2024 Alexandre Bento Freire. All rights reserved.
// Licensed under the MIT license
// --------------------------------------------------------------------
// Version: 1.2.0
// Version: 1.2.1
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
Expand Down
2 changes: 1 addition & 1 deletion commonjs/jstracetoix.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright (c) 2024 Alexandre Bento Freire. All rights reserved.
// Licensed under the MIT license
// --------------------------------------------------------------------
// Version: 1.2.0
// Version: 1.2.1
"use strict";var x=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var j=Object.prototype.hasOwnProperty;var E=(e,n)=>{for(var r in n)x(e,r,{get:n[r],enumerable:!0})},v=(e,n,r,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let l of O(n))!j.call(e,l)&&l!==r&&x(e,l,{get:()=>n[l],enumerable:!(a=M(n,l))||a.enumerable});return e};var $=e=>v(x({},"__esModule",{value:!0}),e);var U={};E(U,{DEFAULT_FORMAT:()=>A,c__:()=>J,d__:()=>P,init__:()=>W,t__:()=>D});module.exports=$(U);var R=require("worker_threads"),q=new SharedArrayBuffer(4),I=new Int32Array(q),y=!1,k=process.stdout,B=()=>y,N=e=>{y=e},F=e=>{k=e||k},T=e=>{k.write(e)},g=(e=void 0)=>e||R.threadId,m=()=>{for(;y&&Atomics.compareExchange(I,0,0,1)!==0;);},p=()=>{y&&Atomics.store(I,0,0)};var A={result:"{name}:`{value}`",input:"{name}:`{value}`",thread:"{id}: ",sep:" | ",new_line:!0},C=A,_={},h={},b=!0,W=({stream:e=void 0,multithreading:n=!1,format:r=A,enabled:a=!0}={})=>{m(),F(e),N(n),C=r,_={},h={},b=a,p()},D=(e=void 0,n=void 0)=>{b&&(m(),h[g(n)]=e||`t${Object.keys(h).length}`,p())},J=(e,n)=>{if(!b)return e;let{name:r=void 0,allow:a=void 0,level:l=0}=n||{};m();let s=g();for(_[s]||(_[s]=[{index__:0,meta__:["meta__","index__"]}]);_[s].length<=l;)_[s].push({index__:0,meta__:["meta__","index__"]});let u=_[s][l],o=u.index__,d=u.meta__.length,f=typeof r=="function"?r(o,Object.keys(u).length-d,e):r||`i${Object.keys(u).length-d}`,t=e,i=a;try{typeof a=="function"&&(i=a(o,f,e),typeof i!="boolean"&&(t=i,i=!0))}finally{(i===void 0||i)&&(u[f]=t),u.index__=o+1,p()}return e},P=(e,n={})=>{if(!b)return e;let{name:r="_",allow:a=void 0,before:l=void 0,after:s=void 0,inputs:u=void 0,format:o=void 0}=n||{};m();let d=g(),f=_[d]||[{}],t={...f[f.length-1],...u||{}};t.thread_id__=d,t.input_count__=t.index__||0,t.allow__=!0,t.meta__=[...t.meta__||["meta__"],"allow__","allow_input_count__","input_count__","thread_id__",r],t[r]=e,delete t.index__,t.meta__=t.meta__.filter(i=>i!=="index__"),t.allow_input_count__=Object.keys(t).length-t.meta__.length+1;try{if(typeof a=="function"&&(a=a(t),typeof a!="boolean"&&(t[r]=a,a=!0)),a!==!1){o=o||C;let i="";B()&&o.thread&&(i+=o.thread.replace("{id}",h[d]||`${d}`));let S=(c,L,w)=>c.replace("{name}",L).replace("{value}",typeof w=="object"?JSON.stringify(w):w);if(o.input)for(let c in t)t.meta__.includes(c)||(i+=S(o.input,c,t[c])+(o.sep||""));o.result&&(i+=S(o.result,r,t[r])),t.meta__+=["output__"],t.output__=i,(l===void 0||l(t))&&T(t.output__+(o.new_line?`
`:""))}else t.allow__=!1;s&&s(t)}finally{_[d]&&(_[d].pop(),_[d].length===0&&delete _[d]),p()}return e};0&&(module.exports={DEFAULT_FORMAT,c__,d__,init__,t__});
//# sourceMappingURL=jstracetoix.cjs.map
2 changes: 1 addition & 1 deletion component/jstracetoix-dev.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright (c) 2024 Alexandre Bento Freire. All rights reserved.
// Licensed under the MIT license
// --------------------------------------------------------------------
// Version: 1.2.0
// Version: 1.2.1

// externals.ts
var _stream = console.debug;
Expand Down
2 changes: 1 addition & 1 deletion component/jstracetoix.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright (c) 2024 Alexandre Bento Freire. All rights reserved.
// Licensed under the MIT license
// --------------------------------------------------------------------
// Version: 1.2.0
// Version: 1.2.1
var x=console.debug,k=()=>!1,R=t=>{},g=(t=void 0)=>0,p=()=>{},m=()=>{},S=t=>{x(t)},N=t=>{x=t||x};var A={result:"{name}:`{value}`",input:"{name}:`{value}`",thread:"{id}: ",sep:" | ",new_line:!0},F=A,l={},b={},y=!0,O=({stream:t=void 0,multithreading:s=!1,format:a=A,enabled:r=!0}={})=>{p(),N(t),R(s),F=a,l={},b={},y=r,m()},j=(t=void 0,s=void 0)=>{y&&(p(),b[g(s)]=t||`t${Object.keys(b).length}`,m())},B=(t,s)=>{if(!y)return t;let{name:a=void 0,allow:r=void 0,level:u=0}=s||{};p();let d=g();for(l[d]||(l[d]=[{index__:0,meta__:["meta__","index__"]}]);l[d].length<=u;)l[d].push({index__:0,meta__:["meta__","index__"]});let _=l[d][u],n=_.index__,i=_.meta__.length,f=typeof a=="function"?a(n,Object.keys(_).length-i,t):a||`i${Object.keys(_).length-i}`,e=t,o=r;try{typeof r=="function"&&(o=r(n,f,t),typeof o!="boolean"&&(e=o,o=!0))}finally{(o===void 0||o)&&(_[f]=e),_.index__=n+1,m()}return t},L=(t,s={})=>{if(!y)return t;let{name:a="_",allow:r=void 0,before:u=void 0,after:d=void 0,inputs:_=void 0,format:n=void 0}=s||{};p();let i=g(),f=l[i]||[{}],e={...f[f.length-1],..._||{}};e.thread_id__=i,e.input_count__=e.index__||0,e.allow__=!0,e.meta__=[...e.meta__||["meta__"],"allow__","allow_input_count__","input_count__","thread_id__",a],e[a]=t,delete e.index__,e.meta__=e.meta__.filter(o=>o!=="index__"),e.allow_input_count__=Object.keys(e).length-e.meta__.length+1;try{if(typeof r=="function"&&(r=r(e),typeof r!="boolean"&&(e[a]=r,r=!0)),r!==!1){n=n||F;let o="";k()&&n.thread&&(o+=n.thread.replace("{id}",b[i]||`${i}`));let w=(c,I,h)=>c.replace("{name}",I).replace("{value}",typeof h=="object"?JSON.stringify(h):h);if(n.input)for(let c in e)e.meta__.includes(c)||(o+=w(n.input,c,e[c])+(n.sep||""));n.result&&(o+=w(n.result,a,e[a])),e.meta__+=["output__"],e.output__=o,(u===void 0||u(e))&&S(e.output__+(n.new_line?`
`:""))}else e.allow__=!1;d&&d(e)}finally{l[i]&&(l[i].pop(),l[i].length===0&&delete l[i]),m()}return t};export{A as DEFAULT_FORMAT,B as c__,L as d__,O as init__,j as t__};
//# sourceMappingURL=jstracetoix.mjs.map
2 changes: 1 addition & 1 deletion docs/functions/c__.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
name of the input.
Defaults to <code>i%d</code> where %d is the number of inputs for the thread.</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4><p>The input value</p>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/a-bentofreire/jstracetoix/blob/cd68d2340c453880a2618e38f2133a2d4edf5976/jstracetoix.ts#L143">jstracetoix.ts:143</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>jstracetoix</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/a-bentofreire/jstracetoix/blob/246221f1e20532b892c4fbe9610cc06a4c8863c5/jstracetoix.ts#L143">jstracetoix.ts:143</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>jstracetoix</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
Loading

0 comments on commit a64b17f

Please sign in to comment.