diff --git a/dist/woodland.cjs b/dist/woodland.cjs index b9c7295..cc65e59 100644 --- a/dist/woodland.cjs +++ b/dist/woodland.cjs @@ -3,7 +3,7 @@ * * @copyright 2023 Jason Mulligan * @license BSD-3-Clause - * @version 18.0.3 + * @version 18.0.4 */ 'use strict'; @@ -14,7 +14,6 @@ var node_fs = require('node:fs'); var tinyEtag = require('tiny-etag'); var precise = require('precise'); var tinyLru = require('tiny-lru'); -var deepFreeze = require('deep-freeze'); var node_url = require('node:url'); var tinyCoerce = require('tiny-coerce'); var mimeDb = require('mime-db'); @@ -22,7 +21,7 @@ var mimeDb = require('mime-db'); var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; const ALL = "*"; const DELIMITER = "|"; -const LEVELS = deepFreeze({ +const LEVELS = Object.freeze({ emerg: 0, alert: 1, crit: 2, @@ -35,11 +34,11 @@ const LEVELS = deepFreeze({ const EN_US = "en-US"; const SHORT = "short"; -const MONTHS = deepFreeze(Array.from(Array(12).values()).map((i, idx) => { +const MONTHS = Object.freeze(Array.from(Array(12).values()).map((i, idx) => { const d = new Date(); d.setMonth(idx); - return d.toLocaleString(EN_US, {month: SHORT}); + return Object.freeze(d.toLocaleString(EN_US, {month: SHORT})); })); const UTF8 = "utf8"; const UTF_8 = "utf-8"; diff --git a/dist/woodland.js b/dist/woodland.js index 7374481..74f5cc4 100644 --- a/dist/woodland.js +++ b/dist/woodland.js @@ -3,11 +3,11 @@ * * @copyright 2023 Jason Mulligan * @license BSD-3-Clause - * @version 18.0.3 + * @version 18.0.4 */ -import {STATUS_CODES,METHODS}from'node:http';import {join,extname,resolve}from'node:path';import {EventEmitter}from'node:events';import {readFileSync,createReadStream,stat,readdir}from'node:fs';import {etag}from'tiny-etag';import {precise}from'precise';import {lru}from'tiny-lru';import deepFreeze from'deep-freeze';import {fileURLToPath,URL}from'node:url';import {coerce}from'tiny-coerce';import mimeDb from'mime-db';const ALL = "*"; +import {STATUS_CODES,METHODS}from'node:http';import {join,extname,resolve}from'node:path';import {EventEmitter}from'node:events';import {readFileSync,createReadStream,stat,readdir}from'node:fs';import {etag}from'tiny-etag';import {precise}from'precise';import {lru}from'tiny-lru';import {fileURLToPath,URL}from'node:url';import {coerce}from'tiny-coerce';import mimeDb from'mime-db';const ALL = "*"; const DELIMITER = "|"; -const LEVELS = deepFreeze({ +const LEVELS = Object.freeze({ emerg: 0, alert: 1, crit: 2, @@ -20,11 +20,11 @@ const LEVELS = deepFreeze({ const EN_US = "en-US"; const SHORT = "short"; -const MONTHS = deepFreeze(Array.from(Array(12).values()).map((i, idx) => { +const MONTHS = Object.freeze(Array.from(Array(12).values()).map((i, idx) => { const d = new Date(); d.setMonth(idx); - return d.toLocaleString(EN_US, {month: SHORT}); + return Object.freeze(d.toLocaleString(EN_US, {month: SHORT})); })); const UTF8 = "utf8"; const UTF_8 = "utf-8"; diff --git a/package-lock.json b/package-lock.json index 49a416b..7262ca6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,14 @@ { "name": "woodland", - "version": "18.0.3", + "version": "18.0.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "woodland", - "version": "18.0.3", + "version": "18.0.4", "license": "BSD-3-Clause", "dependencies": { - "deep-freeze": "^0.0.1", "mime-db": "^1.52.0", "precise": "^4.0.2", "tiny-coerce": "^3.0.0", @@ -1592,11 +1591,6 @@ "node": ">=0.10.0" } }, - "node_modules/deep-freeze": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/deep-freeze/-/deep-freeze-0.0.1.tgz", - "integrity": "sha512-Z+z8HiAvsGwmjqlphnHW5oz6yWlOwu6EQfFTjmeTWlDeda3FS2yv3jhq35TX/ewmsnqB+RX2IdsIOyjJCQN5tg==" - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", diff --git a/package.json b/package.json index 80f15b8..1762708 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "woodland", - "version": "18.0.3", + "version": "18.0.4", "description": "Lightweight HTTP framework with automatic headers", "type": "module", "types": "types/woodland.d.ts", @@ -56,7 +56,6 @@ "woodland": "cli.js" }, "dependencies": { - "deep-freeze": "^0.0.1", "mime-db": "^1.52.0", "precise": "^4.0.2", "tiny-coerce": "^3.0.0", diff --git a/src/constants.js b/src/constants.js index c5e2e68..7272551 100644 --- a/src/constants.js +++ b/src/constants.js @@ -1,8 +1,6 @@ -import deepFreeze from "deep-freeze"; - export const ALL = "*"; export const DELIMITER = "|"; -export const LEVELS = deepFreeze({ +export const LEVELS = Object.freeze({ emerg: 0, alert: 1, crit: 2, @@ -15,11 +13,11 @@ export const LEVELS = deepFreeze({ export const EN_US = "en-US"; export const SHORT = "short"; -export const MONTHS = deepFreeze(Array.from(Array(12).values()).map((i, idx) => { +export const MONTHS = Object.freeze(Array.from(Array(12).values()).map((i, idx) => { const d = new Date(); d.setMonth(idx); - return d.toLocaleString(EN_US, {month: SHORT}); + return Object.freeze(d.toLocaleString(EN_US, {month: SHORT})); })); export const UTF8 = "utf8"; export const UTF_8 = "utf-8";