Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Move development and publishing to Deno #93

Merged
merged 17 commits into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ jobs:
uses: denolib/setup-deno@v2
with:
deno-version: v1.x

- name: Install Node.js 14
uses: actions/setup-node@v1
with:
node-version: 14

- name: Install build tooling
run: npm install


- name: Run Tests
run: npm run test:deno
run: make test
25 changes: 0 additions & 25 deletions .github/workflows/nodejs.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/update-dependencies.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ typings/
lib/
dist/
*.sqlite

/packages/
/coverage/
5 changes: 0 additions & 5 deletions .mocharc.json

This file was deleted.

46 changes: 0 additions & 46 deletions .nycrc

This file was deleted.

9 changes: 9 additions & 0 deletions .vscode/settings.json
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
}
25 changes: 25 additions & 0 deletions deno.json
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
}
}
}
10 changes: 1 addition & 9 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,5 @@
"conventionalCommits": true,
"createRelease": "github"
}
},
"ignoreChanges": [
"**/changelog.md",
"**/CHANGELOG.md",
"**/package-lock.json",
"**/yarn.lock",
"**/test/**",
"lerna.json"
]
}
}
25 changes: 25 additions & 0 deletions main/build.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import * as path from 'https://deno.land/[email protected]/path/mod.ts';
import { build } from 'https://deno.land/x/[email protected]/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');
2 changes: 1 addition & 1 deletion packages/hooks/LICENSE → main/hooks/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 Feathers
Copyright (c) 2021 Feathers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
File renamed without changes.
33 changes: 33 additions & 0 deletions main/hooks/package.json.ts
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: '[email protected]',
url: 'https://feathersjs.com',
},
contributors: [],
bugs: {
url: 'https://github.com/feathersjs/hooks/issues',
},
engines: {
node: '>= 14',
},
publishConfig: {
access: 'public',
},
};
Loading