Skip to content

Commit e69ecd4

Browse files
committed
remove broken CDNs [ci skip]
1 parent 0f0b3de commit e69ecd4

File tree

10 files changed

+37
-50
lines changed

10 files changed

+37
-50
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ port calculations to web apps; automate common spreadsheet tasks, and much more!
1313
[![Build Status](https://img.shields.io/github/workflow/status/sheetjs/sheetjs/Tests:%20node.js)](https://github.com/SheetJS/sheetjs/actions)
1414
[![Snyk Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/SheetJS/sheetjs)](https://snyk.io/test/github/SheetJS/sheetjs)
1515
[![npm Downloads](https://img.shields.io/npm/dm/xlsx.svg)](https://npmjs.org/package/xlsx)
16-
[![jsDelivr Downloads](https://data.jsdelivr.com/v1/package/npm/xlsx/badge)](https://www.jsdelivr.com/package/npm/xlsx)
1716
[![Analytics](https://ga-beacon.appspot.com/UA-36810333-1/SheetJS/sheetjs?pixel)](https://github.com/SheetJS/sheetjs)
1817

1918
[**Browser Test and Support Matrix**](https://oss.sheetjs.com/sheetjs/tests/)
@@ -134,7 +133,6 @@ can be directly added to a page with a `script` tag:
134133
| `unpkg` | <https://unpkg.com/xlsx/> |
135134
| `jsDelivr` | <https://jsdelivr.com/package/npm/xlsx> |
136135
| `CDNjs` | <https://cdnjs.com/libraries/xlsx> |
137-
| `packd` | <https://bundle.run/xlsx@latest?name=XLSX> |
138136

139137
For example, `unpkg` makes the latest version available at:
140138

@@ -195,14 +193,14 @@ set_cptable(cptable);
195193

196194
**Deno**
197195

198-
The [`sheetjs`](https://deno.land/x/sheetjs) package is hosted by Deno:
196+
`xlsx.mjs` can be imported in Deno. It is available from `unpkg`:
199197

200198
```ts
201-
// @deno-types="https://deno.land/x/sheetjs/types/index.d.ts"
202-
import * as XLSX from 'https://deno.land/x/sheetjs/xlsx.mjs'
199+
// @deno-types="https://unpkg.com/xlsx/types/index.d.ts"
200+
import * as XLSX from 'https://unpkg.com/xlsx/xlsx.mjs';
203201

204202
/* load the codepage support library for extended support with older formats */
205-
import * as cptable from 'https://deno.land/x/sheetjs/dist/cpexcel.full.mjs';
203+
import * as cptable from 'https://unpkg.com/xlsx/dist/cpexcel.full.mjs';
206204
XLSX.set_cptable(cptable);
207205
```
208206

demos/deno/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TESTS= x mjs jspm
1+
TESTS= x mjs
22
UNSTABLE= node
33
TEST_FILES=number_format_greek.xls
44

demos/deno/README.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,28 @@
33
Deno is a runtime capable of running JS code including this library. There are
44
a few different builds and recommended use cases as covered in this demo.
55

6-
For user code, [the `sheetjs` module](https://deno.land/x/sheetjs) can be used.
6+
Due to ongoing stability and sync issues with the Deno registry, scripts should
7+
use [the `unpkg` CDN build](https://unpkg.com/xlsx/xlsx.mjs):
8+
9+
```js
10+
// @deno-types="https://unpkg.com/xlsx/types/index.d.ts"
11+
import * as XLSX from 'https://unpkg.com/xlsx/xlsx.mjs';
12+
13+
/* load the codepage support library for extended support with older formats */
14+
import * as cptable from 'https://unpkg.com/xlsx/dist/cpexcel.full.mjs';
15+
XLSX.set_cptable(cptable);
16+
```
17+
718

819
## Reading and Writing Files
920

1021
In general, the command-line flag `--allow-read` must be passed to enable file
1122
reading. The flag `--allow-write` must be passed to enable file writing.
1223

13-
Starting in version 0.18.1, this library will check for the `Deno` global and
14-
use `Deno.readFileSync` and `Deno.writeFileSync` behind the scenes.
15-
16-
For older versions, the API functions must be called from user code.
17-
1824
_Reading a File_
1925

2026
```ts
21-
const filedata = Deno.readFileSync("test.xlsx");
22-
const workbook = XLSX.read(filedata, {type: "buffer"});
23-
/* DO SOMETHING WITH workbook HERE */
27+
const workbook = XLSX.readFile("test.xlsx");
2428
```
2529

2630
_Writing a File_
@@ -30,9 +34,7 @@ Older versions of the library did not properly detect features from Deno, so the
3034
not handle byte arrays, user code must generate a `Uint8Array` first:
3135

3236
```ts
33-
const buf = XLSX.write(workbook, {type: "buffer", bookType: "xlsb"});
34-
const u8: Uint8Array = new Uint8Array(buf);
35-
Deno.writeFileSync("test.xlsb", u8);
37+
XLSX.writeFile(workbook, "test.xlsb");
3638
```
3739

3840
## Demos
@@ -60,8 +62,8 @@ accepts the `XLSX` module as an argument.
6062
- `x` imports the ESM build without the codepage library:
6163

6264
```ts
63-
// @deno-types="https://deno.land/x/sheetjs/types/index.d.ts"
64-
import * as XLSX from 'https://deno.land/x/sheetjs/xlsx.mjs';
65+
// @deno-types="https://unpkg.com/xlsx/types/index.d.ts"
66+
import * as XLSX from 'https://unpkg.com/xlsx/xlsx.mjs';
6567
```
6668

6769
- `mjs` imports the ESM build and the associated codepage library:
@@ -73,12 +75,6 @@ import * as cptable from '../../dist/cptable.full.mjs';
7375
XLSX.set_cptable(cptable);
7476
```
7577

76-
- `jspm` imports the browser standalone script using JSPM:
77-
78-
```ts
79-
import * as XLSX from 'https://jspm.dev/npm:xlsx!cjs';
80-
```
81-
8278
- `node` uses the node compatibility layer:
8379

8480
```ts

demos/deno/jspm.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

demos/deno/sheet2csv.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */
2-
// @deno-types="https://deno.land/x/sheetjs/types/index.d.ts"
3-
import * as XLSX from 'https://deno.land/x/sheetjs/xlsx.mjs';
4-
import * as cptable from 'https://deno.land/x/sheetjs/dist/cpexcel.full.mjs';
2+
// @deno-types="https://unpkg.com/xlsx/types/index.d.ts"
3+
import * as XLSX from 'https://unpkg.com/xlsx/xlsx.mjs';
4+
import * as cptable from 'https://unpkg.com/xlsx/dist/cpexcel.full.mjs';
55
XLSX.set_cptable(cptable);
66

77
const filename = Deno.args[0];

demos/deno/x.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import * as XLSX from 'https://deno.land/x/sheetjs/xlsx.mjs';
1+
// @deno-types="https://unpkg.com/xlsx/types/index.d.ts"
2+
import * as XLSX from 'https://unpkg.com/xlsx/xlsx.mjs';
23

34
import doit from './doit.ts';
45
doit(XLSX, "x");

demos/server/drash.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */
2-
// @deno-types="https://deno.land/x/sheetjs/types/index.d.ts"
3-
import { read, utils, set_cptable } from 'https://deno.land/x/sheetjs@v0.18.3/xlsx.mjs';
4-
import * as cptable from 'https://deno.land/x/sheetjs/dist/cpexcel.full.mjs';
2+
// @deno-types="https://unpkg.com/xlsx/types/index.d.ts"
3+
import { read, utils, set_cptable } from 'https://unpkg.com/xlsx/xlsx.mjs';
4+
import * as cptable from 'https://unpkg.com/xlsx/dist/cpexcel.full.mjs';
55
set_cptable(cptable);
66

77
import * as Drash from "https://deno.land/x/drash@v2.5.4/mod.ts";

docbits/00_intro.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ port calculations to web apps; automate common spreadsheet tasks, and much more!
1313
[![Build Status](https://img.shields.io/github/workflow/status/sheetjs/sheetjs/Tests:%20node.js)](https://github.com/SheetJS/sheetjs/actions)
1414
[![Snyk Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/SheetJS/sheetjs)](https://snyk.io/test/github/SheetJS/sheetjs)
1515
[![npm Downloads](https://img.shields.io/npm/dm/xlsx.svg)](https://npmjs.org/package/xlsx)
16-
[![jsDelivr Downloads](https://data.jsdelivr.com/v1/package/npm/xlsx/badge)](https://www.jsdelivr.com/package/npm/xlsx)
1716
[![Analytics](https://ga-beacon.appspot.com/UA-36810333-1/SheetJS/sheetjs?pixel)](https://github.com/SheetJS/sheetjs)
1817

1918
[**Browser Test and Support Matrix**](https://oss.sheetjs.com/sheetjs/tests/)

docbits/10_install.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ can be directly added to a page with a `script` tag:
1919
| `unpkg` | <https://unpkg.com/xlsx/> |
2020
| `jsDelivr` | <https://jsdelivr.com/package/npm/xlsx> |
2121
| `CDNjs` | <https://cdnjs.com/libraries/xlsx> |
22-
| `packd` | <https://bundle.run/xlsx@latest?name=XLSX> |
2322

2423
For example, `unpkg` makes the latest version available at:
2524

@@ -80,14 +79,14 @@ set_cptable(cptable);
8079

8180
**Deno**
8281

83-
The [`sheetjs`](https://deno.land/x/sheetjs) package is hosted by Deno:
82+
`xlsx.mjs` can be imported in Deno. It is available from `unpkg`:
8483

8584
```ts
86-
// @deno-types="https://deno.land/x/sheetjs/types/index.d.ts"
87-
import * as XLSX from 'https://deno.land/x/sheetjs/xlsx.mjs'
85+
// @deno-types="https://unpkg.com/xlsx/types/index.d.ts"
86+
import * as XLSX from 'https://unpkg.com/xlsx/xlsx.mjs';
8887

8988
/* load the codepage support library for extended support with older formats */
90-
import * as cptable from 'https://deno.land/x/sheetjs/dist/cpexcel.full.mjs';
89+
import * as cptable from 'https://unpkg.com/xlsx/dist/cpexcel.full.mjs';
9190
XLSX.set_cptable(cptable);
9291
```
9392

misc/docs/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ port calculations to web apps; automate common spreadsheet tasks, and much more!
1313
[![Build Status](https://img.shields.io/github/workflow/status/sheetjs/sheetjs/Tests:%20node.js)](https://github.com/SheetJS/sheetjs/actions)
1414
[![Snyk Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/SheetJS/sheetjs)](https://snyk.io/test/github/SheetJS/sheetjs)
1515
[![npm Downloads](https://img.shields.io/npm/dm/xlsx.svg)](https://npmjs.org/package/xlsx)
16-
[![jsDelivr Downloads](https://data.jsdelivr.com/v1/package/npm/xlsx/badge)](https://www.jsdelivr.com/package/npm/xlsx)
1716
[![Analytics](https://ga-beacon.appspot.com/UA-36810333-1/SheetJS/sheetjs?pixel)](https://github.com/SheetJS/sheetjs)
1817

1918
[**Browser Test and Support Matrix**](https://oss.sheetjs.com/sheetjs/tests/)
@@ -129,7 +128,6 @@ can be directly added to a page with a `script` tag:
129128
| `unpkg` | <https://unpkg.com/xlsx/> |
130129
| `jsDelivr` | <https://jsdelivr.com/package/npm/xlsx> |
131130
| `CDNjs` | <https://cdnjs.com/libraries/xlsx> |
132-
| `packd` | <https://bundle.run/xlsx@latest?name=XLSX> |
133131

134132
For example, `unpkg` makes the latest version available at:
135133

@@ -186,14 +184,14 @@ set_cptable(cptable);
186184

187185
**Deno**
188186

189-
The [`sheetjs`](https://deno.land/x/sheetjs) package is hosted by Deno:
187+
`xlsx.mjs` can be imported in Deno. It is available from `unpkg`:
190188

191189
```ts
192-
// @deno-types="https://deno.land/x/sheetjs/types/index.d.ts"
193-
import * as XLSX from 'https://deno.land/x/sheetjs/xlsx.mjs'
190+
// @deno-types="https://unpkg.com/xlsx/types/index.d.ts"
191+
import * as XLSX from 'https://unpkg.com/xlsx/xlsx.mjs';
194192

195193
/* load the codepage support library for extended support with older formats */
196-
import * as cptable from 'https://deno.land/x/sheetjs/dist/cpexcel.full.mjs';
194+
import * as cptable from 'https://unpkg.com/xlsx/dist/cpexcel.full.mjs';
197195
XLSX.set_cptable(cptable);
198196
```
199197

0 commit comments

Comments
 (0)