Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dblythy committed Jun 30, 2023
1 parent bc43849 commit fa45eb4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ gulp.task('minify-weapp', function() {

gulp.task('watch', function() {
if (BUILD === 'browser') {
const watcher = gulp.watch('src/*.js', { ignoreInitial: false }, gulp.series('compile', 'browserify', 'minify'));
const watcher = gulp.watch('src/*.*(js|ts)', { ignoreInitial: false }, gulp.series('compile', 'browserify', 'minify'));
watcher.on('add', function(path) {
console.log(`File ${path} was added`);
});
Expand All @@ -146,5 +146,5 @@ gulp.task('watch', function() {
});
return watcher;
}
return compileTask(watch('src/*.js', { ignoreInitial: false, verbose: true }));
return compileTask(watch('src/*.*(js|ts)', { ignoreInitial: false, verbose: true }));
});
8 changes: 4 additions & 4 deletions src/Parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import * as ParseOp from './ParseOp';
import RESTController from './RESTController';
import ACL from './ParseACL';
import * as Analytics from './Analytics'
import * as AnonymousUtils from './AnonymousUtils'
import Cloud from './Cloud';
import AnonymousUtils from './AnonymousUtils'
import * as Cloud from './Cloud';
import CLP from './ParseCLP';
import CoreManager from './CoreManager';
import Config from './ParseConfig'
Expand Down Expand Up @@ -116,8 +116,8 @@ const Parse: Parse = {
ACL: ACL,
Analytics: Analytics,
AnonymousUtils: AnonymousUtils,
Cloud: Cloud,
CLP: CLP,
Cloud: Cloud,
CLP: CLP,
CoreManager: CoreManager,
Config: Config,
Error: ParseError,
Expand Down
10 changes: 5 additions & 5 deletions src/ParseQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1382,15 +1382,15 @@ class ParseQuery {
* @param {string} modifiers The regular expression mode.
* @returns {Parse.Query} Returns the query, so you can chain this call.
*/
matches(key: string, regex: RegExp, modifiers: string): ParseQuery {
matches(key: string, regex: RegExp | string, modifiers: string): ParseQuery {
this._addCondition(key, '$regex', regex);
if (!modifiers) {
modifiers = '';
}
if (regex.ignoreCase) {
if ((regex as RegExp).ignoreCase) {
modifiers += 'i';
}
if (regex.multiline) {
if ((regex as RegExp).multiline) {
modifiers += 'm';
}
if (modifiers.length) {
Expand Down Expand Up @@ -1571,7 +1571,7 @@ class ParseQuery {
if (typeof prefix !== 'string') {
throw new Error('The value being searched for must be a string.');
}
return this.matches(key, new RegExp(this._regexStartWith(prefix)), modifiers);
return this.matches(key, this._regexStartWith(prefix), modifiers);
}

/**
Expand All @@ -1587,7 +1587,7 @@ class ParseQuery {
if (typeof suffix !== 'string') {
throw new Error('The value being searched for must be a string.');
}
return this.matches(key, new RegExp(quote(suffix) + '$'), modifiers);
return this.matches(key, quote(suffix) + '$', modifiers);
}

/**
Expand Down

0 comments on commit fa45eb4

Please sign in to comment.