You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Subresource Integrity (SRI) is a security feature that enables browsers to verify that files they fetch (for example, from a CDN) are delivered without unexpected manipulation. It works by allowing you to provide a cryptographic hash that a fetched file must match
107
+
108
+
To obtain sri hashes for filestack-js library check manifest.json file on CDN:
The `package.json` specifies two separate modules:
74
132
@@ -79,8 +137,13 @@ Node projects which depend on filestack-js will follow the `main` field in `pack
79
137
80
138
The pre-bundled browser module is also available in UMD format. This is useful if you are using script tags on a web page instead of bundling your application. It can be retrieved from both the Filestack CDN and the unpkg CDN:
This library requires an environment that implements the [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) object spec.
124
-
If you target IE11 or iOS before 8.0 you will need to add a `Promise` polyfill to your page or application.
183
+
If you target IE11 or iOS before 8.0 you will need to add a `Promise`and `Symbol`polyfill to your page or application.
Most tests in this library are expected to interface with actual backend services. Because we like to run tests during development, these services are mocked
137
-
during unit testing.
195
+
Most tests in this library are expected to interface with actual backend services. Because we like to run tests during development, these services are mocked during unit testing.
138
196
139
-
All tests are using Mocha. Browser tests are run with Karma.
197
+
All tests are using Jest.
140
198
141
199
To run units:
142
200
143
201
```
144
202
npm test
145
203
```
146
204
147
-
To run integration tests:
205
+
## Debugging
148
206
149
-
```
150
-
npm run test:integration
207
+
Filestack-js uses [`debug`](https://github.com/visionmedia/debug), so just run with environmental variable `DEBUG` set to `fs.*`.
208
+
209
+
### Node
210
+
```js
211
+
DEBUG=fs.* node example_upload.js
151
212
```
152
213
153
-
Integration tests require a `.env` file in the root of your project with the following fields:
214
+
### Browser
215
+
Debug's enable state is persisted by localStorage
154
216
217
+
```js
218
+
localStorage.debug='fs:*'
155
219
```
156
-
BROWSERSTACK_USERNAME=
157
-
BROWSERSTACK_ACCESS_KEY=
158
-
TEST_APIKEY=
159
-
TEST_CLOUD_APIKEY=
160
-
TEST_INTELLIGENT_APIKEY=
161
-
TEST_SECURE_APIKEY=
162
-
TEST_SIGNATURE=
163
-
TEST_POLICY=
164
-
TEST_FILELINK=
165
-
TEST_SECURE_FILELINK=
166
-
```
167
220
168
-
You will need to acquire this data from a Filestack developer if you plan on running the integration suite.
221
+
And then refresh the page.
222
+
223
+
## Versioning
224
+
225
+
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags](https://github.com/filestack/filestack-js/tags) on this repository.
0 commit comments