Skip to content

Commit

Permalink
chore(dependencies): Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
vinsonchuong committed Aug 17, 2024
1 parent 6bbb56e commit 4289004
Show file tree
Hide file tree
Showing 6 changed files with 2,860 additions and 2,579 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: current
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import serveFromFileSystem from './serve-from-file-system.js'
import serveFromStrings from './serve-from-strings.js'

export default function (rootDirectoryOrFiles, baseUrl = '/') {
export default function serveStatic(rootDirectoryOrFiles, baseUrl = '/') {
return typeof rootDirectoryOrFiles === 'string'
? serveFromFileSystem(rootDirectoryOrFiles, baseUrl)
: serveFromStrings(rootDirectoryOrFiles, baseUrl)
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@
"type": "module",
"main": "index.js",
"dependencies": {
"@tinyhttp/etag": "^2.1.0",
"@tinyhttp/etag": "^2.1.2",
"content-type": "^1.0.5",
"fresh": "^0.5.2",
"mime": "^3.0.0",
"mime": "^4.0.4",
"strip-indent": "^4.0.0",
"url-parse": "^1.5.10"
},
"peerDependencies": {
"passing-notes": "^6.2.0"
},
"devDependencies": {
"ava": "^5.3.1",
"ava": "^6.1.3",
"ava-patterns": "^3.2.1",
"passing-notes": "^6.6.1",
"puppet-strings": "^5.0.1",
"puppet-strings-chrome": "^2.0.3",
"semantic-release": "^21.0.7",
"xo": "^0.55.1"
"passing-notes": "^6.8.5",
"puppet-strings": "^5.0.2",
"puppet-strings-chrome": "^2.0.4",
"semantic-release": "^24.1.0",
"xo": "^0.59.3"
},
"ava": {
"verbose": true,
Expand Down
2 changes: 1 addition & 1 deletion serve-from-file-system.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import contentType from 'content-type'
import mime from 'mime'
import fresh from 'fresh'

export default function (rootDirectory, baseUrl = '/') {
export default function serveFromFileSystem(rootDirectory, baseUrl = '/') {
rootDirectory = path.resolve(rootDirectory)

return (next) => async (request) => {
Expand Down
2 changes: 1 addition & 1 deletion serve-from-strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import contentType from 'content-type'
import mime from 'mime'
import {eTag} from '@tinyhttp/etag'

export default function (files, baseUrl = '/') {
export default function serveFromStrings(files, baseUrl = '/') {
const responses = {}
for (const filePath of Object.keys(files)) {
const body = stripIndent(files[filePath]).trim()
Expand Down
Loading

0 comments on commit 4289004

Please sign in to comment.