* Optimize query, fixes some null returns, fix stitched GraphQLUpload
* Fix authData key selection
* Prefer Iso string since other GraphQL solutions use this format
* fix tests
Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
* Always delete data after each, even for mongo.
* Add failing simple case test
* run all tests
* 1. when validating username be case insensitive
2. add _auth_data_anonymous to specialQueryKeys...whatever that is!
* More case sensitivity
1. also make email validation case insensitive
2. update comments to reflect what this change does
* wordsmithery and grammar
* first pass at a preformant case insensitive query. mongo only so far.
* change name of parameter from insensitive to
caseInsensitive
* Postgres support
* properly handle auth data null
* wip
* use 'caseInsensitive' instead of 'insensitive' in all places.
* update commenet to reclect current plan
* skip the mystery test for now
* create case insensitive indecies for
mongo to support case insensitive
checks for email and username
* remove unneeded specialKey
* pull collation out to a function.
* not sure what i planned
to do with this test.
removing.
* remove typo
* remove another unused flag
* maintain order
* maintain order of params
* boil the ocean on param sequence
i like having explain last cause it seems
like something you would
change/remove after getting what you want
from the explain?
* add test to verify creation
and use of caseInsensitive index
* add no op func to prostgress
* get collation object from mongocollection
make flow lint happy by declaring things Object.
* fix typo
* add changelog
* kick travis
* properly reference static method
* add a test to confirm that anonymous users with
unique username that do collide when compared
insensitively can still be created.
* minot doc nits
* add a few tests to make sure our spy is working as expected
wordsmith the changelog
Co-authored-by: Diamond Lewis <findlewis@gmail.com>
* Suppress Test Logs
This will reduce some of the noise in the tests logs.
* replace deprecated buffer
* remove deprecation warnings
* fix geopoint
* Fix GraphQL
* postgres warnings
* Batch transaction boilerplate
* Refactoring transaction boilerplate
* Independent sessions test
* Transactions - partial
* Missing only one test
* All tests passing for mongo db
* Tests on Travis
* Transactions on postgres
* Fix travis to restart mongodb
* Remove mongodb service and keep only mongodb runner
* MongoDB service back
* Initialize replicaset
* Remove mongodb runner again
* Again only with mongodb-runner and removing cache
* Trying with pretest and posttest
* WiredTiger
* Pretest and posttest again
* Removing inexistent scripts
* wiredTiger
* One more attempt
* Trying another way to run mongodb-runner
* Fixing tests
* Include batch transaction on direct access
* Add tests to direct access
* Changing __indexBuildCompletionCallbackForTests callback to serverStartComplete
* Improving serverStartComplete callback to avoid production unhandled promise rejection
* Add test to check inexistence of unhandled promise rejection on server fail
* Removing some hooks delays
* Removing delay after reconfigureServer
* Improving code style
* Auth module refactoring in order to be reusable
* Ensure cache controller is properly forwarded from helpers
* Nits
* Adds support for static validation
* Adds support for CLP in Live query (no support for roles yet)
* Adds e2e test to validate liveQuery hooks is properly called
* Adds tests over LiveQueryController to ensure data is correctly transmitted
* nits
* Fixes for flow types
* Removes usage of Parse.Promise
* Use the Auth module for authentication and caches
* Cleaner implementation of getting auth
* Adds authCache that stores auth promises
* Proper testing of the caching
* nits
* Silences warnings from mongodb client
* Update count, delete and finds to recommended implementations
* With new parser, readPref will be null by default
* Update flaky specs wih async/await style
* Adds gridstore adapter spec
* Use GridFSBucketStorage adapter
* WIP: Integrate JS SDK v2
- Removes backbone style callbacks
- Use Promise instead of Parse.Promise
* Fixes ParseObject and ParseRelation
* Updates Parse.Query with promises
* Alls tests should pass
* Ensure a fresh user is used for each test
* Use REST implementation to avoid side effects for username/email duplicates
* Uses js sdk v2
* Various improvements in test name / de-duplications
* Reverts to class by class deletion, introduced fast mode that just delete data for mongo
- Speeds up are incredible Executed 1695 of 1713 specs INCOMPLETE (18 PENDING) in 4 mins 19 secs.
* Adds documentation about the deleteEverything
* Removes need to use babel-register
- Adds watch to watch changes when running the test to regenerate
- Tests are now pure node 8
* Adds timing to helper.js
* Update contribution guide
* Adds inline sourcemaps generation to restore coverage
* nits
* Adds supports-color so spec reporter dont output colors when not supported
* Adds babelrc so breakpoints dont jump around in specs
* Rename test to avoid duplicated name
* Removes unused methods
* Better naming for it_exclude
* Fixes an issue that would let the beforeDelete be called when user has no access to the object
* Ensure we properly lock user
- Improves find method so we can attempt to read for a write poking the right ACL instead of using masterKey
- This ensure we do not run beforeDelete/beforeFind/beforeSave in the wrong scenarios
* nits
* Caps insufficient
* add support for geoWithin.centerSphere queries via withJSON
* added test for passing array of lat, lng instead of Parse.GeoPoint
* added postgres support
* added more tests
* improved tests and validation
* added more tests
* Use node 8 as development environment
* fixup! Use node 8 as development environment
* bump node to 8.10
* Targets node 8 for everything
* Run npm install so lock file is up to date
* Use push adapter v3
* Deflake a test on ParseUser
* Adds slight delay after logout
* Ensure we wait even if call fails
* Use node carbon
* chore(package): update jasmine to version 3.0.0
Closes#4547
* Fixes failing tests for jasmine 3.0
Starting 3.0, done(something) will fail
* Update tests so they dont leverage var, but let and const
With jasmine 3.0, the randomization engine was making the test fails because of the scope of `var`
* Remove randomizer
* Use same adapter for PG tests, drop table to ensure the tests dont side effect
* Introduces flow types for storage
* Better typing of QueryOptions
* Adds flow types to SchemaCOntroller,
- runs flow on pre tests
- fixes flow
* Adds ClassLevelPermissions type
* Moves Controller types into a single file
* Changes import styles
* Changes import styles
* fixing method setIndexesWithSchemaFormat (#4454)
Fixing invalid database code in method `setIndexesWithSchemaFormat`:
* It must be a transaction, not a task, as it executes multiple database changes
* It should contain the initial queries inside the transaction, providing the context, not outside it;
* Replaced the code with the ES6 Generator notation
* Removing the use of batch, as the value of the result promise is irrelevant, only success/failure that matters
* nits
* Fixes tests, improves flow typing
* Add relative time queries
* Encode successful result
* Add integration test
* Add more error cases
* Remove unnecessary new Date
* Error when time has both 'in' and 'ago'
* naturalTimeToDate -> relativeTimeToDate
* Add $relativeTime operator
* Throw error if $relativeTime is invalid
* Add integration test for invalid relative time
* Exclude $exists query
* Only run integration tests on MongoDB
* Add it_only_db test helper
bd2ea87c1d/CONTRIBUTING.md (L23)
* Handle where val might be null or undefined
* Add integration test for multiple results
* Lowercase text before processing
* Always past if not future
* Precompute seconds multiplication
* Add shorthand for interval
hr, hrs
min, mins
sec, secs
* Throw error if $relativeTime is used with $exists, $ne, and $eq
* Improve coverage for relativeTimeToDate
* Add test for erroring on floating point units
* Remove unnecessary dropDatabase function
* Unit test $ne, $exists, $eq
* Verify field type
* Fix unit test for $exists
Unnest query object
* Adds flow types / Configuration interfaces
* Lets call it options
* Use a single interface to generate the configurations
* Translates options to definitions only if comments are set
* improves logic
* Moves objects around
* Fixes issue affecting logging of circular objects
* fixes undefined env
* Moves all defaults to defaults
* Adds back CLI defaults
* Restored defaults in commander.js
* Merge provided defaults and platform defaults
* Addresses visual nits
* Improves Config.js code
* Adds ability to pass the default value in trailing comments
* Load platform defaults from the definitions file
* proper default values on various options
* Adds ParseServer.start and server.start(options) as quick startup methods
* Moves creating liveQueryServer http into ParseServer.js
* removes dead code
* Adds tests to guarantee we can start a LQ Server from main module
* Fixes incorrect code regading liveQuery init port
* Start a http server for LQ if port is specified
* ensure we dont fail if config.port is not set
* Specify port
* ignore other path skipped in tests
* Adds test for custom middleware setting
* Refactors new Config into Config.get
- Hides AppCache from ParseServer.js, use Config.put which validates
* Extracts controller creation into Controllers/index.js
- This makes the ParseServer init way simpler
* Move serverURL inference into ParseServer
* review nits
* fix(package): update pg-promise to version 6.3.0
Closes#3954
* Restores PG adapter after tests that close the connection
* investigation
* Use isolated parse-server to not impeed on other specs
* Update PostgresInitOptions.spec.js
* Node modernization on CI
* Makes sure tests dont yeild unhandled promise rejections
* Adds small delay to startDB
* Adds mongodb service
* testing default
* stupid
* testing with silent nugget
* proper versions
* Single release step
* Adds test for the new feature
* Re-validate authData only if mutated
- In case of short-lived tokens (like facebook) this will allow clients to be lax with asking users to re-login
* Moves all authentication providers to Adapter/Auth
* refactors specs
* Deprecates oauth option in favor of auth option
- Deprecates facebookAppIds option (in favor of auth.facebook.appIds)
- Adds warnings about the deprecated options
* nits
* Removes runtime dependency babel-polyfill (#2692)
* Removes runtime dependency babel-polyfill
* removes references to polyfilled array includes
* Better support for polyfilling
* Removes unnecessary log
* Adds killswitch if tests are polyfilled
* Reverts usage of includes on strings
* Adds passing tests
* Better containsAll implementation
* Full Geopoint support, fix inverted lat/lng
* Adds support for $and operator / PointerPermissions specs
* Fix issue updating CLPs on schema
* Extends query support
* Adds RestCreate to the specs
* Adds User specs
* Adds error handlers for failing tests
* nits
* Proper JSON update of AuthData
* fix for #1259 with PG
* Fix for Installations _PushStatus test
* Adds support for GlobalConfig
* Enables relations tests
* Exclude spec as legacy
* Makes corner case for 1 in GlobalConfig
* Adds files related tests through fs-adapter with PG
* Schema deletions implementations
* Adds Hooks spec
* Fix test
* Adds support for containsAll (numbers and strings)
* Better support for deleteFields and deleteClass
* Recursive JSON update for authData
* Adds node_modules to travis cache
* Disable temporarily to make tests pass
* Adds _perishable_token support for _User class
* ignore when a table creation fails at init (table exists)
* Adds support for AddUnique and Remove
* PG 9.4 compatible functions
* Re-enable tests
* nit
* Better handling of schema creation race
* Start DB runner from tests
* Connect GridstoreAdapter only when needed
* removes unused package
* better test errors reporting
* Adds support for __op.Delete
* Better test error reporting
* Makes sure all tests can run without crashing
* Use xdescribe to skip test suite
* Removes unused dependencies
* Let volatiles classes be created with PG on start
* Do not fail if class dont exist
* adds index.spec.js to the pg suite
* Use a new config each test to prevent side effects
* Enable EmailVerificationToken specs with pg
* Makes sure failure output is not cut
* Reduces number of ignored tests in ParseObject.spec
* Inspect reconfiguration errors
* Mark GlobalConfig is incompatible with PG
- Problem is with nested updates (param.prop = value)
* PG: Nested JSON queries and updates
- Adds support for nested json and . operator queries
- Adds debug support for PG adapter
- Adds loglevel support in helper
* Enable working specs in ParseUser
* Sets default logLevel in tests to undefined
* Adds File type support, retores purchaseValidation specs
* Adds support for updating jsonb objects
- Restores PushController tests
* Proper implementation of deleteByQuery and ORs
- Adds ParseInstallation spec to the test suite
* xit only failing tests
* Nit on ParseAPI spec
* add sorting operator
* properly bound order keys
* reverts describe_only_db behavior
* Enables passing tests
* Adds basic support for relations, upsertOneObject aliased to createObject
* progress on queries options
* Fix ACL update related problems
* Creates relation tables on class creation
* Adds Relation tests
* remove flaky tests
* use promises instead of CB
* disable flaky test
* nits
* Fixes on schema spec
- Next thing is to implemenet geopoint and files correctly
* fix failues
* Basic GeoPoint support
* Adds support for $nearSphere/$maxDistance geopoint queries
* enable passing tests
* drop tables afterEach for PG, clean up relation tables too
* Better initialization/dropTables
* Refactor logging to provide common logger from LoggerAdapter
Move logger logic de WinstonLoggerAdapter
Further improvements in configuration
Use logger instead of getLogger
- Removes PLog module
Reverts name changes
nits
* Adds additional logging levels as requirements
* Adds tests for logging configuration
* removes flaky test
* investigate...
* further investigation
* Adds silent option to disable console output
* Restores logs with VERBOSE in tests
* Expose controller instead of adapter, reduces method requirements for adapter
* Shuffles initializations around
* Fix doc
* Load cloudCode last to make sure the logger is available
* Adds test to make sure we can load an adapter from npm module
* extract defaults
* Adds defaultMongoURI to defaults
* fix defaults values
* Proper error for PG failures
* Disable flaky test