@reliverse/typerso 2.2.9 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/mod.js +3 -3
  2. package/package.json +10 -10
package/dist/mod.js CHANGED
@@ -18,7 +18,7 @@ export {
18
18
  export const readPackageJSONSafe = async (path) => {
19
19
  try {
20
20
  return await readPackageJSON(path);
21
- } catch (_error) {
21
+ } catch {
22
22
  return null;
23
23
  }
24
24
  };
@@ -31,7 +31,7 @@ export const getWorkspacePatterns = (packageJson) => {
31
31
  };
32
32
  export function extractPackageName(packageName) {
33
33
  const parts = packageName.split("/");
34
- return parts[parts.length - 1] || packageName;
34
+ return parts.at(-1) || packageName;
35
35
  }
36
36
  export function parseBinArgument(binArg) {
37
37
  const binMap = {};
@@ -130,7 +130,7 @@ export async function preparePackageJsonForPublishing(packagePath, options = {})
130
130
  pkg.exports = transformExportsForBuild(pkg.exports);
131
131
  }
132
132
  addBinFieldToPackageJson(pkg, options.kind, options.binDefinitions);
133
- if (!pkg.files || !Array.isArray(pkg.files) || pkg.files.length === 0) {
133
+ if (!(pkg.files && Array.isArray(pkg.files)) || pkg.files.length === 0) {
134
134
  pkg.files = ["dist", "package.json"];
135
135
  }
136
136
  const isPublishable = pkg.private !== true;
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@reliverse/typerso",
3
- "version": "2.2.9",
3
+ "version": "2.3.2",
4
4
  "private": false,
5
- "type": "module",
6
5
  "description": "@reliverse/typerso is a collection of utils to work with package.json and tsconfig.json files.",
6
+ "license": "MIT",
7
+ "files": [
8
+ "dist",
9
+ "package.json"
10
+ ],
11
+ "type": "module",
7
12
  "exports": {
8
13
  ".": {
9
14
  "types": "./dist/mod.d.ts",
10
15
  "default": "./dist/mod.js"
11
16
  }
12
17
  },
13
- "dependencies": {
14
- "pkg-types": "^2.3.0"
15
- },
16
18
  "publishConfig": {
17
19
  "access": "public"
18
20
  },
19
- "files": [
20
- "dist",
21
- "package.json"
22
- ],
23
- "license": "MIT"
21
+ "dependencies": {
22
+ "pkg-types": "^2.3.0"
23
+ }
24
24
  }