From 42f1af6bd22c1611d6a63ce84f23f0c1211efd1b Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Tue, 5 Mar 2024 11:30:17 +1100 Subject: [PATCH] chore: remove npm build --- .github/workflows/ci.yml | 6 ---- .gitignore | 2 -- _build_npm.ts | 63 ---------------------------------------- deno.json | 2 -- 4 files changed, 73 deletions(-) delete mode 100755 _build_npm.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0553bd64..1c74b265 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,12 +22,6 @@ jobs: - name: run tests generating coverage run: deno task test:coverage - - - name: run tests no check - run: deno task test:no-check - - - name: test build for Node.js - run: deno task build - name: generate lcov run: deno task coverage > cov.lcov diff --git a/.gitignore b/.gitignore index 9fcd62e2..4be7d742 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ !.vscode .tool-versions -oak.bundle.js cov.lcov cov/ -npm/ \ No newline at end of file diff --git a/_build_npm.ts b/_build_npm.ts deleted file mode 100755 index 0d9a5351..00000000 --- a/_build_npm.ts +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env -S deno run --allow-read --allow-write --allow-net --allow-env --allow-run -// Copyright 2018-2024 the oak authors. All rights reserved. MIT license. - -/** - * This is the build script for building the oak framework into a Node.js - * compatible npm package. - * - * @module - */ - -import { build, emptyDir } from "https://deno.land/x/dnt@0.40.0/mod.ts"; -import { copy } from "https://deno.land/std@0.218.2/fs/copy.ts"; - -async function start() { - await emptyDir("./npm"); - await copy("fixtures", "npm/esm/fixtures", { overwrite: true }); - await copy("fixtures", "npm/script/fixtures", { overwrite: true }); - - await build({ - entryPoints: ["./mod.ts"], - outDir: "./npm", - shims: { - blob: true, - crypto: true, - deno: true, - undici: true, - }, - test: true, - typeCheck: false, - compilerOptions: { - importHelpers: true, - target: "ES2022", - lib: ["ESNext", "DOM", "DOM.Iterable"], - }, - package: { - name: "@oakserver/oak", - version: Deno.args[0], - description: "A middleware framework for handling HTTP requests", - license: "MIT", - engines: { - node: ">=16.5.0 <22", - }, - repository: { - type: "git", - url: "git+https://github.com/oakserver/oak.git", - }, - bugs: { - url: "https://github.com/oakserver/oak/issues", - }, - dependencies: { - "tslib": "~2.6.2", - }, - devDependencies: { - "@types/node": "^20", - }, - }, - }); - - await Deno.copyFile("LICENSE", "npm/LICENSE"); - await Deno.copyFile("README.md", "npm/README.md"); -} - -start(); diff --git a/deno.json b/deno.json index ef8e393f..2b2a929a 100644 --- a/deno.json +++ b/deno.json @@ -17,11 +17,9 @@ "./testing": "./testing.ts" }, "tasks": { - "build": "deno run --allow-read --allow-write --allow-net --allow-env --allow-run _build_npm.ts", "coverage": "deno coverage --lcov ./cov", "example": "deno run --allow-net examples/echoServer.ts", "test": "deno test --allow-read --allow-write --allow-net --parallel --ignore=npm", - "test:no-check": "deno test --allow-read --allow-write --allow-net --no-check --parallel --ignore=npm,http_server_native_unstable_test.ts", "test:coverage": "deno test --coverage=./cov --allow-read --allow-write --allow-net --cert ./examples/tls/RootCA.crt --parallel --ignore=npm" }, "fmt": {