Skip to content

Commit

Permalink
Removing the dependency on abandoned module; pretty easy to replace i…
Browse files Browse the repository at this point in the history
…nline
  • Loading branch information
avoidwork committed Oct 7, 2023
1 parent 74fb831 commit 8731847
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 25 deletions.
9 changes: 4 additions & 5 deletions dist/woodland.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* @copyright 2023 Jason Mulligan <jason.mulligan@avoidwork.com>
* @license BSD-3-Clause
* @version 18.0.3
* @version 18.0.4
*/
'use strict';

Expand All @@ -14,15 +14,14 @@ 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');

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,
Expand All @@ -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";
Expand Down
10 changes: 5 additions & 5 deletions dist/woodland.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
*
* @copyright 2023 Jason Mulligan <jason.mulligan@avoidwork.com>
* @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,
Expand All @@ -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";
Expand Down
10 changes: 2 additions & 8 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand Down
8 changes: 3 additions & 5 deletions src/constants.js
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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";
Expand Down

0 comments on commit 8731847

Please sign in to comment.