Skip to content

Commit e70d54f

Browse files
feat: fix sourcemaps, update dependencies (#5)
BREAKING CHANGE: Unpublish from NPM, drop support for Node 12
1 parent 4c6f88f commit e70d54f

17 files changed

+26892
-21457
lines changed

.github/workflows/release.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,21 @@ jobs:
1818
- name: Setup Node.js
1919
uses: actions/setup-node@v2
2020
with:
21-
node-version: 14
21+
node-version: 18
2222

2323
- name: Install dependencies
2424
run: npm ci
2525

26-
- name: Run release command
27-
run: npm run release
26+
- name: Run verify command
27+
run: npm run verify
28+
29+
- name: Run build command
30+
run: npm run build
31+
32+
- name: Pack NPM Library
33+
run: npm pack --pack-destination temp
2834

2935
- name: Release
3036
env:
3137
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3338
run: npx semantic-release

.github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [12, 14, 16]
15+
node-version: [14, 16, 18]
1616

1717
steps:
1818
- uses: actions/checkout@v2
@@ -21,4 +21,4 @@ jobs:
2121
with:
2222
node-version: ${{ matrix.node-version }}
2323
- run: npm ci
24-
- run: npm run release
24+
- run: npm run verify

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/node_modules
22
/coverage
3-
/dist
3+
/dist
4+
/temp/*.tgz

.husky/commit-msg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npx --no-install commitlint --edit "$1"
4+
npx --no -- commitlint --edit "$1"

.husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npx --no-install lint-staged
4+
npx --no lint-staged
55
npm run ts-check

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212

1313
1. Fork the repository
1414
1. Install dependencies by running `npm install`
15-
1. Run `npm run release` to ensure the package builds successfully without any changes
15+
1. Run `npm run verify && npm run build` to ensure the package builds successfully without any changes
1616
1. Write the code for your feature/fix
1717
1. Write tests for the change - ensuring that every code branch is effectively tested
1818
1. Update the documentation as necessary
19-
1. Run `npm run release` before committing to ensure the code passes all tests/linters/etc
19+
1. Run `npm run verify && npm run build` before committing to ensure the code passes all tests/linters/etc
2020
1. Commit your changes following the [Commit message conventions](#commit-message-conventions) below
2121
1. Submit a PR for review
2222

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Jason O'Neill
3+
Copyright (c) 2022 Jason O'Neill
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# recursive-proxy-mock
22

3-
[![npm](https://badgen.net/npm/v/recursive-proxy-mock)](https://www.npmjs.com/package/recursive-proxy-mock) [![license MIT](https://badgen.net/npm/license/recursive-proxy-mock)](https://github.com/CreativeTechGuy/recursive-proxy-mock/blob/main/LICENSE) [![npm type definitions](https://badgen.net/npm/types/recursive-proxy-mock)](https://www.npmjs.com/package/recursive-proxy-mock) [![bundlephobia](https://badgen.net/bundlephobia/minzip/recursive-proxy-mock)](https://bundlephobia.com/package/recursive-proxy-mock) [![npm](https://badgen.net/npm/dm/recursive-proxy-mock)](https://www.npmjs.com/package/recursive-proxy-mock) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
4-
53
> Create a proxy which can mock any object, function, class, etc. with infinite depth and combinations.
64
75
## Table of Contents
@@ -34,6 +32,7 @@
3432
- [Mock complex objects](#mock-complex-objects)
3533
- [Browser/Node Support](#browsernode-support)
3634
- [Performance & Size](#performance--size)
35+
- [Updates and Maintenance](#updates-and-maintenance)
3736

3837
## About
3938

@@ -43,9 +42,7 @@ Recursive Proxy Mock is a [JavaScript Proxy](https://developer.mozilla.org/en-US
4342

4443
## Installation & Importing
4544

46-
```sh
47-
npm install --save-dev recursive-proxy-mock
48-
```
45+
> **NOTE**: This library is not published to NPM as it turns out the use-cases for this are few and far between. If you need it though, builds are available for download via GitHub Releases. You can `npm install` that with a path to the locally downloaded `.tgz` file.
4946
5047
```js
5148
import { recursiveProxyMock } from "recursive-proxy-mock";
@@ -380,3 +377,7 @@ Out of the box we support all modern browsers and any currently maintained versi
380377
## Performance & Size
381378

382379
It's important to note that Proxies are far slower than most alternatives. We wouldn't recommend to use this for performance-critical code. The library is heavily tree-shakable so the average bundle size will be just a few KBs.
380+
381+
## Updates and Maintenance
382+
383+
This library is "done". Unless there are bugs to fix or important features being requested, I have no plans to keep updating it. It solves a problem (albeit an uncommon one) and if you need it, it should work for you as-is. No need for unnecessary updates. :)

cspell.json

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.1",
2+
"version": "0.2",
33
"words": [
44
"bundlephobia",
55
"chainable",
@@ -9,9 +9,16 @@
99
"filesize",
1010
"iife",
1111
"lcov",
12+
"loglevel",
1213
"ttypescript",
1314
"webgl"
1415
],
1516
"ignoreRegExpList": ["\\(#.*\\)"],
16-
"ignorePaths": ["/coverage", "/dist", "package-lock.json", "package.json"]
17+
"ignorePaths": ["package-lock.json", "package.json"],
18+
"useGitignore": true,
19+
"validateDirectives": true,
20+
"cache": {
21+
"useCache": true,
22+
"cacheLocation": "./node_modules/.cache/cspell/.cspell"
23+
}
1724
}

jest.config.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ module.exports = {
77
coverageReporters: ["text-summary", "lcov"],
88
coverageThreshold: {
99
global: {
10-
branches: 95,
11-
functions: 99,
12-
lines: 99,
13-
statements: 95,
10+
branches: 100,
11+
functions: 100,
12+
lines: 100,
13+
statements: 100,
1414
},
1515
},
1616
errorOnDeprecated: true,
@@ -20,6 +20,8 @@ module.exports = {
2020
},
2121
setupFilesAfterEnv: ["<rootDir>/test/setup.ts"],
2222
globalTeardown: "<rootDir>/test/teardown.ts",
23-
timers: "fake",
23+
fakeTimers: {
24+
enableGlobally: true,
25+
},
2426
verbose: true,
2527
};

lint-staged.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
2-
"*": "prettier --write --ignore-unknown",
3-
"*.{js,ts,json,md}": "cspell --no-must-find-files",
2+
"*": "prettier --write --ignore-unknown --loglevel warn",
3+
"*.{js,ts,json,md}": "cspell --no-progress --no-must-find-files",
44
"*.{js,ts}": "eslint --max-warnings 0 --fix",
55
"README.md": "npm run readme-toc",
66
};

0 commit comments

Comments
 (0)