Skip to content

Commit

Permalink
Merge pull request #2242 from realm/tg/npm-5
Browse files Browse the repository at this point in the history
Update versions of all the things used in tests
  • Loading branch information
tgoyne committed Feb 26, 2019
2 parents 8dfb0a2 + 0c31fd6 commit 003f8b3
Show file tree
Hide file tree
Showing 96 changed files with 4,978 additions and 4,197 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.json
Expand Up @@ -16,5 +16,10 @@
}
],
"strict": [2, "global"]
},
"settings": {
"react": {
"version": "16.6.3"
}
}
}
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -58,6 +58,10 @@ realm-object-server/
tests/react-test-app/ios/out.txt
*.iml
crash.log
tests/react-test-app/ios/Pods/
tests/react-test-app/ios/ReactTests.xcworkspace/
examples/ReactExample/ios/Pods/
examples/ReactExample/ios/ReactExample.xcworkspace/

# Integration tests
integration-tests/**/realm-*.tgz
Expand Down
13 changes: 9 additions & 4 deletions CHANGELOG.md
Expand Up @@ -2,10 +2,14 @@ x.x.x Release notes (yyyy-MM-dd)
=============================================================
### Enhancements
* Added a `_updateSchema` method on an Realm instance to perform schema manipulation. Specifically creating an object schema and a property on an existing object schema. (partly solving [#2216](https://github.com/realm/realm-js/issues/2216))
* Add support for react-native 0.58 ([#2239](https://github.com/realm/realm-js/issues/2239)).

### Fixed
* <How to hit and notice issue? what was the impact?> ([#????](https://github.com/realm/realm-js/issues/????), since v?.?.?)
* None.
* Fixed an assertion failure after creating an object with a null int primary key in a synchronized Realm. ([#3227](https://github.com/realm/realm-core/pull/3227))
* When debugging with React Native, calling `Realm.open()` would crash since `Realm._asyncOpen()` was not available in the debugger. ([#2234](https://github.com/realm/realm-js/pull/2234), since v2.20.0)
* Added several missing functions to the Chrome debugging support library. ([#2242](https://github.com/realm/realm-js/pull/2242), since v2.2.19).
* Fixed incorrect results when reading data from Realm from within a callback function when debugging in Chrome. ([#2242](https://github.com/realm/realm-js/pull/2242)).
* Report the correct user agent to the sync server rather than always "RealmJS/Unknown". ([#2242](https://github.com/realm/realm-js/pull/2242), since v2.23.0).

### Compatibility
* Realm Object Server: 3.11.0 or later.
Expand All @@ -27,6 +31,7 @@ x.x.x Release notes (yyyy-MM-dd)
* Realm initialized the filesystem when being imported instead of waiting for the first Realm to be opened. ([#2218] (https://github.com/realm/realm-js/issues/2218), since v2.22.0)
* Sync sessions for Realms which were closed while the session was paused would sometimes not be cleaned up correctly. ([realm/realm-object-store#766](https://github.com/realm/realm-object-store/pull/766), since v2.16.0)
* Querying Realm instances obtained from `Realm.Sync.Adapter` would sometimes pin the read transaction version, resulting in the file rapidly growing in size as further transactions were processed. ([realm/realm-object-store#766](https://github.com/realm/realm-object-store/pull/766), since v2.0.2)
* Realm initialized the filesystem when being imported instead of waiting for the first Realm to be opened. ([#2218] (https://github.com/realm/realm-js/issues/2218), since v2.22.0).

### Compatibility
* Realm Object Server: 3.11.0 or later.
Expand All @@ -35,8 +40,8 @@ x.x.x Release notes (yyyy-MM-dd)

### Internal
* Upgraded to Object Store commit: 0f2f8347cb32afddef1753a018f70f65972a4679
* Upgraded to Realm Core v5.13.0.
* Upgraded to Realm Sync v3.14.14.
* Upgraded to Realm Core v5.14.0.
* Upgraded to Realm Sync v3.15.0.
* Stopped including headers from developers JDK when building the Android native module. ([#2223](https://github.com/realm/realm-js/pull/2223))

2.22.0 Release notes (2019-1-10)
Expand Down
77 changes: 42 additions & 35 deletions Jenkinsfile
Expand Up @@ -65,46 +65,21 @@ stage('check') {
}
}

// Create the Realm JS npm package
stage('package') {
node('docker') {
// Unstash the files in the repository
unstash 'source'
// Remove any archive from the workspace, which might have been produced by previous runs of the job
sh 'rm -f realm-*.tgz'
// TODO: Consider moving the node on the other side of the stages
docker.build(
'ci/realm-js:android-build',
'-f Dockerfile.android .'
).inside {
// Install dependencies
sh 'npm install'
// Publish the Android module
sh 'cd react-native/android && ./gradlew publishAndroid'
// Package up the app
sh 'npm pack'
// Archive and stash the package
archiveArtifacts 'realm-*.tgz'
stash includes: 'realm-*.tgz', name: 'package'
}
}
}

stage('test (and build)') {
stage('package and test') {
parallel(
eslint: doDockerBuild('eslint-ci', {
eslint: doDockerBuild('eslint-ci', 10, {
step([$class: 'CheckStylePublisher', canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: 'eslint.xml', unHealthy: ''])
}),
jsdoc: doDockerBuild('jsdoc', {
jsdoc: doDockerBuild('jsdoc', 10, {
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'docs/output', reportFiles: 'index.html', reportName: 'Docs'])
}),
linux_node_debug: doDockerBuild('node Debug'),
linux_node_release: doDockerBuild('node Release'),
linux_node_8_debug: doDockerBuild('node Debug v8.15.0', 8),
linux_node_8_release: doDockerBuild('node Release v8.15.0', 8),
linux_node_10_debug: doDockerBuild('node Debug v10.15.1', 10),
linux_node_10_release: doDockerBuild('node Release v10.15.1', 10),
linux_test_runners: doDockerBuild('test-runners'),
macos_node_debug: doMacBuild('node Debug'),
macos_node_release: doMacBuild('node Release'),
//macos_realmjs_debug: doMacBuild('realmjs Debug'),
//macos_realmjs_release: doMacBuild('realmjs Release'),
macos_react_tests_debug: doMacBuild('react-tests Debug'),
macos_react_tests_release: doMacBuild('react-tests Release'),
macos_react_example_debug: doMacBuild('react-example Debug'),
Expand All @@ -113,7 +88,12 @@ stage('test (and build)') {
// junit 'tests/react-test-app/tests.xml'
//}),
windows_node: doWindowsBuild(),
package: packageNpmArchive(),
)
}

stage('integration tests') {
parallel(
// Integration tests:
// The tests above should be removed once we manage to move them to the new test harness in ./integration-tests
'React Native on Android': ReactNativeTests.onAndroid(),
Expand Down Expand Up @@ -220,7 +200,7 @@ def doAndroidBuild(target, postStep = null) {
}
}

def doDockerBuild(target, postStep = null) {
def doDockerBuild(target, nodeVersion = 10, postStep = null) {
return {
node('docker && !aws') {
deleteDir()
Expand All @@ -230,7 +210,7 @@ def doDockerBuild(target, postStep = null) {
reportStatus(target, 'PENDING', 'Build has started')

// We use the bitnami/node image since it comes with GCC 6.3
docker.image('bitnami/node:6').inside('-e HOME=/tmp') {
docker.image("bitnami/node:${nodeVersion}").inside('-e HOME=/tmp') {
sh "scripts/test.sh ${target}"
if(postStep) {
postStep.call()
Expand All @@ -249,7 +229,8 @@ def doDockerBuild(target, postStep = null) {
def doMacBuild(target, postStep = null) {
return {
node('osx_vegas') {
withEnv(['DEVELOPER_DIR=/Applications/Xcode-9.4.app/Contents/Developer']) {
withEnv(['DEVELOPER_DIR=/Applications/Xcode-9.4.app/Contents/Developer',
'REALM_SET_NVM_ALIAS=1']) {
doInside("./scripts/test.sh", target, postStep)
}
}
Expand All @@ -273,3 +254,29 @@ def doWindowsBuild() {
}
}
}

def packageNpmArchive() {
return {
node('docker && !aws') {
// Unstash the files in the repository
unstash 'source'
// Remove any archive from the workspace, which might have been produced by previous runs of the job
sh 'rm -f realm-*.tgz'
// TODO: Consider moving the node on the other side of the stages
docker.build(
'ci/realm-js:android-build',
'-f Dockerfile.android .'
).inside {
// Install dependencies
sh 'npm install'
// Publish the Android module
sh 'cd react-native/android && ./gradlew publishAndroid'
// Package up the app
sh 'npm pack'
// Archive and stash the package
archiveArtifacts 'realm-*.tgz'
stash includes: 'realm-*.tgz', name: 'package'
}
}
}
}
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -33,7 +33,6 @@ The API reference is located at [realm.io/docs/javascript/latest/api/](https://r
In case you don't want to use the precompiled version on npm, you can build Realm yourself from source. You’ll need an Internet connection the first time you build in order to download the core library.

Prerequisites:
- npm < 5.0 (due to symlinks not working)
- Xcode 7.2+
- Android SDK 23+
- [Android NDK 10e](https://developer.android.com/ndk/downloads/older_releases)
Expand Down
6 changes: 3 additions & 3 deletions dependencies.list
@@ -1,5 +1,5 @@
PACKAGE_NAME=realm-js
VERSION=2.23.0
REALM_CORE_VERSION=5.13.0
REALM_SYNC_VERSION=3.14.14
REALM_OBJECT_SERVER_VERSION=3.11.1
REALM_CORE_VERSION=5.14.0
REALM_SYNC_VERSION=3.15.0
REALM_OBJECT_SERVER_VERSION=3.17.1
2 changes: 2 additions & 0 deletions docs/collection.js
Expand Up @@ -16,6 +16,8 @@
//
////////////////////////////////////////////////////////////////////////////

/* eslint getter-return: "off" */

/**
* Abstract base class containing methods shared by {@link Realm.List} and {@link Realm.Results}.
*
Expand Down
22 changes: 12 additions & 10 deletions docs/permission.js
Expand Up @@ -16,6 +16,8 @@
//
////////////////////////////////////////////////////////////////////////////

/* eslint getter-return: "off" */

/**
* Objects of this class allow to change permissions of owned Realms.
* They are created exclusively by the client and are processed by the server
Expand All @@ -31,7 +33,7 @@
* @memberof Realm.Sync.User
*/
class PermissionChange {

/**
* Gets the unique identifier of this object in the Management realm.
* @type {string}
Expand All @@ -40,18 +42,18 @@ class PermissionChange {

/**
* Gets the creation time of this object.
* @type {Date}
* @type {Date}
*/
get createdAt() {}

/**
* Gets when the object was updated the last time.
* @type {Date}
* @type {Date}
*/
get updatedAt() {}

/**
*
*
*/
get statusCode() {}

Expand Down Expand Up @@ -116,18 +118,18 @@ class PermissionOffer {

/**
* Gets the creation time of this object.
* @type {Date}
* @type {Date}
*/
get createdAt() {}

/**
* Gets when the object was updated the last time.
* @type {Date}
* @type {Date}
*/
get updatedAt() {}

/**
*
*
*/
get statusCode() {}

Expand Down Expand Up @@ -197,18 +199,18 @@ class PermissionOfferResponse {

/**
* Gets the creation time of this object.
* @type {Date}
* @type {Date}
*/
get createdAt() {}

/**
* Gets when the object was updated the last time.
* @type {Date}
* @type {Date}
*/
get updatedAt() {}

/**
*
*
*/
get statusCode() {}

Expand Down
2 changes: 2 additions & 0 deletions docs/realm.js
Expand Up @@ -16,6 +16,8 @@
//
////////////////////////////////////////////////////////////////////////////

/* eslint getter-return: "off" */

/**
* A Realm instance represents a Realm database.
*
Expand Down

0 comments on commit 003f8b3

Please sign in to comment.