pkgbld 1.22.1 → 1.23.0

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/index.js +8 -6
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -163,6 +163,7 @@ const packageJsonFieldsOrder = new Set([
163
163
  'imports',
164
164
  'types',
165
165
  'typings',
166
+ 'typesVersions',
166
167
  'files',
167
168
  'packageManager',
168
169
  'sideEffects',
@@ -721,12 +722,13 @@ function processPackage(pkg, config, plugins) {
721
722
  if (typeof pkg.exports[id] !== 'object') {
722
723
  pkg.exports[id] = {};
723
724
  }
725
+ pkg.exports[id].types = `./${config.dir}/${patternToName('[name].d.ts', basename)}`;
726
+ if (allowEsm) {
727
+ pkg.exports[id].import = `./${config.dir}/${patternToName(config.esPattern, basename)}`;
728
+ }
724
729
  if (allowCjs) {
725
730
  pkg.exports[id].require = `./${config.dir}/${patternToName(config.commonjsPattern, basename)}`;
726
731
  }
727
- if (allowEsm) {
728
- pkg.exports[id].default = `./${config.dir}/${patternToName(config.esPattern, basename)}`;
729
- }
730
732
  if (basename !== 'index') {
731
733
  if (!pkg.files.includes(basename)) {
732
734
  pkg.files.push(basename);
@@ -750,13 +752,13 @@ async function writeJson(path, json) {
750
752
  await fs.writeFile(path, toFormattedJson(json));
751
753
  }
752
754
 
753
- var version = "1.22.1";
755
+ var version = "1.23.0";
754
756
  var name = "pkgbld";
755
757
  var license = "MIT";
756
758
  var author = "Konstantin Shutkin";
757
759
  var bin = "./dist/index.js";
758
760
  var main = "./dist/index.js";
759
- var typings = "./dist/index.d.ts";
761
+ var types = "./dist/index.d.ts";
760
762
  var files = [
761
763
  "dist"
762
764
  ];
@@ -817,7 +819,7 @@ var pkgbldPkg = {
817
819
  author: author,
818
820
  bin: bin,
819
821
  main: main,
820
- typings: typings,
822
+ types: types,
821
823
  files: files,
822
824
  engines: engines,
823
825
  repository: repository,
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
- "version": "1.22.1",
2
+ "version": "1.23.0",
3
3
  "name": "pkgbld",
4
4
  "license": "MIT",
5
5
  "author": "Konstantin Shutkin",
6
6
  "bin": "./dist/index.js",
7
7
  "main": "./dist/index.js",
8
- "typings": "./dist/index.d.ts",
8
+ "types": "./dist/index.d.ts",
9
9
  "files": [
10
10
  "dist"
11
11
  ],
@@ -50,7 +50,7 @@
50
50
  "devDependencies": {
51
51
  "@types/lodash": "^4.14.199",
52
52
  "@total-typescript/ts-reset": "^0.5.1",
53
- "options": "0.0.1"
53
+ "options": "0.1.0"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "typescript": "^5.2.2"