@temir.ra/create-ts-lib 0.2.6 → 0.2.7

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Version 0
2
2
 
3
+ ## 0.2.7
4
+
5
+ 1. Changed `filter` property in `cdnRewritePlugin` in `scripts/build-lib-bundle.ts` to take import identifiers into account that do not have file extensions.
6
+ 2. Changed `buildinfo.txt` generation in `scripts/buildinfo.ts` to read the version from `package.json` instead of relying on the `npm_package_version` environment variable. Enables correct version capture in monorepo setups.
7
+
3
8
  ## 0.2.6
4
9
 
5
10
  1. Minor ToC and typo fixes in both README.md files (root and template).
package/buildinfo.txt CHANGED
@@ -1 +1 @@
1
- 0.2.6+2fc6757
1
+ 0.2.7+c91c3c0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temir.ra/create-ts-lib",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Typescript library template",
5
5
  "author": "temir.ra",
6
6
  "license": "MIT",
@@ -99,7 +99,7 @@ const cdnRewritePlugin = {
99
99
  console.log(`[cdn-rewrite] '${importSpecifier}' → '${url}'`);
100
100
  }
101
101
 
102
- build.onResolve({ filter: /.*/ }, (args: any) => {
102
+ build.onResolve({ filter: /\*/ }, (args: any) => {
103
103
  const url = resolved.get(args.path);
104
104
  if (url) return { path: url, external: true };
105
105
  });
@@ -1,11 +1,11 @@
1
1
  import { execSync } from 'child_process';
2
- import { writeFileSync } from 'fs';
2
+ import { readFileSync, writeFileSync } from 'fs';
3
3
 
4
4
 
5
5
  const BUILD_INFO_FILE = 'buildinfo.txt';
6
6
  const GIT_COMMAND = 'git rev-parse --short HEAD';
7
7
 
8
- const version = process.env.npm_package_version ?? '0.0.0';
8
+ const { version } = JSON.parse(readFileSync('package.json', 'utf-8'));
9
9
 
10
10
  let gitHash = '';
11
11
  try {