@everyonesoftware/common 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/.github/workflows/publish.yml +54 -36
  2. package/package.json +6 -2
  3. package/sources/asyncIterator.ts +436 -436
  4. package/sources/asyncIteratorToJavascriptAsyncIteratorAdapter.ts +47 -47
  5. package/sources/asyncResult.ts +95 -95
  6. package/sources/byteList.ts +201 -201
  7. package/sources/byteListStream.ts +120 -120
  8. package/sources/byteReadStream.ts +23 -23
  9. package/sources/byteWriteStream.ts +15 -15
  10. package/sources/characterList.ts +194 -194
  11. package/sources/characterListStream.ts +150 -150
  12. package/sources/characterReadStream.ts +80 -80
  13. package/sources/characterReadStreamIterator.ts +127 -127
  14. package/sources/concatenateIterable.ts +118 -118
  15. package/sources/concatenateIterator.ts +164 -164
  16. package/sources/currentProcess.ts +157 -157
  17. package/sources/dateTime.ts +129 -129
  18. package/sources/depthFirstSearch.ts +229 -229
  19. package/sources/flatMapIterable.ts +103 -103
  20. package/sources/flatMapIterator.ts +151 -151
  21. package/sources/generator.ts +250 -250
  22. package/sources/index.ts +1 -1
  23. package/sources/iterator.ts +480 -480
  24. package/sources/javascriptAsyncIteratorToAsyncIteratorAdapter.ts +123 -123
  25. package/sources/javascriptSetSet.ts +133 -133
  26. package/sources/listQueue.ts +61 -61
  27. package/sources/listStack.ts +61 -61
  28. package/sources/luxonDateTime.ts +108 -108
  29. package/sources/mapAsyncIterator.ts +140 -140
  30. package/sources/mutableMap.ts +291 -291
  31. package/sources/node.ts +36 -36
  32. package/sources/promiseAsyncResult.ts +173 -173
  33. package/sources/queue.ts +48 -48
  34. package/sources/recreationDotGovClient.ts +258 -258
  35. package/sources/searchControl.ts +41 -41
  36. package/sources/set.ts +243 -243
  37. package/sources/skipAsyncIterator.ts +144 -144
  38. package/sources/stack.ts +47 -47
  39. package/sources/syncResult.ts +299 -299
  40. package/sources/takeAsyncIterator.ts +140 -140
  41. package/sources/whereAsyncIterator.ts +142 -142
  42. package/sources/wonderlandTrailClient.ts +1502 -1502
  43. package/tests/assertTestTests.ts +74 -74
  44. package/tests/byteListStreamTests.ts +389 -389
  45. package/tests/byteListTests.ts +26 -26
  46. package/tests/characterListStreamTests.ts +390 -390
  47. package/tests/characterListTests.ts +249 -249
  48. package/tests/dateTimeTests.ts +29 -29
  49. package/tests/depthFirstSearchTests.ts +105 -105
  50. package/tests/generatorTests.ts +85 -85
  51. package/tests/mutableMapTests.ts +153 -153
  52. package/tests/promiseAsyncResultTests.ts +687 -687
  53. package/tests/queueTests.ts +28 -28
  54. package/tests/recreationDotGovClientTests.ts +190 -190
  55. package/tests/setTests.ts +139 -139
  56. package/tests/stackTests.ts +65 -65
  57. package/tests/syncResultTests.ts +1250 -1250
  58. package/tests/wonderlandTrailClientTests.ts +451 -451
  59. package/tsup.config.ts +12 -12
@@ -1,36 +1,54 @@
1
- name: Build, Test, and Publish
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
-
8
- jobs:
9
- build-test-publish:
10
- runs-on: ubuntu-latest
11
-
12
- permissions:
13
- contents: read
14
-
15
- steps:
16
- - name: Checkout repository
17
- uses: actions/checkout@v5
18
-
19
- - name: Setup Node.js
20
- uses: actions/setup-node@v5
21
- with:
22
- node-version: 22
23
- registry-url: 'https://registry.npmjs.org'
24
- cache: 'npm'
25
-
26
- - name: Install dependencies
27
- run: npm ci
28
-
29
- - name: Build
30
- run: npm run build
31
-
32
- - name: Run tests
33
- run: npm test
34
-
35
- - name: Publish to NPM
36
- run: npm publish
1
+ name: Build, Test, and Publish
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ build-test-publish:
10
+ runs-on: ubuntu-latest
11
+
12
+ permissions:
13
+ id-token: write # Required for npm trusted publishing (OIDC)
14
+ contents: write # Required to create and push tags
15
+
16
+ steps:
17
+ - name: Checkout repository
18
+ uses: actions/checkout@v6
19
+ with:
20
+ fetch-depth: 0
21
+
22
+ - name: Setup Node.js
23
+ uses: actions/setup-node@v6
24
+ with:
25
+ node-version: 24
26
+ registry-url: https://registry.npmjs.org
27
+
28
+ - name: Install dependencies
29
+ run: npm ci
30
+
31
+ - name: Build
32
+ run: npm run build
33
+
34
+ - name: Run tests
35
+ run: npm run test-only
36
+
37
+ - name: Publish to npm
38
+ run: NODE_AUTH_TOKEN="" npm publish
39
+
40
+ - name: Create git tag from package version
41
+ run: |
42
+ VERSION=$(node -p "require('./package.json').version")
43
+ TAG="v$VERSION"
44
+
45
+ if git rev-parse "$TAG" >/dev/null 2>&1; then
46
+ echo "Tag $TAG already exists"
47
+ exit 0
48
+ fi
49
+
50
+ git config user.name "github-actions[bot]"
51
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
52
+
53
+ git tag "$TAG"
54
+ git push origin "$TAG"
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@everyonesoftware/common",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "A package containing common code for everyonesoftware projects.",
5
+ "repository": {
6
+ "url": "https://github.com/everyonesoftware/common-typescript"
7
+ },
5
8
  "type": "module",
6
9
  "publishConfig": {
7
10
  "access": "public"
@@ -21,7 +24,8 @@
21
24
  "scripts": {
22
25
  "build": "barrelsby --directory sources --delete && tsup",
23
26
  "clean": "rimraf coverage outputs",
24
- "test": "npm run build && c8 node -r source-map-support/register outputs/tests.js"
27
+ "test-only": "c8 node -r source-map-support/register outputs/tests.js",
28
+ "test": "npm run build && npm run test-only"
25
29
  },
26
30
  "dependencies": {
27
31
  "luxon": "3.7.2"