Skip to content

Commit

Permalink
refactor!: drop support for node <18
Browse files Browse the repository at this point in the history
  • Loading branch information
samrith-s committed Dec 6, 2023
1 parent 538fd0a commit 7dd1f03
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 369 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A simple task runner which will run all tasks till completion, while maintaining

> Read the full documentation at the [website][website]
# 👋🏼 Introduction
# Introduction

Concurrent Tasks mimics a queue by using JavaScript's inbuilt array data type. Each task is a function which signals completion back to the runner.

Expand Down
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"repository": "https://github.com/samrith-s/concurrent-tasks.git",
"main": "lib/cjs/index.js",
"module": "lib/es/index.js",
"types": "lib/dts/index.d.ts",
"types": "lib/dts/src/index.d.ts",
"files": [
"lib",
"LICENSE",
Expand All @@ -18,13 +18,14 @@
"access": "public",
"registry": "https://registry.npmjs.org"
},
"engines": {
"node": ">=18.0.0"
},
"scripts": {
"bootstrap": "yarn install && yarn --cwd docs install",
"prepublishOnly": "yarn build:prod",
"prebuild": "yarn clean",
"build": "rollup -c rollup.config.js --bundleConfigAsCjs",
"build:prod": "NODE_ENV=production yarn build && size-limit",
"build:dev": "NODE_ENV=development yarn build && size-limit",
"build": "NODE_ENV=production rollup -c rollup.config.js --bundleConfigAsCjs && size-limit",
"clean": "rm -rf lib/",
"test": "jest",
"lint": "eslint {src,tests,docs}/**/* --cache",
Expand All @@ -46,7 +47,6 @@
"@typescript-eslint/eslint-plugin": "^5.48.0",
"@typescript-eslint/parser": "^5.48.0",
"builtin-modules": "^3.3.0",
"chalk": "^5.2.0",
"eslint": "^8.31.0",
"eslint-config-prettier": "^8.6.0",
"eslint-import-resolver-typescript": "^3.5.2",
Expand All @@ -61,9 +61,7 @@
"rollup-plugin-typescript2": "^0.36.0",
"size-limit": "^8.1.0",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"typescript": "^4.9.4",
"vitest": "^0.27.0"
"typescript": "^5.3.3"
},
"lint-staged": {
"*.{ts,tsx,json}": "eslint --cache --fix"
Expand Down
30 changes: 14 additions & 16 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-undef */
import * as path from "path";

import commonjs from "@rollup/plugin-commonjs";
import json from "@rollup/plugin-json";
Expand All @@ -10,28 +9,27 @@ import terser from "@rollup/plugin-terser";
import builtins from "builtin-modules";
import typescript from "rollup-plugin-typescript2";

const isDev = process.env.NODE_ENV === "development";
import * as pkg from "./package.json";

const pkg = require(path.resolve("package.json"));
const isDev = process.env.NODE_ENV === "development";

const input = pkg.entries || "src/index.ts";

const plugins = [
resolve(),
commonjs(),
json(),
typescript({
typescript: require("typescript"),
clean: true,
useTsconfigDeclarationDir: true,
}),
strip(),
];

export default {
input,
output: [output("cjs", "main"), output("es", "module"), output("umd", "umd")],
plugins,
plugins: [
resolve(),
commonjs(),
json(),
typescript({
typescript: require("typescript"),
clean: true,
exclude: ["**/*.test.ts"],
useTsconfigDeclarationDir: true,
}),
strip(),
],
external: [...builtins],
};

Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"importHelpers": false,
"declaration": true,
"declarationDir": "lib/dts",
"sourceMap": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
Expand Down
Loading

0 comments on commit 7dd1f03

Please sign in to comment.