Skip to content

Commit c2a1b0b

Browse files
marshallswaindaffl
authored andcommitted
feat: Move development and publishing to Deno (#93)
1 parent 8e4328f commit c2a1b0b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1651
-22594
lines changed

.github/workflows/deno.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ jobs:
1313
uses: denolib/setup-deno@v2
1414
with:
1515
deno-version: v1.x
16-
17-
- name: Install Node.js 14
18-
uses: actions/setup-node@v1
19-
with:
20-
node-version: 14
21-
22-
- name: Install build tooling
23-
run: npm install
24-
16+
2517
- name: Run Tests
26-
run: npm run test:deno
18+
run: make test

.github/workflows/nodejs.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/update-dependencies.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@ typings/
6464
lib/
6565
dist/
6666
*.sqlite
67+
68+
/packages/
69+
/coverage/

.mocharc.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

.nycrc

Lines changed: 0 additions & 46 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"deno.enable": true,
3+
"deno.lint": true,
4+
"deno.config": "deno.json",
5+
"deno.codeLens.implementations": true,
6+
"deno.codeLens.references": true,
7+
"deno.codeLens.referencesAllFunctions": true,
8+
"deno.unstable": true
9+
}

deno.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"lint": {
3+
"files": {
4+
"include": ["main"],
5+
"exclude": []
6+
},
7+
"rules": {
8+
"tags": [],
9+
"include": [],
10+
"exclude": ["no-explicit-any", "require-await"]
11+
}
12+
},
13+
"fmt": {
14+
"files": {
15+
"include": ["main/"],
16+
"exclude": []
17+
},
18+
"options": {
19+
"useTabs": false,
20+
"lineWidth": 120,
21+
"indentWidth": 2,
22+
"singleQuote": true
23+
}
24+
}
25+
}

lerna.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,5 @@
1414
"conventionalCommits": true,
1515
"createRelease": "github"
1616
}
17-
},
18-
"ignoreChanges": [
19-
"**/changelog.md",
20-
"**/CHANGELOG.md",
21-
"**/package-lock.json",
22-
"**/yarn.lock",
23-
"**/test/**",
24-
"lerna.json"
25-
]
17+
}
2618
}

main/build.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import * as path from 'https://deno.land/[email protected]/path/mod.ts';
2+
import { build } from 'https://deno.land/x/[email protected]/mod.ts';
3+
import hooksPackage from './hooks/package.json.ts';
4+
5+
const __dirname = new URL('.', import.meta.url).pathname;
6+
7+
const buildModule = async (name: string) => {
8+
const inDir = path.join(__dirname, name);
9+
const outDir = path.join(__dirname, '..', `packages/${name}`);
10+
const filesToCopy = ['LICENSE', 'README.md'];
11+
12+
await build({
13+
entryPoints: [path.join(inDir, 'src/index.ts')],
14+
outDir,
15+
test: false,
16+
compilerOptions: {
17+
importHelpers: false,
18+
},
19+
package: hooksPackage,
20+
});
21+
22+
filesToCopy.forEach((filename) => Deno.copyFileSync(path.join(inDir, filename), path.join(outDir, filename)));
23+
};
24+
25+
await buildModule('hooks');

packages/hooks/LICENSE renamed to main/hooks/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2020 Feathers
3+
Copyright (c) 2021 Feathers
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
File renamed without changes.

main/hooks/package.json.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
export default {
2+
name: '@feathersjs/hooks',
3+
version: '0.0.0',
4+
description: 'Async middleware for JavaScript and TypeScript',
5+
homepage: 'https://feathersjs.com',
6+
keywords: [
7+
'feathers',
8+
'hooks',
9+
'hook',
10+
'async',
11+
'middleware',
12+
],
13+
license: 'MIT',
14+
repository: {
15+
type: 'git',
16+
url: 'git://github.com/feathersjs/hooks.git',
17+
},
18+
author: {
19+
name: 'Feathers contributor',
20+
21+
url: 'https://feathersjs.com',
22+
},
23+
contributors: [],
24+
bugs: {
25+
url: 'https://github.com/feathersjs/hooks/issues',
26+
},
27+
engines: {
28+
node: '>= 14',
29+
},
30+
publishConfig: {
31+
access: 'public',
32+
},
33+
};

0 commit comments

Comments
 (0)