Skip to content

Commit 36aa9e2

Browse files
committed
Revert back to v11.0.2 for issue #37
1 parent 5c8fc86 commit 36aa9e2

File tree

8 files changed

+31
-46
lines changed

8 files changed

+31
-46
lines changed

Diff for: .github/ISSUE_TEMPLATE/config.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ blank_issues_enabled: false
22
contact_links:
33
- name: PureScript Discourse
44
url: https://discourse.purescript.org/
5-
about: Ask and answer questions here.
6-
- name: Functional Programming Slack
7-
url: https://functionalprogramming.slack.com
8-
about: For casual chat and questions (use https://fpchat-invite.herokuapp.com to join).
5+
about: Ask and answer questions on the PureScript discussion forum.
6+
- name: PureScript Discord
7+
url: https://purescript.org/chat
8+
about: Ask and answer questions on the PureScript chat.

Diff for: .travis.yml

-9
This file was deleted.

Diff for: CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## v11.0.2
6+
7+
Delete the `TypedArray` polyfill which was preventing this
8+
library from working with `purs bundle` v0.14.4.
9+
https://github.com/purescript-contrib/purescript-arraybuffer/issues/34
10+
511
## v11.0.0
612

713
Jorge Acereda has graciously donated this package to __purescript-contrib__.
@@ -28,3 +34,4 @@ to the type declarations in your own dependent code:
2834
* Replace any `BytesPerValue a b` typeclass constraints with `BytesPerType a`.
2935

3036
We have also privatized `Typed.part'`. https://github.com/purescript-contrib/purescript-arraybuffer/issues/32
37+

Diff for: README.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ spago install arraybuffer
4141
If you get stuck, there are several ways to get help:
4242

4343
- [Open an issue](https://github.com/purescript-contrib/purescript-arraybuffer/issues) if you have encountered a bug or problem.
44-
- [Search or start a thread on the PureScript Discourse](https://discourse.purescript.org) if you have general questions. You can also ask questions in the `#purescript` and `#purescript-beginners` channels on the [Functional Programming Slack](https://functionalprogramming.slack.com) ([invite link](https://fpchat-invite.herokuapp.com/)).
44+
- Ask general questions on the [PureScript Discourse](https://discourse.purescript.org) forum or the [PureScript Discord](https://purescript.org/chat) chat.
4545

4646
## Contributing
4747

@@ -53,6 +53,23 @@ You can contribute to `arraybuffer` in several ways:
5353

5454
3. If you have written a library, tutorial, guide, or other resource based on this package, please share it on the [PureScript Discourse](https://discourse.purescript.org)! Writing libraries and learning resources are a great way to help this library succeed.
5555

56+
## Usage
57+
58+
### Polyfill
59+
60+
This library relies on runtime implementations of
61+
[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)
62+
and
63+
[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)
64+
([Structured Data](https://tc39.es/ecma262/multipage/structured-data.html#sec-structured-data)),
65+
and
66+
[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)
67+
([Indexed Collections](https://tc39.es/ecma262/multipage/indexed-collections.html#sec-indexed-collections)).
68+
69+
If you want to be sure that those implementations are available in your target
70+
runtime environment, you might want to consider using a polyfill such as
71+
[__core-js__ Typed Arrays](https://github.com/zloirock/core-js#ecmascript-typed-arrays).
72+
5673
## Related packages
5774

5875
These are some other packages which provide more `ArrayBuffer` features.

Diff for: bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"output"
1515
],
1616
"dependencies": {
17-
"purescript-arraybuffer-types": "^v3.0.0",
17+
"purescript-arraybuffer-types": "^v3.0.1",
1818
"purescript-arrays": "^v6.0.1",
1919
"purescript-effect": "^v3.0.0",
2020
"purescript-float32": "^v1.0.0",

Diff for: package.json

-9
This file was deleted.

Diff for: packages.dhall

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
21
let upstream =
3-
https://github.com/purescript/package-sets/releases/download/psc-0.14.2-20210713/packages.dhall sha256:654c3148cb995f642c73b4508d987d9896e2ad3ea1d325a1e826c034c0d3cd7b
2+
https://github.com/purescript/package-sets/releases/download/psc-0.14.3-20210722/packages.dhall sha256:1ceb43aa59436bf5601bac45f6f3781c4e1f0e4c2b8458105b018e5ed8c30f8c
43

54
let overrides = {=}
65

76
let additions = {=}
87

98
in upstream // overrides // additions
10-

Diff for: src/Data/ArrayBuffer/Typed.js

-19
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
"use strict";
22

3-
4-
5-
// Lightweight polyfill for ie - see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Methods_Polyfill
6-
function polyFill () {
7-
var typedArrayTypes =
8-
[ Int8Array, Uint8Array, Uint8ClampedArray, Int16Array
9-
, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array
10-
];
11-
12-
for (var k in typedArrayTypes) {
13-
for (var v in Array.prototype) {
14-
if (Array.prototype.hasOwnProperty(v) && !typedArrayTypes[k].prototype.hasOwnProperty(v))
15-
typedArrayTypes[k].prototype[v] = Array.prototype[v];
16-
}
17-
}
18-
};
19-
20-
polyFill();
21-
223
// module Data.ArrayBuffer.Typed
234

245
exports.buffer = function buffer (v) {

0 commit comments

Comments
 (0)