-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Move development and publishing to Deno (#93)
* `collect` hooks util. Not hitting error hooks * Fix error hook handling and update tests * docs: complete refactor * feat: Port package and tests to Deno first * feat: cleaner regular hooks This pulls over the code for Regular hooks from this PR: feathersjs/feathers#2483 * Add makefile and build infrastructure * Update build file and dependencies * Remove NodeJS workflow * test: collect hooks * fix: imports * feat: run coverage reports in CI This also adds the `cov_profile` folder to the .gitignore. Not sure if we need it checked in. * chore: setup deno lint * chore: configure deno lint and deno fmt in makefile * chore: format and lint as part of test script * chore: simplify test script * Some additional tweaks Co-authored-by: marshall_thompson2 <marshall_thompson2@apple.com> Co-authored-by: daffl <daff@neyeon.com>
- Loading branch information
1 parent
253abe1
commit 9e47da2
Showing
50 changed files
with
1,651 additions
and
22,594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,3 +64,6 @@ typings/ | |
lib/ | ||
dist/ | ||
*.sqlite | ||
|
||
/packages/ | ||
/coverage/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"deno.enable": true, | ||
"deno.lint": true, | ||
"deno.config": "deno.json", | ||
"deno.codeLens.implementations": true, | ||
"deno.codeLens.references": true, | ||
"deno.codeLens.referencesAllFunctions": true, | ||
"deno.unstable": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"lint": { | ||
"files": { | ||
"include": ["main"], | ||
"exclude": [] | ||
}, | ||
"rules": { | ||
"tags": [], | ||
"include": [], | ||
"exclude": ["no-explicit-any", "require-await"] | ||
} | ||
}, | ||
"fmt": { | ||
"files": { | ||
"include": ["main/"], | ||
"exclude": [] | ||
}, | ||
"options": { | ||
"useTabs": false, | ||
"lineWidth": 120, | ||
"indentWidth": 2, | ||
"singleQuote": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import * as path from 'https://deno.land/std@0.115.1/path/mod.ts'; | ||
import { build } from 'https://deno.land/x/dnt@0.7.2/mod.ts'; | ||
import hooksPackage from './hooks/package.json.ts'; | ||
|
||
const __dirname = new URL('.', import.meta.url).pathname; | ||
|
||
const buildModule = async (name: string) => { | ||
const inDir = path.join(__dirname, name); | ||
const outDir = path.join(__dirname, '..', `packages/${name}`); | ||
const filesToCopy = ['LICENSE', 'README.md']; | ||
|
||
await build({ | ||
entryPoints: [path.join(inDir, 'src/index.ts')], | ||
outDir, | ||
test: false, | ||
compilerOptions: { | ||
importHelpers: false, | ||
}, | ||
package: hooksPackage, | ||
}); | ||
|
||
filesToCopy.forEach((filename) => Deno.copyFileSync(path.join(inDir, filename), path.join(outDir, filename))); | ||
}; | ||
|
||
await buildModule('hooks'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
export default { | ||
name: '@feathersjs/hooks', | ||
version: '0.0.0', | ||
description: 'Async middleware for JavaScript and TypeScript', | ||
homepage: 'https://feathersjs.com', | ||
keywords: [ | ||
'feathers', | ||
'hooks', | ||
'hook', | ||
'async', | ||
'middleware', | ||
], | ||
license: 'MIT', | ||
repository: { | ||
type: 'git', | ||
url: 'git://github.com/feathersjs/hooks.git', | ||
}, | ||
author: { | ||
name: 'Feathers contributor', | ||
email: 'hello@feathersjs.com', | ||
url: 'https://feathersjs.com', | ||
}, | ||
contributors: [], | ||
bugs: { | ||
url: 'https://github.com/feathersjs/hooks/issues', | ||
}, | ||
engines: { | ||
node: '>= 14', | ||
}, | ||
publishConfig: { | ||
access: 'public', | ||
}, | ||
}; |
Oops, something went wrong.