Skip to content

Commit

Permalink
[NO-ISSUE] Deno upgrade and Deno Registry v2 fixes (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
asos-craigmorten authored Aug 3, 2020
1 parent f4787d0 commit f9fbb9d
Show file tree
Hide file tree
Showing 12 changed files with 86 additions and 70 deletions.
6 changes: 6 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ChangeLog

## [2.1.0] - 03-08-2020

- chore: upgrade supported Deno and std module versions to `1.2.2` and `0.63.0`.
- chore: fix modules to tagged versions as [commits and branches are no longer supported by Deno registry](https://deno.land/posts/registry2).
- chore: automate typescript docs

## [2.0.0] - 16-07-2020

- feat: update to Deno `1.2.0` (breaking upgrade), std `0.61.0` and other dep upgrades.
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish TypeDocs

on:
push:
branches: [main]

jobs:
publish-docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install deps
run: make deps
- name: Use Deno
uses: denolib/setup-deno@v2
with:
deno-version: 1.2.2
- run: make typedoc
- run: make ci
- name: Publish Updated Type Docs
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: publish typedocs
push_options: --force
6 changes: 3 additions & 3 deletions .github/workflows/publish-egg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: denolib/setup-deno@master
- uses: denolib/setup-deno@v2
with:
deno-version: 1.1.3
- run: deno install -A -f --unstable -n eggs https://x.nest.land/eggs@0.1.8/mod.ts
deno-version: 1.2.2
- run: deno install -A -f --unstable -n eggs https://x.nest.land/eggs@0.2.1/mod.ts
- run: |
export PATH="/home/runner/.deno/bin:$PATH"
eggs link --key ${NEST_LAND_KEY}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:

strategy:
matrix:
deno-version: [1.2.0]
deno-version: [1.2.2]

steps:
- uses: actions/checkout@v2
- name: Use Deno ${{ matrix.deno-version }}
uses: denolib/setup-deno@master
uses: denolib/setup-deno@v2
with:
deno-version: ${{ matrix.deno-version }}
- run: make ci
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: build ci doc fmt fmt-check lock precommit test typedoc
.PHONY: build ci deps doc fmt fmt-check lint lock precommit test typedoc

build:
@deno run --lock=lock.json --reload mod.ts
Expand All @@ -8,6 +8,9 @@ ci:
@make build
@make test

deps:
@npm install -g typescript typedoc

doc:
@deno doc ./mod.ts

Expand All @@ -17,6 +20,9 @@ fmt:
fmt-check:
@deno fmt --check

lint:
@deno lint --unstable

lock:
@deno run --lock=lock.json --lock-write --reload mod.ts

Expand All @@ -30,5 +36,9 @@ test:
@deno test --allow-net --allow-read --allow-env

typedoc:
@typedoc --ignoreCompilerErrors --out ./docs --mode modules --includeDeclarations --excludeExternals ./src
@rm -rf docs
@typedoc --ignoreCompilerErrors --out ./docs --mode modules --includeDeclarations --excludeExternals --name superdeno ./src
@make fmt
@make fmt
@echo 'future: true\nencoding: "UTF-8"\ninclude:\n - "_*_.html"\n - "_*_.*.html"' > ./docs/_config.yaml

10 changes: 5 additions & 5 deletions deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ export {
HTTPOptions,
Server,
Response,
} from "https://deno.land/std@0.61.0/http/server.ts";
export { STATUS_TEXT } from "https://deno.land/std@0.61.0/http/http_status.ts";
export { assertEquals } from "https://deno.land/std@0.61.0/testing/asserts.ts";
export { methods } from "https://deno.land/x/opine@0.19.1/src/methods.ts";
export { mergeDescriptors } from "https://deno.land/x/opine@0.19.1/src/utils/mergeDescriptors.ts";
} from "https://deno.land/std@0.63.0/http/server.ts";
export { STATUS_TEXT } from "https://deno.land/std@0.63.0/http/http_status.ts";
export { assertEquals } from "https://deno.land/std@0.63.0/testing/asserts.ts";
export { methods } from "https://deno.land/x/opine@0.20.0/src/methods.ts";
export { mergeDescriptors } from "https://deno.land/x/opine@0.20.0/src/utils/mergeDescriptors.ts";
// TODO: import these as production modules
export { default as util } from "https://dev.jspm.io/npm:util@0.12.3";
export { default as superagent } from "https://dev.jspm.io/npm:superagent@5.3.1";
9 changes: 3 additions & 6 deletions docs/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,8 @@
e.Vector.prototype.upsert = function (e, t, r) {
this._magnitude = 0;
var i = this.positionForIndex(e);
this.elements[i] == e
? this.elements[i + 1] = r(this.elements[i + 1], t)
: this.elements.splice(i, 0, e, t);
this.elements[i] == e ? this.elements[i + 1] = r(this.elements[i + 1], t)
: this.elements.splice(i, 0, e, t);
},
e.Vector.prototype.magnitude = function () {
if (this._magnitude) return this._magnitude;
Expand Down Expand Up @@ -963,9 +962,7 @@
for (var f = 0; f < c.length; f++) {
var p = c[f];
if (
null == d[p] && (d[p] = 0),
d[p] += 1,
null == this.invertedIndex[p]
null == d[p] && (d[p] = 0), d[p] += 1, null == this.invertedIndex[p]
) {
var y = Object.create(null);
y._index = this.termIndex, this.termIndex += 1;
Expand Down
2 changes: 1 addition & 1 deletion egg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "superdeno",
"description": "HTTP assertions for Deno made easy via superagent.",
"version": "2.0.0",
"version": "2.1.0",
"repository": "https://github.com/asos-craigmorten/superdeno",
"stable": true,
"files": [
Expand Down
35 changes: 18 additions & 17 deletions lock.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
{
"https://deno.land/std@0.61.0/_util/assert.ts": "e1f76e77c5ccb5a8e0dbbbe6cce3a56d2556c8cb5a9a8802fc9565af72462149",
"https://deno.land/std@0.61.0/async/deferred.ts": "ac95025f46580cf5197928ba90995d87f26e202c19ad961bc4e3177310894cdc",
"https://deno.land/std@0.61.0/async/delay.ts": "35957d585a6e3dd87706858fb1d6b551cb278271b03f52c5a2cb70e65e00c26a",
"https://deno.land/std@0.61.0/async/mod.ts": "bf46766747775d0fc4070940d20d45fb311c814989485861cdc8a8ef0e3bbbab",
"https://deno.land/std@0.61.0/async/mux_async_iterator.ts": "f6ca1b70f05e3cb676956d70a3230c99925288cf67e4e0b0bbaf34759b41945b",
"https://deno.land/std@0.61.0/bytes/mod.ts": "b1a149ac741728db00bda9ce1a2d044f248edd5ac95e708a6cc501bfd3adb4a7",
"https://deno.land/std@0.61.0/encoding/utf8.ts": "8654fa820aa69a37ec5eb11908e20b39d056c9bf1c23ab294303ff467f3d50a1",
"https://deno.land/std@0.61.0/fmt/colors.ts": "06444b6ebc3842a4b2340d804bfa81fc5452a03513cbb81bd7f6bf8f4b8f3ac4",
"https://deno.land/std@0.61.0/http/_io.ts": "7a31bf7d0167685d8d0ff4eca93b558cd26539695d1ddbd715ee28bf1dc7db17",
"https://deno.land/std@0.61.0/http/http_status.ts": "0ecc0799a208f49452023b1b927106ba5a2c13cc6cf6666345db028239d554ab",
"https://deno.land/std@0.61.0/http/server.ts": "3bae933acb2645d863f0f87a91070d2478ad24b828ce27936711377426896b29",
"https://deno.land/std@0.61.0/io/bufio.ts": "dd1fc575524fe8b44e128091ba0e6833be7d0966336ef12a407544440b762e17",
"https://deno.land/std@0.61.0/testing/asserts.ts": "e12228748a139acfbf00c3ef6022fefd9fc265d7c2034368bad2cd80099c76df",
"https://deno.land/std@0.61.0/testing/diff.ts": "77338e2b479626c096278d7b4a95f750753ee39558f314db6b794e8d8a98d515",
"https://deno.land/std@0.61.0/textproto/mod.ts": "ee6bad9818d3fb44ecb2e0bbf9fc5b6a871fb332145800c54f732bf805dddff2",
"https://deno.land/x/opine@0.19.1/src/methods.ts": "5dba355af605dbb55a5f02c417786afc2a07018bffc3a4bec1e7066d4fe16c7d",
"https://deno.land/x/opine@0.19.1/src/utils/mergeDescriptors.ts": "e61d541bb6eeeb651f051accbe935fbbdddcb4c1d382994099b4fddf29d10d02",
"https://deno.land/std@0.63.0/_util/assert.ts": "e1f76e77c5ccb5a8e0dbbbe6cce3a56d2556c8cb5a9a8802fc9565af72462149",
"https://deno.land/std@0.63.0/async/deferred.ts": "ac95025f46580cf5197928ba90995d87f26e202c19ad961bc4e3177310894cdc",
"https://deno.land/std@0.63.0/async/delay.ts": "35957d585a6e3dd87706858fb1d6b551cb278271b03f52c5a2cb70e65e00c26a",
"https://deno.land/std@0.63.0/async/mod.ts": "39f2602a005805dd1e6b9da4ee5391b14d15e8fec4fa5494a6165c599911d746",
"https://deno.land/std@0.63.0/async/mux_async_iterator.ts": "1352b10a5cee1821a963eb8f4f05603bd7e25f8886eaf8d1888f4b416ddccdf5",
"https://deno.land/std@0.63.0/async/pool.ts": "a499691231d8c249f044f69d204b479ad3af7f115e0b37342829eff076bc2450",
"https://deno.land/std@0.63.0/bytes/mod.ts": "b1a149ac741728db00bda9ce1a2d044f248edd5ac95e708a6cc501bfd3adb4a7",
"https://deno.land/std@0.63.0/encoding/utf8.ts": "8654fa820aa69a37ec5eb11908e20b39d056c9bf1c23ab294303ff467f3d50a1",
"https://deno.land/std@0.63.0/fmt/colors.ts": "eb606cfb06e3f03a0222f09768a9701de2dd31c1fc8fa3a939137792a472962a",
"https://deno.land/std@0.63.0/http/_io.ts": "a6108623563611e901b1128ca91aca02982af552aa7c4f39f2240cf6e6cd9ac7",
"https://deno.land/std@0.63.0/http/http_status.ts": "0ecc0799a208f49452023b1b927106ba5a2c13cc6cf6666345db028239d554ab",
"https://deno.land/std@0.63.0/http/server.ts": "9f39d814950c741e0dcf0dfb9a046515f5fb342a62fbc28607c44ac5692e8a7e",
"https://deno.land/std@0.63.0/io/bufio.ts": "e76c5b7bf978a638aae6f62b87efde3ab7203b85902ce9b84ac8388c8c2bb104",
"https://deno.land/std@0.63.0/testing/asserts.ts": "1e9f87e0ecc456caa00a95f3345c5a7aeea0a4bf25c443a54341d9f6e36e5edf",
"https://deno.land/std@0.63.0/testing/diff.ts": "b685fb818c3527f0890628711934863672de2e94f01db421731654243f1eac8f",
"https://deno.land/std@0.63.0/textproto/mod.ts": "ebd84342f62216af1850279d32581c51d0958e36d477c6c26c961987e6240356",
"https://deno.land/x/opine@0.20.0/src/methods.ts": "5dba355af605dbb55a5f02c417786afc2a07018bffc3a4bec1e7066d4fe16c7d",
"https://deno.land/x/opine@0.20.0/src/utils/mergeDescriptors.ts": "e61d541bb6eeeb651f051accbe935fbbdddcb4c1d382994099b4fddf29d10d02",
"https://dev.jspm.io/npm:@jspm/core@1.1.1/nodelibs/chunk-0c2d1322.js": "3eed4c7a6cf097af01d9102b533f5a00f12163316eee6aa9c5c83e8b2adb24e5",
"https://dev.jspm.io/npm:@jspm/core@1.1.1/nodelibs/process.js": "9f0a862b551c5c13b46cd32b50ab8f18a95bdd943ac54292ed087c3590b2de4a",
"https://dev.jspm.io/npm:@jspm/core@1/nodelibs/process.js": "a9b37603d48c1d4117bd0b778b84ddab867d67e8ac8ff87ad71fccf72cdc615d",
Expand Down
11 changes: 5 additions & 6 deletions test/deps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export { expect } from "https://deno.land/x/expect@285caf/mod.ts";
export * as Opine from "https://deno.land/x/opine@0.19.1/mod.ts";
export * as OpineTypes from "https://deno.land/x/opine@0.19.1/src/types.ts";
export * as Oak from "https://deno.land/x/oak@2f7643a/mod.ts";
// export * as Ako from "https://deno.land/x/ako@28f7f4b/mod.ts";
export { dirname, join } from "https://deno.land/std@0.61.0/path/mod.ts";
export { expect } from "https://deno.land/x/expect@v0.2.1/mod.ts";
export * as Opine from "https://deno.land/x/opine@0.20.0/mod.ts";
export * as OpineTypes from "https://deno.land/x/opine@0.20.0/src/types.ts";
export * as Oak from "https://deno.land/x/oak@v6.0.1/mod.ts";
export { dirname, join } from "https://deno.land/std@0.63.0/path/mod.ts";
26 changes: 0 additions & 26 deletions test/supertest.ako.test.ts

This file was deleted.

4 changes: 2 additions & 2 deletions version.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Version of Opine.
*/
export const VERSION: string = "2.0.0";
export const VERSION: string = "2.1.0";

/**
* Supported versions of Deno.
*/
export const DENO_SUPPORTED_VERSIONS: string[] = ["1.2.0"];
export const DENO_SUPPORTED_VERSIONS: string[] = ["1.2.2"];

0 comments on commit f9fbb9d

Please sign in to comment.