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

Append .js to all imports #74

Merged
merged 2 commits into from
Apr 30, 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
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "limiter",
"description": "A generic rate limiter for the web and node.js. Useful for API clients, web crawling, or other tasks that need to be throttled",
"version": "2.0.0",
"version": "2.0.1",
"author": "John Hurliman <jhurliman@jhurliman.org>",
"type": "module",
"main": "./dist/cjs/index.js",
Expand All @@ -22,7 +22,7 @@
],
"scripts": {
"lint": "eslint --fix src",
"prepack": "yarn tsc -p tsconfig.json && tsc -p tsconfig.cjs.json",
"prepack": "yarn ttsc -p tsconfig.json && ttsc -p tsconfig.cjs.json",
"test": "jest src"
},
"dependencies": {
Expand All @@ -36,11 +36,13 @@
"@types/jest": "^26.0.23",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"@zoltu/typescript-transformer-append-js-extension": "^1.0.1",
"babel-jest": "^26.6.3",
"eslint": "^7.25.0",
"eslint-plugin-prettier": "^3.4.0",
"jest": "^26.6.3",
"prettier": "^2.2.1",
"ttypescript": "^1.5.12",
"typescript": "^4.2.4"
},
"keywords": [
Expand Down
4 changes: 0 additions & 4 deletions src/RateLimiter.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// var vows = require('vows');
// var assert = require('assert');
// var RateLimiter = require('../lib/rateLimiter');

import { RateLimiter } from "./RateLimiter";
import { Interval } from "./TokenBucket";

Expand Down
4 changes: 2 additions & 2 deletions src/TokenBucket.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const TIMING_EPSILON = 10;

import { TokenBucket } from "./TokenBucket";
import { wait } from "./clock";

const TIMING_EPSILON = 10;

describe("TokenBucket", () => {
describe("capacity 10, 1 per 100ms", () => {
it("is initialized empty", () => {
Expand Down
6 changes: 6 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
{
"include": ["./src/**/*.ts"],
"compilerOptions": {
"plugins": [
{
"transform": "@zoltu/typescript-transformer-append-js-extension/output/index.js",
"after": true
}
],
"outDir": "./dist/esm",
"rootDir": "./src",
"target": "esnext",
Expand Down
Loading