botframework-webchat-api 4.15.3-main.20220616.9fa8d2b → 4.15.3-main.20220617.b0004fa

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botframework-webchat-api",
3
- "version": "4.15.3-main.20220616.9fa8d2b",
3
+ "version": "4.15.3-main.20220617.b0004fa",
4
4
  "description": "React DOM component of botframework-webchat",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -16,6 +16,10 @@
16
16
  "bugs": {
17
17
  "url": "https://github.com/microsoft/BotFramework-WebChat/issues"
18
18
  },
19
+ "files": [
20
+ "lib/**/*",
21
+ "src/**/*"
22
+ ],
19
23
  "homepage": "https://github.com/microsoft/BotFramework-WebChat/tree/main/packages/component#readme",
20
24
  "scripts": {
21
25
  "build": "npm run build:globalize && npm run build:typescript && npm run build:babel",
@@ -47,7 +51,7 @@
47
51
  "@types/react": "^17.0.39",
48
52
  "babel-plugin-istanbul": "^6.1.1",
49
53
  "babel-plugin-transform-inline-environment-variables": "^0.4.3",
50
- "cldr-data": "4.15.3-main.20220616.9fa8d2b",
54
+ "cldr-data": "4.15.3-main.20220617.b0004fa",
51
55
  "concurrently": "^7.0.0",
52
56
  "core-js": "^3.21.1",
53
57
  "globalize-compiler": "^1.1.1",
@@ -56,7 +60,7 @@
56
60
  "typescript": "^4.6.2"
57
61
  },
58
62
  "dependencies": {
59
- "botframework-webchat-core": "4.15.3-main.20220616.9fa8d2b",
63
+ "botframework-webchat-core": "4.15.3-main.20220617.b0004fa",
60
64
  "globalize": "1.7.0",
61
65
  "math-random": "2.0.1",
62
66
  "prop-types": "15.8.1",
package/.eslintrc.yml DELETED
@@ -1,6 +0,0 @@
1
- extends:
2
- - ../../.eslintrc.react.yml
3
-
4
- # TODO: #3212 When we move to React Native, we should disable this.
5
- env:
6
- browser: true
package/.prettierrc.yml DELETED
@@ -1,11 +0,0 @@
1
- arrowParens: avoid
2
- bracketSameLine: false
3
- bracketSpacing: true
4
- endOfLine: auto
5
- printWidth: 120
6
- proseWrap: preserve
7
- quoteProps: as-needed
8
- semi: true
9
- singleQuote: true
10
- tabWidth: 2
11
- trailingComma: none
package/babel.config.json DELETED
@@ -1,49 +0,0 @@
1
- {
2
- "env": {
3
- "test": {
4
- "exclude": ["src/**/*.worker.js"],
5
- "plugins": ["babel-plugin-istanbul"]
6
- }
7
- },
8
- "ignore": ["src/index.tsx"],
9
- "overrides": [
10
- {
11
- "plugins": [],
12
- "presets": [
13
- [
14
- "@babel/preset-env",
15
- {
16
- "targets": {
17
- "chrome": "69"
18
- }
19
- }
20
- ]
21
- ],
22
- "test": "src/**/*.worker.js"
23
- }
24
- ],
25
- "plugins": [
26
- "@babel/proposal-object-rest-spread",
27
- [
28
- "transform-inline-environment-variables",
29
- {
30
- "include": ["npm_package_version"]
31
- }
32
- ]
33
- ],
34
- "presets": [
35
- "@babel/preset-typescript",
36
- [
37
- "@babel/preset-env",
38
- {
39
- "modules": "commonjs",
40
- "targets": {
41
- "browsers": ["last 2 versions"]
42
- }
43
- }
44
- ],
45
- "@babel/react"
46
- ],
47
- "sourceMaps": "inline",
48
- "sourceRoot": "component:///"
49
- }
@@ -1,44 +0,0 @@
1
- import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
2
- import { fileURLToPath } from 'url';
3
- import { relative } from 'path';
4
- import cldrData from 'cldr-data';
5
- import Globalize from 'globalize';
6
- import globalizeCompiler from 'globalize-compiler';
7
- import Prettier from 'prettier';
8
-
9
- const overridesJSON = JSON.parse(readFileSync(new URL('../src/localization/overrides.json', import.meta.url), 'utf-8'));
10
-
11
- const languages = Object.values(overridesJSON).map(({ GLOBALIZE_LANGUAGE }) => GLOBALIZE_LANGUAGE);
12
-
13
- Globalize.load(cldrData.entireSupplemental());
14
-
15
- const formattersAndParsers = languages.reduce((formattersAndParsers, language) => {
16
- Globalize.load(cldrData.entireMainFor(language));
17
-
18
- const globalize = new Globalize(language);
19
-
20
- return [
21
- ...formattersAndParsers,
22
- ...[
23
- globalize.dateFormatter({ skeleton: 'MMMMdhm' }),
24
- globalize.pluralGenerator(),
25
- globalize.relativeTimeFormatter('hour'),
26
- globalize.relativeTimeFormatter('minute'),
27
- globalize.unitFormatter('byte', { form: 'long' }),
28
- globalize.unitFormatter('kilobyte', { form: 'short' }),
29
- globalize.unitFormatter('megabyte', { form: 'short' }),
30
- globalize.unitFormatter('gigabyte', { form: 'short' })
31
- ]
32
- ];
33
- }, []);
34
-
35
- const code = Prettier.format(globalizeCompiler.compile(formattersAndParsers), { parser: 'babel' });
36
- const outputFileURL = new URL('../lib/external/PrecompiledGlobalize.js', import.meta.url);
37
-
38
- // globalize-compiler is emitting AMD code, pointing to "globalize-runtime" instead of "globalize/dist/globalize-runtime"
39
- const patchedCode = code.replace(/\"globalize-runtime\//g, '"globalize/dist/globalize-runtime/');
40
-
41
- existsSync(new URL('.', outputFileURL)) || mkdirSync(new URL('.', outputFileURL), { recursive: true });
42
- writeFileSync(outputFileURL, patchedCode);
43
-
44
- console.log(`Successfully compiled globalize to ${relative(process.cwd(), fileURLToPath(outputFileURL))}.`);