yousefvand / shellman

vscode shell script snippet extension
MIT License
198 stars 24 forks source link

cannot publish new version to marketplace #54

Closed yousefvand closed 2 months ago

yousefvand commented 2 months ago

Publishing to vscode... (node:212822) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created) ERROR You should not depend on 'vscode' in your 'dependencies'. Did you mean to add it to 'devDependencies'? DONE!

yousefvand commented 2 months ago

After uninstalling cspell which is not used by app there was no dependency using punycode. So I dig the node_modules to see which library is using punycode.

grep -r "punycode" node_modules/ > puncy.txt

node_modules/markdown-it/lib/index.js:var punycode = require('punycode'); node_modules/markdown-it/lib/index.js: parsed.hostname = punycode.toASCII(parsed.hostname); node_modules/markdown-it/lib/index.js: parsed.hostname = punycode.toUnicode(parsed.hostname); node_modules/markdown-it/lib/index.js: which includes url-encoding, punycode, etc. node_modules/markdown-it/dist/markdown-it.min.js:/! https://mths.be/punycode v1.4.1 by @mathias /function Fr(e){throw new RangeError(Er[e])}function Lr(e,r){for(var t=e.length,n=[];t--;)n[t]=r(e[t]);return n}function zr(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),n+Lr((e=e.replace(wr,".")).split("."),r).join(".")}function Tr(e){for(var r,t,n=[],s=0,o=e.length;s<o;)(r=e.charCodeAt(s++))>=55296&&r<=56319&&s<o?56320==(64512&(t=e.charCodeAt(s++)))?n.push(((1023&r)<<10)+(1023&t)+65536):(n.push(r),s--):n.push(r);return n}function Ir(e){return Lr(e,(function(e){var r="";return e>65535&&(r+=Sr((e-=65536)>>>10&1023|55296),e=56320|1023&e),r+=Sr(e)})).join("")}function Mr(e,r){return e+22+75(e<26)-((0!=r)<<5)}function Rr(e,r,t){var n=0;for(e=t?qr(e/700):e>>1,e+=qr(e/r);e>455;n+=Ar)e=qr(e/35);return qr(n+36e/(e+38))}function Br(e){var r,t,n,s,o,i,a,c,l,u,p,h=[],f=e.length,d=0,m=128,g=72;for((t=e.lastIndexOf("-"))<0&&(t=0),n=0;n<t;++n)e.charCodeAt(n)>=128&&Fr("not-basic"),h.push(e.charCodeAt(n));for(s=t>0?t+1:0;s<f;){for(o=d,i=1,a=Ar;s>=f&&Fr("invalid-input"),((c=(p=e.charCodeAt(s++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:Ar)>=Ar||c>qr((yr-d)/i))&&Fr("overflow"),d+=ci,!(c<(l=a<=g?1:a>=g+26?26:a-g));a+=Ar)i>qr(yr/(u=Ar-l))&&Fr("overflow"),i=u;g=Rr(d-o,r=h.length+1,0==o),qr(d/r)>yr-m&&Fr("overflow"),m+=qr(d/r),d%=r,h.splice(d++,0,m)}return Ir(h)}function Nr(e){var r,t,n,s,o,i,a,c,l,u,p,h,f,d,m,g=[];for(h=(e=Tr(e)).length,r=128,t=0,o=72,i=0;i<h;++i)(p=e[i])<128&&g.push(Sr(p));for(n=s=g.length,s&&g.push("-");n<h;){for(a=yr,i=0;i<h;++i)(p=e[i])>=r&&p<a&&(a=p);for(a-r>qr((yr-t)/(f=n+1))&&Fr("overflow"),t+=(a-r)f,r=a,i=0;i<h;++i)if((p=e[i])<r&&++t>yr&&Fr("overflow"),p==r){for(c=t,l=Ar;!(c<(u=l<=o?1:l>=o+26?26:l-o));l+=Ar)m=c-u,d=Ar-u,g.push(Sr(Mr(u+m%d,0))),c=qr(m/d);g.push(Sr(Mr(c,0))),o=Rr(t,f,n==s),t=0,++n}++t,++r}return g.join("")}function Or(e){return zr(e,(function(e){return xr.test(e)?Br(e.slice(4).toLowerCase()):e}))}function Pr(e){return zr(e,(function(e){return Dr.test(e)?"xn--"+Nr(e):e}))}var jr="1.4.1",Ur={decode:Tr,encode:Ir},Vr={version:jr,ucs2:Ur,toASCII:Pr,toUnicode:Or,encode:Nr,decode:Br},Zr=e(Object.freeze({proto:null,decode:Br,encode:Nr,toUnicode:Or,toASCII:Pr,version:jr,ucs2:Ur,default:Vr})),Gr={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},$r=/^(vbscript|javascript|file|data):/,Hr=/^data:image\/(gif|png|jpeg|webp);/;function Jr(e){var r=e.trim().toLowerCase();return!$r.test(r)||!!Hr.test(r)}var Wr=["http:","https:","mailto:"];function Yr(e){var r=C.parse(e,!0);if(r.hostname&&(!r.protocol||Wr.indexOf(r.protocol)>=0))try{r.hostname=Zr.toASCII(r.hostname)}catch(e){}return C.encode(C.format(r))}function Kr(e){var r=C.parse(e,!0);if(r.hostname&&(!r.protocol||Wr.indexOf(r.protocol)>=0))try{r.hostname=Zr.toUnicode(r.hostname)}catch(e){}return C.decode(C.format(r),C.decode.defaultChars+"%")}function Qr(e,r){if(!(this instanceof Qr))return new Qr(e,r);r||w.isString(e)||(r=e||{},e="default"),this.inline=new lr,this.block=new ze,this.core=new ue,this.renderer=new B,this.linkify=new Cr,this.validateLink=Jr,this.normalizeLink=Yr,this.normalizeLinkText=Kr,this.utils=w,this.helpers=w.assign({},L),this.options={},this.configure(e),r&&this.set(r)}return Qr.prototype.set=function(e){return w.assign(this.options,e),this},Qr.prototype.configure=function(e){var r,t=this;if(w.isString(e)&&!(e=Gr[r=e]))throw new Error('Wrong markdown-it preset "'+r+'", check name');if(!e)throw new Error("Wrong markdown-it preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach((function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)})),this},Qr.prototype.enable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(r){t=t.concat(this[r].ruler.enable(e,!0))}),this),t=t.concat(this.inline.ruler2.enable(e,!0));var n=e.filter((function(e){return t.indexOf(e)<0}));if(n.length&&!r)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},Qr.prototype.disable=function(e,r){var t=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(r){t=t.concat(this[r].ruler.disable(e,!0))}),this),t=t.concat(this.inline.ruler2.disable(e,!0));var n=e.filter((function(e){return t.indexOf(e)<0}));if(n.length&&!r)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},Qr.prototype.use=function(e){var r=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,r),this},Qr.prototype.parse=function(e,r){if("string"!=typeof e)throw new Error("Input data should be a String");var t=new this.core.State(e,this,r);return this.core.process(t),t.tokens},Qr.prototype.render=function(e,r){return r=r||{},this.renderer.render(this.parse(e,r),this.options,r)},Qr.prototype.parseInline=function(e,r){var t=new this.core.State(e,this,r);return t.inlineMode=!0,this.core.process(t),t.tokens},Qr.prototype.renderInline=function(e,r){return r=r||{},this.renderer.render(this.parseInline(e,r),this.options,r)},Qr})); node_modules/markdown-it/dist/markdown-it.js: /! https://mths.be/punycode v1.4.1 by @mathias / node_modules/markdown-it/dist/markdown-it.js: // In email addresses, only the domain name should be punycoded. Leave node_modules/markdown-it/dist/markdown-it.js: @see punycode.ucs2.encode node_modules/markdown-it/dist/markdown-it.js: @memberOf punycode.ucs2 node_modules/markdown-it/dist/markdown-it.js: @see punycode.ucs2.decode node_modules/markdown-it/dist/markdown-it.js: @memberOf punycode.ucs2 node_modules/markdown-it/dist/markdown-it.js: @memberOf punycode node_modules/markdown-it/dist/markdown-it.js: @memberOf punycode node_modules/markdown-it/dist/markdown-it.js: @memberOf punycode node_modules/markdown-it/dist/markdown-it.js: @memberOf punycode node_modules/markdown-it/dist/markdown-it.js: @memberOf punycode node_modules/markdown-it/dist/markdown-it.js: var punycode$1 = { node_modules/markdown-it/dist/markdown-it.js: var punycode$2 = Object.freeze({ node_modules/markdown-it/dist/markdown-it.js: default: punycode$1 node_modules/markdown-it/dist/markdown-it.js: var punycode = getAugmentedNamespace(punycode$2); node_modules/markdown-it/dist/markdown-it.js: parsed.hostname = punycode.toASCII(parsed.hostname); node_modules/markdown-it/dist/markdown-it.js: parsed.hostname = punycode.toUnicode(parsed.hostname); node_modules/markdown-it/dist/markdown-it.js: which includes url-encoding, punycode, etc.

As you can see all of punycode belongs to markdown-it library. I opened an issue and made a PR for them to remove punycode from https://github.com/markdown-it/markdown-it. Until they release a new version I cannot release v6.0.0. End of story.

yousefvand commented 2 months ago

markdown-it last version on npmjs is 14.1.0 which is very old. We should wait for the new version to publish ours.