From 0effcd88f13e1bf3f0989303839febe5bd108c74 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Wed, 21 Aug 2024 02:41:12 +0700 Subject: [PATCH] Meta tweaks --- .gitattributes | 3 +- index.js | 2 +- license | 2 +- package.json | 104 ++++++++++++++++++++++++++----------------------- readme.md | 4 +- 5 files changed, 60 insertions(+), 55 deletions(-) diff --git a/.gitattributes b/.gitattributes index 391f0a4..6313b56 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1 @@ -* text=auto -*.js text eol=lf +* text=auto eol=lf diff --git a/index.js b/index.js index 9390946..a72696e 100644 --- a/index.js +++ b/index.js @@ -67,7 +67,7 @@ function supportsHyperlink(stream) { } // Windows Terminal - if ('WT_SESSION' in env) { + if ('WT_SESSION' in process.env) { return true; } diff --git a/license b/license index 32a380a..804ee81 100644 --- a/license +++ b/license @@ -1,6 +1,6 @@ MIT License -Copyright (c) James Talmage (github.com/jamestalmage) +Copyright (c) James Talmage (https://github.com/jamestalmage) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/package.json b/package.json index 1108eac..fe5bfa4 100644 --- a/package.json +++ b/package.json @@ -1,51 +1,57 @@ { - "name": "supports-hyperlinks", - "version": "3.0.0", - "description": "Detect if your terminal emulator supports hyperlinks", - "license": "MIT", - "repository": "jamestalmage/supports-hyperlinks", - "author": { - "name": "James Talmage", - "email": "james@talmage.io", - "url": "github.com/jamestalmage" - }, - "engines": { - "node": ">=14.18" - }, - "scripts": { - "prepublishOnly": "npm run create-types", - "test": "xo && nyc ava && tsc", - "create-types": "tsc --project declaration.tsconfig.json" - }, - "files": [ - "index.js", - "index.d.ts", - "browser.js" - ], - "browser": "browser.js", - "keywords": [ - "link", - "terminal", - "hyperlink", - "cli" - ], - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "devDependencies": { - "@tsconfig/node14": "^1.0.3", - "@types/supports-color": "^8.1.1", - "ava": "^2.2.0", - "codecov": "^3.5.0", - "nyc": "^14.1.1", - "typescript": "^4.9.5", - "xo": "^0.24.0" - }, - "nyc": { - "reporter": [ - "lcov", - "text" - ] - } + "name": "supports-hyperlinks", + "version": "3.0.0", + "description": "Detect if your terminal emulator supports hyperlinks", + "license": "MIT", + "repository": "jamestalmage/supports-hyperlinks", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "James Talmage", + "email": "james@talmage.io", + "url": "github.com/jamestalmage" + }, + "exports": { + "types": "./index.d.ts", + "default": "./index.js" + }, + "sideEffects": false, + "engines": { + "node": ">=14.18" + }, + "scripts": { + "prepublishOnly": "npm run create-types", + "test": "xo && nyc ava && tsc", + "create-types": "tsc --project declaration.tsconfig.json" + }, + "files": [ + "index.js", + "index.d.ts", + "browser.js" + ], + "browser": "browser.js", + "keywords": [ + "link", + "terminal", + "hyperlink", + "cli" + ], + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "devDependencies": { + "@tsconfig/node14": "^1.0.3", + "@types/supports-color": "^8.1.1", + "ava": "^2.2.0", + "codecov": "^3.5.0", + "nyc": "^14.1.1", + "typescript": "^4.9.5", + "xo": "^0.24.0" + }, + "nyc": { + "reporter": [ + "lcov", + "text" + ] + } } diff --git a/readme.md b/readme.md index ec833ac..9febc38 100644 --- a/readme.md +++ b/readme.md @@ -10,8 +10,8 @@ As this is a new development, we anticipate the list of supported Terminals to g ## Install -``` -$ npm install supports-hyperlinks +```sh +npm install supports-hyperlinks ```