Skip to content

Commit

Permalink
Merge branch 'release/v0.23.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
holtwick committed Aug 14, 2024
2 parents c23cfdc + dcdb721 commit 5158fa2
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 108 deletions.
9 changes: 1 addition & 8 deletions demos/node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@

import process from 'node:process'

import {
Logger,
digest,
setupEnv,
stringToUInt8Array,
toUint8Array,
uuid,
} from 'zeed'
import { Logger, digest, setupEnv, stringToUInt8Array, toUint8Array, uuid } from 'zeed'

// Some basic logging

Expand Down
7 changes: 7 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ export default antfu(
'ts/no-misused-promises': 'off',
// 'ts/no-floating-promises': 'error',
// 'ts/require-await': 'error',

// All import properties in one line
'object-curly-newline': ['error', {
ImportDeclaration: 'never',
// ExportDeclaration: 'always'
}],

},
},
)
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "zeed",
"type": "module",
"version": "0.23.1",
"version": "0.23.2",
"description": "🌱 Simple foundation library",
"author": {
"name": "Dirk Holtwick",
Expand Down Expand Up @@ -70,8 +70,8 @@
},
"devDependencies": {
"@antfu/eslint-config": "^2.25",
"@antfu/ni": "^0.22.1",
"@types/node": "^22.2.0",
"@antfu/ni": "^0.22.4",
"@types/node": "^22.3.0",
"@vitejs/plugin-vue": "^5.1.2",
"@vitest/browser": "^2.0.5",
"@vitest/coverage-v8": "^2.0.5",
Expand Down
22 changes: 1 addition & 21 deletions src/common/data/array.spec.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
import {
arrayAvg,
arrayBatches,
arrayFilterInPlace,
arrayFlatten,
arrayIntersection,
arrayIsEqual,
arrayMax,
arrayMin,
arrayMinus,
arrayRemoveElement,
arraySetArrayInPlace,
arrayShuffleForce,
arraySorted,
arraySortedNumbers,
arraySum,
arraySymmetricDifference,
arrayToggleInPlace,
arrayUnion,
createArray,
} from './array'
import { arrayAvg, arrayBatches, arrayFilterInPlace, arrayFlatten, arrayIntersection, arrayIsEqual, arrayMax, arrayMin, arrayMinus, arrayRemoveElement, arraySetArrayInPlace, arrayShuffleForce, arraySorted, arraySortedNumbers, arraySum, arraySymmetricDifference, arrayToggleInPlace, arrayUnion, createArray } from './array'

describe('array', () => {
it('should remove items', () => {
Expand Down
7 changes: 1 addition & 6 deletions src/common/data/camelcase.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
fromCamelCase,
toCamelCase,
toCapitalize,
toCapitalizeWords,
} from './camelcase'
import { fromCamelCase, toCamelCase, toCapitalize, toCapitalizeWords } from './camelcase'

describe('camelcase', () => {
it('should convert', () => {
Expand Down
13 changes: 1 addition & 12 deletions src/common/data/day.spec.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
import {
dayDiff,
dayFromDate,
dayFromString,
dayIterator,
dayMonthStart,
dayOffset,
dayRange,
dayToParts,
dayToString,
dayYearStart,
} from './day'
import { dayDiff, dayFromDate, dayFromString, dayIterator, dayMonthStart, dayOffset, dayRange, dayToParts, dayToString, dayYearStart } from './day'
import { Day, dateStringToDays, forEachDay } from './day-legacy'

describe('days', () => {
Expand Down
13 changes: 1 addition & 12 deletions src/common/data/rounding.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
import { arraySum } from './array'
import {
roundArrayOfNumbersToMatchSum,
roundArrayOfObjectsToMatchSum,
roundDown,
roundHalfAwayFromZero,
roundHalfDown,
roundHalfEven,
roundHalfOdd,
roundHalfTowardsZero,
roundHalfUp,
roundUp,
} from './rounding'
import { roundArrayOfNumbersToMatchSum, roundArrayOfObjectsToMatchSum, roundDown, roundHalfAwayFromZero, roundHalfDown, roundHalfEven, roundHalfOdd, roundHalfTowardsZero, roundHalfUp, roundUp } from './rounding'

describe('currency', () => {
describe('down', () => {
Expand Down
7 changes: 1 addition & 6 deletions src/common/data/sortable.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { arrayShuffleForce, arrayShuffleInPlace } from './array'
import type { SortableItem } from './sortable'
import {
endSortWeight,
moveSortWeight,
sortedItems,
startSortWeight,
} from './sortable'
import { endSortWeight, moveSortWeight, sortedItems, startSortWeight } from './sortable'
import { last } from './utils'

interface SItem extends SortableItem {
Expand Down
10 changes: 1 addition & 9 deletions src/common/data/utils.spec.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import { sleep } from '../exec'
import {
cloneObject,
empty,
ensureKey,
forTimes,
memoize,
memoizeAsync,
size,
} from './utils'
import { cloneObject, empty, ensureKey, forTimes, memoize, memoizeAsync, size } from './utils'

describe('cloneObject', () => {
it('should clone only non primitives', () => {
Expand Down
8 changes: 1 addition & 7 deletions src/common/exec/promise.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
createPromise,
isPromise,
promisify,
sleep,
timeout,
} from './promise'
import { createPromise, isPromise, promisify, sleep, timeout } from './promise'

describe('promises', () => {
async function demo() {
Expand Down
8 changes: 1 addition & 7 deletions src/common/network.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
arrayFlatten,
deepMerge,
isArray,
jsonStringifySafe,
toBase64,
} from './data'
import { arrayFlatten, deepMerge, isArray, jsonStringifySafe, toBase64 } from './data'
import { encodeQuery } from './data/url'
import { DefaultLogger } from './log'
import type { Json } from './types'
Expand Down
18 changes: 1 addition & 17 deletions src/common/uuid.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,7 @@

import { useBase } from './data/basex'
import { sleep } from './exec/promise'
import {
suid,
suidBytesDate,
suidDate,
uname,
uuid,
uuid32bit,
uuidB32,
uuidBytes,
uuidDecode,
uuidDecodeB32,
uuidDecodeV4,
uuidEncode,
uuidEncodeB32,
uuidEncodeV4,
uuidv4,
} from './uuid'
import { suid, suidBytesDate, suidDate, uname, uuid, uuid32bit, uuidB32, uuidBytes, uuidDecode, uuidDecodeB32, uuidDecodeV4, uuidEncode, uuidEncodeB32, uuidEncodeV4, uuidv4 } from './uuid'

describe('uuid', () => {
// beforeAll(() => setUuidDefaultEncoding('base32'))
Expand Down

0 comments on commit 5158fa2

Please sign in to comment.