From aa95fa2234121a7fc9ce7bbc6a9497bf824bb663 Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Sun, 29 Jan 2023 20:16:17 -0500 Subject: [PATCH] Improve selene type definitions --- CHANGELOG.md | 11 +++++++++++ lune.yml | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c837384..ed561cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed + +- Improved type definitions file for Selene, now including constants like `process.env` + tags such as `readonly` and `mustuse` wherever applicable + +### Fixed + +- Fixed type definitions file for Selene not including all API members and parameters +- Fixed `process.exit` exiting at the first yield instead of exiting instantly as it should + ## `0.2.0` - January 28th, 2023 ### Added diff --git a/lune.yml b/lune.yml index a3ad013..ad6b72f 100644 --- a/lune.yml +++ b/lune.yml @@ -3,14 +3,17 @@ globals: # Console console.resetColor: + args: [] console.setColor: args: - type: string console.resetStyle: + args: [] console.setStyle: args: - type: string console.format: + must_use: true args: - type: "..." console.log: @@ -27,9 +30,11 @@ globals: - type: "..." # FS (filesystem) fs.readFile: + must_use: true args: - type: string fs.readDir: + must_use: true args: - type: string fs.writeFile: @@ -46,24 +51,34 @@ globals: args: - type: string fs.isFile: + must_use: true args: - type: string fs.isDir: + must_use: true args: - type: string # Net (networking) net.jsonEncode: + must_use: true args: - type: any - required: false type: boolean net.jsonDecode: + must_use: true args: - type: string net.request: args: - type: any # Processs + process.args: + property: read-only + process.cwd: + property: read-only + process.env: + property: new-fields process.exit: args: - required: false @@ -73,8 +88,12 @@ globals: - type: string - required: false type: table + - required: false + type: table # Task task.cancel: + args: + - type: thread task.defer: args: - type: thread | function