sku 11.2.8 → 11.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # sku
2
2
 
3
+ ## 11.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix banner width in CI ([#680](https://github.com/seek-oss/sku/pull/680))
8
+
9
+ ## 11.3.1
10
+
11
+ ### Patch Changes
12
+
13
+ - test: Run Jest using the CI flag when in CI environment ([#678](https://github.com/seek-oss/sku/pull/678))
14
+
15
+ Tests run in CI should fail if a new snapshot is written, this was not the case and needed to be opted into manually by passing the `--ci` [flag to Jest](https://jestjs.io/docs/cli#--ci).
16
+
17
+ ## 11.3.0
18
+
19
+ ### Minor Changes
20
+
21
+ - Any app that configures `languages` will automatically have the `en-PSEUDO` language generated for them. ([#675](https://github.com/seek-oss/sku/pull/675))
22
+ `en-PSEUDO` is a generated language created by pseudo-localizing existing `en` translation messages in your app.
23
+ An explanation of the pseudo-localization process, as well as possible use cases for this language, can be found in [the Vocab docs].
24
+
25
+ `en-PSEUDO` can be consumed just like any other language in your app:
26
+
27
+ ```jsx
28
+ const App = () => <VocabProvider language="en-PSEUDO">...</VocabProvider>;
29
+ ```
30
+
31
+ **NB:** Statically-rendered apps will not be able to render an `en-PSEUDO` version of their app at build time.
32
+ If this is a use case that you would find useful, please reach out in #sku-support.
33
+
34
+ [the vocab docs]: https://github.com/seek-oss/vocab#pseudo-localization
35
+
3
36
  ## 11.2.8
4
37
 
5
38
  ### Patch Changes
@@ -1,17 +1,26 @@
1
1
  const { languages } = require('../../context');
2
2
  const log = require('debug')('sku:vocab:config');
3
+ const { generator } = require('@vocab/pseudo-localize');
3
4
 
4
5
  const getVocabConfig = () => {
5
6
  if (!languages) {
6
7
  log('No languagages set. Skipping vocab');
7
8
  return null;
8
9
  }
10
+
9
11
  const result = {
10
12
  devLanguage: 'en',
11
13
  ignore: ['node_modules/sku/**', 'node_modules/vocab/**'],
12
14
  languages,
15
+ generatedLanguages: [
16
+ {
17
+ name: 'en-PSEUDO',
18
+ generator,
19
+ },
20
+ ],
13
21
  };
14
22
  log('Using Vocab options:', result);
23
+
15
24
  return result;
16
25
  };
17
26
 
@@ -126,3 +126,19 @@ When formatting ICU messages vocab will format values such dates and numbers acc
126
126
  <App />
127
127
  </VocabProvider>
128
128
  ```
129
+
130
+ ## Pseudo-localization
131
+
132
+ Any app that configures `languages` will automatically have the `en-PSEUDO` language generated for them.
133
+
134
+ `en-PSEUDO` is a generated language created by pseudo-localizing existing `en` translation messages in your app.
135
+
136
+ An explanation of the pseudo-localization process, as well as possible use cases for this language, can be found in [the Vocab docs](https://github.com/seek-oss/vocab#pseudo-localization).
137
+
138
+ `en-PSEUDO` can be consumed just like any other language in your app:
139
+
140
+ ```jsx
141
+ <VocabProvider language="en-PSEUDO">
142
+ <App />
143
+ </VocabProvider>
144
+ ```
@@ -96,7 +96,7 @@ Last but not least, please note that commands for SSR are different to the ones
96
96
 
97
97
  - Use `sku start-ssr` to start your development environment. It uses both `port` and `serverPort` to spin up hot module reloading servers.
98
98
  - Use `sku build-ssr` to build your production assets. You can then run `node ./dist/server.js`. Your server will run at `http://localhost:xxxx`, where `xxxx` is `serverPort`.
99
- - Use `sku test-ssr` to test your application
99
+ - Use `sku test` to test your application
100
100
 
101
101
  ## Multi-language support
102
102
 
package/lib/banner.js CHANGED
@@ -23,8 +23,9 @@ module.exports = (type, heading, messages = []) => {
23
23
  }
24
24
  }
25
25
 
26
+ const columns = process.stdout.columns <= 0 ? 80 : process.stdout.columns;
26
27
  const gutter = 4;
27
- const fullWidth = process.stdout.columns < 80 ? process.stdout.columns : 80;
28
+ const fullWidth = columns < 80 ? columns : 80;
28
29
  const contentWidth = fullWidth - gutter * 2;
29
30
 
30
31
  const border = highlight(Array(fullWidth).fill('-').join(''));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sku",
3
- "version": "11.2.8",
3
+ "version": "11.3.2",
4
4
  "description": "Front-end development toolkit, powered by Webpack, Babel, CSS Modules, Less and Jest",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -76,9 +76,10 @@
76
76
  "@types/loadable__component": "^5.13.1",
77
77
  "@vanilla-extract/babel-plugin": "^1.0.0",
78
78
  "@vanilla-extract/webpack-plugin": "^2.0.0",
79
- "@vocab/core": "^1.0.4",
79
+ "@vocab/core": "^1.1.0",
80
80
  "@vocab/phrase": "^1.0.0",
81
- "@vocab/webpack": "^1.0.0",
81
+ "@vocab/pseudo-localize": "^1.0.0",
82
+ "@vocab/webpack": "^1.1.0",
82
83
  "autoprefixer": "^10.3.1",
83
84
  "babel-jest": "^27.0.6",
84
85
  "babel-loader": "^8.2.2",
package/scripts/test.js CHANGED
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable-next-line jest/no-jest-import */
2
2
  const jest = require('jest');
3
3
 
4
+ const isCI = require('../lib/isCI');
4
5
  const baseJestConfig = require('../config/jest/jestConfig');
5
6
  const { argv } = require('../config/args');
6
7
  const { jestDecorator } = require('../context');
@@ -14,5 +15,9 @@ const { runVocabCompile } = require('../lib/runVocab');
14
15
 
15
16
  argv.push('--config', JSON.stringify(jestConfig));
16
17
 
18
+ if (isCI) {
19
+ argv.push('--ci');
20
+ }
21
+
17
22
  jest.run(argv);
18
23
  })();