diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0c6273e..4991999 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Added
+- default to JSAPI 4.24; update docs w/ latest version numbers - @gavinr
+
### Changed
- fix build by not compiling @types
- update TypeScript and karma-typescript dependencies
diff --git a/README.md b/README.md
index 2f96a63..6d254ed 100644
--- a/README.md
+++ b/README.md
@@ -109,9 +109,9 @@ For example, the snippet below configures esri-loader to use the [latest 3.x rel
// app.js
import { setDefaultOptions } from 'esri-loader';
-// configure esri-loader to use version 3.40 from the ArcGIS CDN
+// configure esri-loader to use version 3.41 from the ArcGIS CDN
// NOTE: make sure this is called once before any calls to loadModules()
-setDefaultOptions({ version: '3.40' })
+setDefaultOptions({ version: '3.41' })
```
Then later, for example after a map component has mounted, you would use `loadModules()` as normal, except in this case you'd be using the [3.x `Map` class](https://developers.arcgis.com/javascript/3/jsapi/map-amd.html) instead of the 4.x classes.
@@ -195,7 +195,7 @@ import { loadCss } from 'esri-loader';
loadCss();
// or for a specific CDN version
-loadCss('3.40');
+loadCss('3.41');
// or a from specific URL, like a locally hosted version
loadCss('http://server/path/to/esri/css/main.css');
@@ -398,7 +398,7 @@ As mentioned above, you can call `setDefaultOptions()` to configure [how esri-lo
| Name | Type | Default Value | Description |
| ----------------- | --------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `version` | `string` | `'4.23'` | The version of the ArcGIS API hosted on Esri's CDN to use. |
+| `version` | `string` | `'4.24'` | The version of the ArcGIS API hosted on Esri's CDN to use. |
| `url` | `string` | `undefined` | The URL to a hosted build of the ArcGIS API to use. If both `version` and `url` are passed, `url` will be used. |
| `css` | `string` or `boolean` | `undefined` | If a `string` is passed it is assumed to be the URL of a CSS file to load. Use `css: true` to load the `version`'s CSS from the CDN. |
| `insertCssBefore` | `string` | `undefined` | When using `css`, the `` to the stylesheet will be inserted before the first element that matches this [CSS Selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors). See [Overriding ArcGIS Styles](#overriding-arcgis-styles). |
@@ -412,9 +412,9 @@ If your application only has a single call to `loadModules()`, you do not need `
```js
import { loadModules } from 'esri-loader';
-// configure esri-loader to use version 3.40
+// configure esri-loader to use version 3.41
// and the CSS for that version from the ArcGIS CDN
-const options = { version: '3.40', css: true };
+const options = { version: '3.41', css: true };
loadModules(['esri/map'], options)
.then(([Map]) => {
@@ -509,7 +509,7 @@ It is possible to use this library only to load modules (i.e. not to lazy load o
```html
-
+
```
### Without a module bundler
diff --git a/src/script.test.ts b/src/script.test.ts
index 7fa26c8..442e98c 100644
--- a/src/script.test.ts
+++ b/src/script.test.ts
@@ -57,7 +57,7 @@ describe('when loading the script', function() {
});
});
it('should default to latest version', function() {
- expect(scriptEl.src).toEqual('https://js.arcgis.com/4.23/');
+ expect(scriptEl.src).toEqual('https://js.arcgis.com/4.24/');
});
it('should not have called loadCss', function() {
expect((cssUtils.loadCss as jasmine.Spy).calls.any()).toBeFalsy();
@@ -94,12 +94,12 @@ describe('when loading the script', function() {
});
});
describe('with a specific version from the CDN', function() {
- const expected = 'https://js.arcgis.com/3.40/';
+ const expected = 'https://js.arcgis.com/3.41/';
let scriptEl;
beforeAll(function(done) {
fakeLoading();
loadScript({
- version: '3.40'
+ version: '3.41'
})
.then((script) => {
// hold onto script element for assertions below
@@ -145,7 +145,7 @@ describe('when loading the script', function() {
});
});
describe('with a specific version from the CDN', () => {
- const version = '3.40';
+ const version = '3.41';
beforeAll(function(done) {
fakeLoading();
loadScript({
diff --git a/src/utils/css.test.ts b/src/utils/css.test.ts
index 04e8fa9..f7d1e2a 100644
--- a/src/utils/css.test.ts
+++ b/src/utils/css.test.ts
@@ -2,7 +2,7 @@ import { loadCss } from './css';
describe('when loading the css', () => {
describe('with no arguments', () => {
- const url = 'https://js.arcgis.com/4.23/esri/themes/light/main.css';
+ const url = 'https://js.arcgis.com/4.24/esri/themes/light/main.css';
let link;
beforeAll(() => {
spyOn(document.head, 'appendChild').and.stub();
@@ -75,7 +75,7 @@ describe('when loading the css', () => {
});
describe('when called twice', () => {
describe('when loading the same url', () => {
- const url = 'https://js.arcgis.com/4.23/esri/themes/light/main.css';
+ const url = 'https://js.arcgis.com/4.24/esri/themes/light/main.css';
let link;
let link2;
beforeAll(() => {
@@ -93,7 +93,7 @@ describe('when loading the css', () => {
});
});
describe('when inserting before an existing node', () => {
- const url = 'https://js.arcgis.com/4.23/esri/themes/light/main.css';
+ const url = 'https://js.arcgis.com/4.24/esri/themes/light/main.css';
// insert before the first