sku 12.4.7 → 12.4.9

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,17 @@
1
1
  # sku
2
2
 
3
+ ## 12.4.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Report `braid-design-system` version via telemetry ([#913](https://github.com/seek-oss/sku/pull/913))
8
+
9
+ ## 12.4.8
10
+
11
+ ### Patch Changes
12
+
13
+ - Fix running lint-staged when `package.json` files are staged ([#918](https://github.com/seek-oss/sku/pull/918))
14
+
3
15
  ## 12.4.7
4
16
 
5
17
  ### Patch Changes
@@ -11,9 +11,10 @@ const config = {
11
11
 
12
12
  // Yarn lock integrity check
13
13
  if (isYarn) {
14
- config['+(package.json|yarn.lock)'] = [
15
- getCommand('yarn', 'install', ['--check-files']),
16
- ];
14
+ config['+(package.json|yarn.lock)'] =
15
+ // The function form allows running the command without file arguments
16
+ // https://github.com/lint-staged/lint-staged#example-run-tsc-on-changes-to-typescript-files-but-do-not-pass-any-filename-arguments
17
+ () => getCommand('yarn', 'install', ['--check-files']);
17
18
  }
18
19
 
19
20
  module.exports = config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sku",
3
- "version": "12.4.7",
3
+ "version": "12.4.9",
4
4
  "description": "Front-end development toolkit, powered by Webpack, Babel, CSS Modules, Less and Jest",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  const os = require('node:os');
2
2
 
3
- const { getPathFromCwd } = require('../lib/cwd');
3
+ const { requireFromCwd } = require('../lib/cwd');
4
4
  const isCI = require('../lib/isCI');
5
5
  const provider = require('./provider');
6
6
  const skuVersion = require('../package.json').version;
@@ -8,17 +8,26 @@ const skuVersion = require('../package.json').version;
8
8
  const { languages } = require('../context');
9
9
 
10
10
  let projectName = 'unknown';
11
+ let braidVersion = 'unknown';
11
12
  try {
12
- const packageJson = require(getPathFromCwd('package.json'));
13
+ const packageJson = requireFromCwd('package.json');
13
14
 
14
15
  if (packageJson.name) {
15
16
  projectName = packageJson.name;
16
17
  }
17
- } catch (e) {}
18
+
19
+ const braidPackageJson = requireFromCwd('braid-design-system/package.json');
20
+ braidVersion = braidPackageJson.version;
21
+ } catch (e) {
22
+ require('debug')('sku:telemetry')(
23
+ `Error getting project name or braid version: ${e}`,
24
+ );
25
+ }
18
26
 
19
27
  provider.addGlobalTags({
20
28
  ci: isCI,
21
29
  version: skuVersion,
30
+ braidVersion,
22
31
  project: projectName,
23
32
  os: os.platform(),
24
33
  languageSupport: Boolean(languages) ? 'multi' : 'single',