@checkdigit/typescript-config 3.1.0 → 3.2.0-PR.23-30a4

Sign up to get free protection for your applications and to get access to all the features.
package/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2021-2022 Check Digit, LLC
3
+ Copyright (c) 2021-2023 Check Digit, LLC
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -2,15 +2,16 @@
2
2
 
3
3
  [![MIT License](https://img.shields.io/github/license/checkdigit/typescript-config)](https://github.com/checkdigit/typescript-config/blob/master/LICENSE.txt)
4
4
 
5
- Copyright (c) 2022 [Check Digit, LLC](https://checkdigit.com)
5
+ Copyright (c) 2022-2023 [Check Digit, LLC](https://checkdigit.com)
6
6
 
7
7
  ### Introduction
8
8
 
9
9
  This module contains the standard Check Digit Typescript configuration.
10
10
 
11
- - requires Node 16 or above
11
+ - requires Node 18 or above
12
12
  - emits ES2022
13
- - uses the `module` type of `commonjs`.
13
+ - uses `esnext` for `target` and `module`
14
+ - uses the `moduleResoltion` of `bundler`
14
15
  - all compiler options set for maximum strictness
15
16
 
16
17
  #### A note about versioning
package/package.json CHANGED
@@ -1,41 +1 @@
1
- {
2
- "name": "@checkdigit/typescript-config",
3
- "version": "3.1.0",
4
- "description": "Check Digit standard Typescript configuration",
5
- "prettier": "@checkdigit/prettier-config",
6
- "engines": {
7
- "node": ">=16"
8
- },
9
- "peerDependencies": {
10
- "@types/node": ">=16",
11
- "typescript": ">=4.8.2"
12
- },
13
- "repository": {
14
- "type": "git",
15
- "url": "git+https://github.com/checkdigit/typescript-config.git"
16
- },
17
- "author": "Check Digit, LLC",
18
- "license": "MIT",
19
- "bugs": {
20
- "url": "https://github.com/checkdigit/typescript-config/issues"
21
- },
22
- "homepage": "https://github.com/checkdigit/typescript-config#readme",
23
- "scripts": {
24
- "preversion": "npm test",
25
- "postversion": "git push && git push --tags",
26
- "prettier": "prettier --list-different .",
27
- "prettier:fix": "prettier --write .",
28
- "test": "npm run ci:compile && npm run ci:test && npm run ci:style",
29
- "ci:compile": "tsc --noEmit",
30
- "ci:test": "tsc && node build/index.js | grep -q 'complete' && rimraf build",
31
- "ci:style": "npm run prettier"
32
- },
33
- "devDependencies": {
34
- "@checkdigit/prettier-config": "^3.0.0",
35
- "rimraf": "^3.0.2"
36
- },
37
- "files": [
38
- "tsconfig.json",
39
- "SECURITY.md"
40
- ]
41
- }
1
+ {"name":"@checkdigit/typescript-config","version":"3.2.0-PR.23-30a4","description":"Check Digit standard Typescript configuration","prettier":"@checkdigit/prettier-config","engines":{"node":">=18"},"type":"module","peerDependencies":{"@types/node":">=18","typescript":">=5.0.2 <5.1"},"repository":{"type":"git","url":"git+https://github.com/checkdigit/typescript-config.git"},"author":"Check Digit, LLC","license":"MIT","bugs":{"url":"https://github.com/checkdigit/typescript-config/issues"},"homepage":"https://github.com/checkdigit/typescript-config#readme","scripts":{"preversion":"npm test","postversion":"git push && git push --tags","prettier":"prettier --ignore-path .gitignore --list-different .","prettier:fix":"prettier --ignore-path .gitignore --write .","test":"npm run ci:compile && npm run ci:test && npm run ci:style","build-tsc":"rimraf build && tsc","build-es":"rimraf build-es && esbuild ./src/* --platform=node --bundle --format=esm --sourcemap=inline --outdir=build-es","build-swc":"rimraf build-swc && swc ./src -d ./build-swc","ci:test":"NODE_OPTIONS=\"--no-warnings --experimental-vm-modules\" jest --coverage=false","ci:compile":"npm run build-tsc && npm run build-es && npm run build-swc","ci:style":"npm run prettier"},"devDependencies":{"@checkdigit/prettier-config":"^3.3.0","@swc/cli":"^0.1.62","@swc/core":"^1.3.42","@types/jest":"^29.5.0","esbuild":"^0.17.14","get-port":"^6.1.2","got":"11.8.6","jest":"^29.5.0","rimraf":"^4.4.1","ts-jest":"^29.0.5"},"jest":{"extensionsToTreatAsEsm":[".ts"],"transform":{"^.+\\.ts$":["ts-jest",{"isolatedModules":true,"diagnostics":false,"useESM":true}]},"collectCoverageFrom":["<rootDir>/src/**","!<rootDir>/src/**/*.spec.ts","!<rootDir>/src/**/*.test.ts"],"testMatch":["<rootDir>/src/**/*.spec.ts"]},"files":["tsconfig.json","SECURITY.md","/src/"]}
@@ -0,0 +1,3 @@
1
+ // module-directory/index.ts
2
+
3
+ export default () => 'module-directory-index';
package/src/module.ts ADDED
@@ -0,0 +1,9 @@
1
+ // module.ts
2
+
3
+ export function test() {
4
+ return 'export function test';
5
+ }
6
+
7
+ export default function () {
8
+ return 'export default function';
9
+ }
package/tsconfig.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "module": "commonjs",
4
- "target": "es2022",
3
+ "target": "esnext",
4
+ "module": "esnext",
5
+ "moduleResolution": "bundler",
5
6
  "lib": ["esnext", "dom", "webworker"],
6
7
  "sourceMap": true,
8
+ "inlineSources": true,
7
9
  "outDir": "build",
8
10
  "declaration": true,
9
11
  "removeComments": false,
@@ -17,7 +19,7 @@
17
19
  "noUnusedLocals": true,
18
20
  "noUnusedParameters": true,
19
21
  "alwaysStrict": true,
20
- "importsNotUsedAsValues": "error",
22
+ "verbatimModuleSyntax": true,
21
23
  "noFallthroughCasesInSwitch": true,
22
24
  "forceConsistentCasingInFileNames": true,
23
25
  "emitDecoratorMetadata": true,