Skip to content

Commit 9178a88

Browse files
committed
Use npm workspace
1 parent e04b748 commit 9178a88

24 files changed

+126
-90
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ jobs:
1919
- run: npm install -g npm@latest
2020
- run: npm ci
2121
- run: npm test
22-
- if: ${{ github.event.release.tag_name != '' && env.NPM_PUBLISH_TAG != '' }}
23-
run: npm publish --provenance --access=public --tag=${{ env.NPM_PUBLISH_TAG }}
22+
- if: ${{ github.event.release.tag_name != '' && env.NPM_PUBLISH_TAG != '' && env.NPM_WORKSPACE != '' }}
23+
run: npm publish --provenance --access=public --tag=${{ env.NPM_PUBLISH_TAG }} --workspace=${{ env.NPM_WORKSPACE }}
2424
env:
2525
NPM_PUBLISH_TAG: ${{ contains(github.event.release.tag_name, '-alpha.') && 'canary' || 'latest' }}
26+
# tag names must be formatted like [email protected]
27+
NPM_WORKSPACE: ${{ startsWith(github.event.release.tag_name, 'utils@') && 'utils' }}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022–2024 Zach Leatherman @zachleat
3+
Copyright (c) 2022–2025 Zach Leatherman @zachleat
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

package-lock.json

Lines changed: 27 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,11 @@
11
{
2-
"name": "@11ty/eleventy-utils",
3-
"version": "2.0.7",
4-
"description": "Low level internal utilities to be shared amongst Eleventy projects",
5-
"main": "index.js",
6-
"files": [
7-
"src",
8-
"src/**",
9-
"index.js",
10-
"!test",
11-
"!test/**"
12-
],
13-
"scripts": {
2+
"private": true,
3+
"workspaces": [
4+
"utils"
5+
],
6+
"scripts": {
147
"test": "node --test",
158
"watch": "node --test --watch"
169
},
17-
"license": "MIT",
18-
"engines": {
19-
"node": ">=18"
20-
},
21-
"funding": {
22-
"type": "opencollective",
23-
"url": "https://opencollective.com/11ty"
24-
},
25-
"keywords": [
26-
"eleventy"
27-
],
28-
"publishConfig": {
29-
"access": "public"
30-
},
31-
"author": {
32-
"name": "Zach Leatherman",
33-
"email": "[email protected]",
34-
"url": "https://zachleat.com/"
35-
},
36-
"repository": {
37-
"type": "git",
38-
"url": "git://github.com/11ty/eleventy-utils.git"
39-
},
40-
"bugs": "https://github.com/11ty/eleventy-utils/issues",
41-
"homepage": "https://github.com/11ty/eleventy-utils/"
10+
"license": "MIT"
4211
}

utils/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022–2025 Zach Leatherman @zachleat
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
File renamed without changes.
File renamed without changes.

utils/package.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "@11ty/eleventy-utils",
3+
"version": "2.0.7",
4+
"description": "Low level internal utilities to be shared amongst Eleventy projects",
5+
"main": "index.js",
6+
"files": [
7+
"src",
8+
"src/**",
9+
"index.js"
10+
],
11+
"scripts": {
12+
"test": "echo \"Error: run tests from root directory\" && exit 1"
13+
},
14+
"license": "MIT",
15+
"engines": {
16+
"node": ">=18"
17+
},
18+
"funding": {
19+
"type": "opencollective",
20+
"url": "https://opencollective.com/11ty"
21+
},
22+
"keywords": [
23+
"eleventy"
24+
],
25+
"publishConfig": {
26+
"access": "public"
27+
},
28+
"author": "Zach Leatherman <[email protected]> (https://zachleat.com/)",
29+
"repository": {
30+
"type": "git",
31+
"url": "git+https://github.com/11ty/eleventy-utils.git"
32+
},
33+
"bugs": "https://github.com/11ty/eleventy-utils/issues",
34+
"homepage": "https://www.11ty.dev/"
35+
}
File renamed without changes.

0 commit comments

Comments
 (0)