Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Update Recognizers-Text references #4661

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/adaptive-expressions-ie11/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = () => {
query: { compact: false },
include: [
resolvePackageRoot('adaptive-expressions'),
resolvePackageRoot('@microsoft/recognizers-text-data-types-timex-expression'),
resolvePackageRoot('botbuilder-stdlib'),
resolvePackageRoot('antlr4ts'),
resolvePackageRoot('lru-cache'),
resolvePackageRoot('yallist'),
Expand Down
2 changes: 1 addition & 1 deletion libraries/adaptive-expressions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"browser": "./lib/browser.js",
"typings": "./lib/index.d.ts",
"dependencies": {
"@microsoft/recognizers-text-data-types-timex-expression": "1.3.0",
"botbuilder-stdlib": "4.1.6",
"@types/atob-lite": "^2.0.0",
"@types/btoa-lite": "^1.0.0",
"@types/lodash.isequal": "^4.5.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { TimexProperty } from '@microsoft/recognizers-text-data-types-timex-expression';
import { TimexProperty } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-data-types-timex-expression';
import dayjs from 'dayjs';
import { Expression } from '../expression';
import { EvaluateExpressionDelegate, ExpressionEvaluator, ValueWithError } from '../expressionEvaluator';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import utc from 'dayjs/plugin/utc';
dayjs.extend(utc);
import timezone from 'dayjs/plugin/timezone';
dayjs.extend(timezone);
import { TimexProperty } from '@microsoft/recognizers-text-data-types-timex-expression';
import { TimexProperty } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-data-types-timex-expression';

/**
* Return the next viable date of a timex expression based on the current date and user's timezone.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import utc from 'dayjs/plugin/utc';
dayjs.extend(utc);
import timezone from 'dayjs/plugin/timezone';
dayjs.extend(timezone);
import { TimexProperty, Time } from '@microsoft/recognizers-text-data-types-timex-expression';
import { TimexProperty, Time } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-data-types-timex-expression';
/**
* Return the next viable time of a timex expression based on the current time and user's timezone.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import timezone from 'dayjs/plugin/timezone';
dayjs.extend(timezone);
import utc from 'dayjs/plugin/utc';
dayjs.extend(utc);
import { TimexProperty } from '@microsoft/recognizers-text-data-types-timex-expression';
import { TimexProperty } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-data-types-timex-expression';

/**
* Return the previous viable date of a timex expression based on the current date and user's timezone.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { TimeZoneConverter } from '../timeZoneConverter';
import dayjs from 'dayjs';
import timezone from 'dayjs/plugin/timezone';
dayjs.extend(timezone);
import { TimexProperty, Time } from '@microsoft/recognizers-text-data-types-timex-expression';
import { TimexProperty, Time } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-data-types-timex-expression';
/**
* Return the previous viable time of a timex expression based on the current time and user's timezone.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { TimexProperty } from '@microsoft/recognizers-text-data-types-timex-expression';
import { TimexProperty } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-data-types-timex-expression';

import { Expression } from '../expression';
import { ExpressionEvaluator, ValueWithError } from '../expressionEvaluator';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { TimexProperty } from '@microsoft/recognizers-text-data-types-timex-expression';
import { TimexProperty } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-data-types-timex-expression';

import { Expression } from '../expression';
import { ExpressionEvaluator, ValueWithError } from '../expressionEvaluator';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { TimexProperty } from '@microsoft/recognizers-text-data-types-timex-expression';
import { TimexProperty } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-data-types-timex-expression';

import { Expression } from '../expression';
import { ExpressionEvaluator, ValueWithError } from '../expressionEvaluator';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { TimexProperty } from '@microsoft/recognizers-text-data-types-timex-expression';
import { TimexProperty } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-data-types-timex-expression';

import { Expression } from '../expression';
import { ExpressionEvaluator, ValueWithError } from '../expressionEvaluator';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { TimexProperty } from '@microsoft/recognizers-text-data-types-timex-expression';
import { TimexProperty } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-data-types-timex-expression';

import { Expression } from '../expression';
import { ExpressionEvaluator, ValueWithError } from '../expressionEvaluator';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { TimexProperty } from '@microsoft/recognizers-text-data-types-timex-expression';
import { TimexProperty } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-data-types-timex-expression';

import { Expression } from '../expression';
import { ExpressionEvaluator, ValueWithError } from '../expressionEvaluator';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { TimexProperty } from '@microsoft/recognizers-text-data-types-timex-expression';
import { TimexProperty } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-data-types-timex-expression';

import { Expression } from '../expression';
import { ExpressionEvaluator, ValueWithError } from '../expressionEvaluator';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
* Licensed under the MIT License.
*/

import { TimexProperty, valueResolver } from '@microsoft/recognizers-text-data-types-timex-expression';
import {
TimexProperty,
valueResolver,
} from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-data-types-timex-expression';
import { Expression } from '../expression';
import { ExpressionEvaluator, ValueWithError } from '../expressionEvaluator';
import { ExpressionType } from '../expressionType';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { ExpressionType } from './expressionType';
import { Options } from './options';
import { EvaluateExpressionDelegate, ValueWithError } from './expressionEvaluator';
import { MemoryInterface, SimpleObjectMemory, StackedMemory } from './memory';
import { TimexProperty } from '@microsoft/recognizers-text-data-types-timex-expression';
import { TimexProperty } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-data-types-timex-expression';
import bigInt = require('big-integer');
import util = require('util');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const assert = require('assert');
const bigInt = require('big-integer');
const { Expression, SimpleObjectMemory, FunctionUtils, Options, NumericEvaluator, StackedMemory } = require('../lib');
const { TimexProperty } = require('@microsoft/recognizers-text-data-types-timex-expression');
const { TimexProperty } = require('botbuilder-stdlib/vendors/@microsoft/recognizers-text-data-types-timex-expression');
const { useFakeTimers } = require('sinon');
const os = require('os');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"devDependencies": {
"botbuilder": "4.1.6",
"@microsoft/recognizers-text-suite": "1.1.4",
"botbuilder-stdlib": "4.1.6",
"@types/nock": "^11.1.0"
},
"author": "Microsoft",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { Culture } = require('@microsoft/recognizers-text-suite');
const { Culture } = require('botbuilder-stdlib/vendors/@microsoft/recognizers-text-suite');
const { ActivityTypes, TestAdapter, TurnContext } = require('botbuilder-core');
const { DialogContext, DialogSet } = require('botbuilder-dialogs');
const user = {
Expand Down
14 changes: 2 additions & 12 deletions libraries/botbuilder-dialogs-adaptive/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,7 @@
}
},
"dependencies": {
"@microsoft/recognizers-text": "~1.1.4",
"@microsoft/recognizers-text-choice": "~1.1.4",
"@microsoft/recognizers-text-date-time": "~1.1.4",
"@microsoft/recognizers-text-number": "~1.3.1",
"@microsoft/recognizers-text-number-with-unit": "~1.1.4",
"@microsoft/recognizers-text-sequence": "~1.1.4",
"@microsoft/recognizers-text-suite": "1.1.4",
"botbuilder-stdlib": "4.1.6",
"adaptive-expressions": "4.1.6",
"botbuilder": "4.1.6",
"botbuilder-core": "4.1.6",
Expand All @@ -59,11 +53,7 @@
"lint": "eslint . --ext .js,.ts",
"postbuild": "downlevel-dts lib _ts3.4/lib --checksum",
"test": "yarn build && nyc mocha tests/",
"test:compat": "api-extractor run --verbose",
"postinstall": "npm run text-suite && npm run date-time && npm run number-with-unit",
"text-suite": "npx rimraf ../@microsoft/recognizers-text-suite/node_modules/@microsoft/recognizers-text-number",
"date-time": "npx rimraf ../@microsoft/recognizers-text-date-time/node_modules/@microsoft/recognizers-text-number",
"number-with-unit": "npx rimraf ../@microsoft/recognizers-text-number-with-unit/node_modules/@microsoft/recognizers-text-number"
"test:compat": "api-extractor run --verbose"
},
"files": [
"_ts3.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
} from 'botbuilder-dialogs';

// eslint-disable-next-line import/no-extraneous-dependencies
import * as Recognizers from '@microsoft/recognizers-text-choice';
import * as Recognizers from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-choice';
import { ChoiceOptionsSet } from './choiceOptionsSet';

export interface ConfirmInputConfiguration extends InputDialogConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { InputDialog, InputDialogConfiguration, InputState } from './inputDialog
import { StringProperty } from '../properties';

// eslint-disable-next-line import/no-extraneous-dependencies
import * as Recognizers from '@microsoft/recognizers-text-date-time';
import * as Recognizers from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-date-time';

export interface DateTimeInputConfiguration extends InputDialogConfiguration {
defaultLocale?: StringProperty;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import * as Recognizers from '@microsoft/recognizers-text-number';
import * as Recognizers from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-number';
import { Converter, ConverterFactory, DialogContext } from 'botbuilder-dialogs';
import { InputDialog, InputDialogConfiguration, InputState } from './inputDialog';
import { NumberProperty, StringProperty } from '../properties';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { recognizeAge } from '@microsoft/recognizers-text-number-with-unit';
import { recognizeAge } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-number-with-unit';
import { ModelResult } from 'botbuilder-dialogs';
import { TextEntityRecognizer } from './textEntityRecognizer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { recognizeBoolean } from '@microsoft/recognizers-text-choice';
import { recognizeBoolean } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-choice';
import { ModelResult } from 'botbuilder-dialogs';
import { TextEntityRecognizer } from './textEntityRecognizer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { recognizeCurrency } from '@microsoft/recognizers-text-number-with-unit';
import { recognizeCurrency } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-number-with-unit';
import { ModelResult } from 'botbuilder-dialogs';
import { TextEntityRecognizer } from './textEntityRecognizer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { recognizeDateTime } from '@microsoft/recognizers-text-date-time';
import { recognizeDateTime } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-date-time';
import { ModelResult } from 'botbuilder-dialogs';
import { TextEntityRecognizer } from './textEntityRecognizer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { recognizeDimension } from '@microsoft/recognizers-text-number-with-unit';
import { recognizeDimension } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-number-with-unit';
import { ModelResult } from 'botbuilder-dialogs';
import { TextEntityRecognizer } from './textEntityRecognizer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { recognizeEmail } from '@microsoft/recognizers-text-sequence';
import { recognizeEmail } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-sequence';
import { ModelResult } from 'botbuilder-dialogs';
import { TextEntityRecognizer } from './textEntityRecognizer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { recognizeGUID } from '@microsoft/recognizers-text-sequence';
import { recognizeGUID } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-sequence';
import { ModelResult } from 'botbuilder-dialogs';
import { TextEntityRecognizer } from './textEntityRecognizer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { recognizeHashtag } from '@microsoft/recognizers-text-sequence';
import { recognizeHashtag } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-sequence';
import { ModelResult } from 'botbuilder-dialogs';
import { TextEntityRecognizer } from './textEntityRecognizer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

// NumberRangeEntityRecognizer not implemented due to lack of supoort in @microsoft/recognizers-text-suite
// NumberRangeEntityRecognizer not implemented due to lack of supoort in botbuilder-stdlib/vendors/@microsoft/recognizers-text-suite

export * from './ageEntityRecognizer';
export * from './channelMentionEntityRecognizer';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { recognizeIpAddress } from '@microsoft/recognizers-text-sequence';
import { recognizeIpAddress } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-sequence';
import { ModelResult } from 'botbuilder-dialogs';
import { TextEntityRecognizer } from './textEntityRecognizer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { recognizeMention } from '@microsoft/recognizers-text-sequence';
import { recognizeMention } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-sequence';
import { ModelResult } from 'botbuilder-dialogs';
import { TextEntityRecognizer } from './textEntityRecognizer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { recognizeNumber } from '@microsoft/recognizers-text-number';
import { recognizeNumber } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-number';
import { ModelResult } from 'botbuilder-dialogs';
import { TextEntityRecognizer } from './textEntityRecognizer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { recognizeOrdinal } from '@microsoft/recognizers-text-number';
import { recognizeOrdinal } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-number';
import { ModelResult } from 'botbuilder-dialogs';
import { TextEntityRecognizer } from './textEntityRecognizer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { recognizePercentage } from '@microsoft/recognizers-text-number';
import { recognizePercentage } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-number';
import { ModelResult } from 'botbuilder-dialogs';
import { TextEntityRecognizer } from './textEntityRecognizer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { recognizePhoneNumber } from '@microsoft/recognizers-text-sequence';
import { recognizePhoneNumber } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-sequence';
import { ModelResult } from 'botbuilder-dialogs';
import { TextEntityRecognizer } from './textEntityRecognizer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { recognizeTemperature } from '@microsoft/recognizers-text-number-with-unit';
import { recognizeTemperature } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-number-with-unit';
import { ModelResult } from 'botbuilder-dialogs';
import { TextEntityRecognizer } from './textEntityRecognizer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { Culture } from '@microsoft/recognizers-text';
import { Culture } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text';
import { Entity } from 'botbuilder';
import { DialogContext, ModelResult } from 'botbuilder-dialogs';
import { EntityRecognizer } from './entityRecognizer';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Licensed under the MIT License.
*/

import { recognizeURL } from '@microsoft/recognizers-text-sequence';
import { recognizeURL } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-sequence';
import { ModelResult } from 'botbuilder-dialogs';
import { TextEntityRecognizer } from './textEntityRecognizer';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Culture } from '@microsoft/recognizers-text-suite';
import { Culture } from 'botbuilder-stdlib/vendors/@microsoft/recognizers-text-suite';
import { Activity, Entity, RecognizerResult } from 'botbuilder';
import { Converter, ConverterFactory, DialogContext } from 'botbuilder-dialogs';
import { IntentPattern } from './intentPattern';
Expand Down
Loading
Loading