@moneko/core 3.43.3 β†’ 3.43.4

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.
@@ -1,4 +1,4 @@
1
- import{execSync as t}from"node:child_process";import{join as e}from"node:path";import{argv as o}from"node:process";import{updateFileSync as r}from"@moneko/utils";import s from"../commom/log.mjs";import{cwd as i}from"./utils/config.mjs";let n={feat:"✨ Features",fix:"πŸ› Bug Fixes",docs:"πŸ“š Documentation",style:"πŸ’Ž Styles",refactor:"πŸ“¦ Code Refactoring",perf:"πŸš€ Performance Improvements",test:"🚨 Tests",build:"πŸ›  Builds",ci:"βš™οΈ Continuous Integrations",chore:"♻️ Chores",revert:"πŸ—‘ Reverts"};function a(e,o){return function(t){let e=[];for(let o of t.trim().split("\n")){let[t,r,s,i,a]=o.split("|");if(a){let o=a.split(": "),l=n[o[0]];e.push({commitId:t,author:r,email:s,date:new Date(i).toLocaleString().replace(/\//g,"-"),message:l?o.slice(1).join(":"):a,type:l})}}return e}(t(`git log ${e?`${e}..`:""}${o||""} --format='%H|%an|%ae|%ad|%s'`,{encoding:"utf-8"}))}export default function l(){let n=o[3],l=["# Change log"];try{t('git show-ref --quiet --verify "refs/heads/$(git rev-parse --abbrev-ref HEAD)";');let e=t('git config --get remote.origin.url | sed "s/\\.git$//"').toString().trim(),o=function(e){let o=t("git for-each-ref --sort='v:refname' --format '%(objectname) %(refname:short) %(creatordate:iso8601)' refs/tags",{encoding:"utf-8"}),r=[],s=o.trim().split("\n");return s.forEach((t,o)=>{let[i,n,a]=t.split(" "),l=s[o-1]?.split(" ")[1],m=`## ${n}`;l&&(m=`## [${n}](${e}/compare/${l}...${n}) (${new Date(a).toLocaleDateString().replace(/\//g,"-")})`),r.push({commitId:i,tag:n,date:a,title:m,logs:{}})}),r}(e);o.forEach((t,r)=>{if(r&&a(o[r-1].tag,t.tag).forEach(t=>{if(t.type){let s=o[r].logs[t.type]||[];s.push(`- ${t.message} ([${t.commitId.substring(0,7)}](${e}/commit/${t.commitId}))`),Object.assign(o[r].logs,{[t.type]:s})}}),r===o.length-1){let s=a(t.tag);s.length&&o.push({title:"## Last",logs:{}}),s.forEach(t=>{if(t.type){let s=o[r+1].logs[t.type]||[];s.push(`- ${t.message} ([${t.commitId.substring(0,7)}](${e}/commit/${t.commitId}))`),Object.assign(o[r+1].logs,{[t.type]:s})}})}}),o.reverse().forEach(t=>{for(let e in l.push(`
2
- ${t.title}`),t.logs)Object.prototype.hasOwnProperty.call(t.logs,e)&&(l.push(`
1
+ import{execSync as t}from"node:child_process";import{join as e}from"node:path";import{argv as o}from"node:process";import{updateFileSync as r}from"@moneko/utils";import s from"../commom/log.mjs";import{cwd as i}from"./utils/config.mjs";let n={feat:"✨ Features",fix:"πŸ› Bug Fixes",docs:"πŸ“š Documentation",style:"πŸ’Ž Styles",refactor:"πŸ“¦ Code Refactoring",perf:"πŸš€ Performance Improvements",test:"🚨 Tests",build:"πŸ›  Builds",ci:"βš™οΈ Continuous Integrations",chore:"♻️ Chores",revert:"πŸ—‘ Reverts"};function l(e,o){return function(t){let e=[];for(let o of t.trim().split("\n")){let[t,r,s,i,l]=o.split("|");if(l){let o=l.split(": "),a=n[o[0]];e.push({commitId:t,author:r,email:s,date:new Date(i).toLocaleString().replace(/\//g,"-"),message:a?o.slice(1).join(":"):l,type:a})}}return e}(t(`git log ${e?`${e}..`:""}${o||""} --format="%H|%an|%ae|%ad|%s"`,{encoding:"utf-8"}))}export default function a(){let n=o[3],a=["# Change log"];try{let e=t('git config --get remote.origin.url | sed "s/\\.git$//"').toString().trim(),o=function(e){let o=t('git for-each-ref --sort="v:refname" --format "%(objectname) %(refname:short) %(creatordate:iso8601)" refs/tags',{encoding:"utf-8"}),r=[],s=o.trim().split("\n");return s.forEach((t,o)=>{let[i,n,l]=t.split(" "),a=s[o-1]?.split(" ")[1],m=`## ${n}`;a&&(m=`## [${n}](${e}/compare/${a}...${n}) (${new Date(l).toLocaleDateString().replace(/\//g,"-")})`),r.push({commitId:i,tag:n,date:l,title:m,logs:{}})}),r}(e);o.forEach((t,r)=>{if(r&&l(o[r-1].tag,t.tag).forEach(t=>{if(t.type){let s=o[r].logs[t.type]||[];s.push(`- ${t.message} ([${t.commitId.substring(0,7)}](${e}/commit/${t.commitId}))`),Object.assign(o[r].logs,{[t.type]:s})}}),r===o.length-1){let s=l(t.tag);s.length&&o.push({title:"## Last",logs:{}}),s.forEach(t=>{if(t.type){let s=o[r+1].logs[t.type]||[];s.push(`- ${t.message} ([${t.commitId.substring(0,7)}](${e}/commit/${t.commitId}))`),Object.assign(o[r+1].logs,{[t.type]:s})}})}}),o.reverse().forEach(t=>{for(let e in a.push(`
2
+ ${t.title}`),t.logs)Object.prototype.hasOwnProperty.call(t.logs,e)&&(a.push(`
3
3
  ### ${e}
4
- `),t.logs[e].forEach(t=>l.push(t)))})}catch(t){l.push("\nε½“ε‰εˆ†ζ”―ε°šζ— δ»»δ½•ζδΊ€\n"),s(Error(t))}r(e(i,n),l.join("\n"))}
4
+ `),t.logs[e].forEach(t=>a.push(t)))})}catch(t){a.push("\nε½“ε‰εˆ†ζ”―ε°šζ— δ»»δ½•ζδΊ€\n"),s(t)}r(e(i,n),a.join("\n"))}
@@ -1,4 +1,4 @@
1
- import{hrtime as t}from"node:process";import{appendToFileSync as e}from"@moneko/utils";let r=new Date,n=t();async function a(a){let o=function(){let e=t(n),a=e[0],o=e[1],g=new Date(r.getTime()+1e3*a+Math.floor(o/1e6)),i=g.getFullYear(),$=String(g.getMonth()+1).padStart(2,"0"),s=String(g.getDate()).padStart(2,"0"),S=String(g.getHours()).padStart(2,"0"),l=String(g.getMinutes()).padStart(2,"0"),p=String(g.getSeconds()).padStart(2,"0"),d=String(Math.floor(o%1e6/1e3)).padStart(3,"0"),u=String(o%1e3).padStart(3,"0");return`${i}-${$}-${s} ${S}:${l}:${p}.${d}${u}`}(),g=(a instanceof Error?`${a.message}
1
+ import{hrtime as t}from"node:process";import{appendToFileSync as e}from"@moneko/utils";let r=new Date,n=t();async function a(a){let o=function(){let e=t(n),a=e[0],o=e[1],g=new Date(r.getTime()+1e3*a+Math.floor(o/1e6)),i=g.getFullYear(),$=String(g.getMonth()+1).padStart(2,"0"),s=String(g.getDate()).padStart(2,"0"),S=String(g.getHours()).padStart(2,"0"),l=String(g.getMinutes()).padStart(2,"0"),p=String(g.getSeconds()).padStart(2,"0"),d=String(Math.floor(o%1e6/1e3)).padStart(3,"0"),u=String(o%1e3).padStart(3,"0");return`${i}-${$}-${s}T${S}_${l}_${p}.${d}${u}`}(),g=(a instanceof Error?`${a.message}
2
2
  ${a.stack||""}`:String(a)).split("\n"),i=`[${o}] ${g[0]}`,$=" ".repeat(`[${o}] `.length),s=g.slice(1).map(t=>`${$}${t}`).join("\n"),S=`${i}${s?`
3
3
  ${s}`:""}
4
4
  `;e(`logs/${o.substring(0,16)}.log`,S)}export default a;
@@ -1,5 +1,5 @@
1
1
  import { type JsMinifyOptions, minify } from '@swc/core';
2
- import webpack, { type Compilation, type Compiler, type sources, type WebpackError } from 'webpack';
2
+ import webpack, { type Compilation, type Compiler, type sources, WebpackError } from 'webpack';
3
3
  interface CacheItem {
4
4
  source: sources.RawSource;
5
5
  minimized: boolean;
@@ -0,0 +1,2 @@
1
+ import { minify } from '@swc/core';
2
+ import { parentPort } from 'worker_threads';
@@ -0,0 +1 @@
1
+ import{minify as r}from"@swc/core";import{parentPort as e}from"worker_threads";if(!e)throw Error("This file must be run as a worker");e.on("message",async({buffer:o,options:s})=>{let{code:t}=await r(Buffer.from(o).toString().replace(/\r\n/g,"\n"),s);e.postMessage(t)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.43.3",
3
+ "version": "3.43.4",
4
4
  "description": "core",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",