penrose 0.3.1 → 0.4.1

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.
@@ -17,13 +17,18 @@ jobs:
17
17
  sudo apt-get install -y -qq graphicsmagick
18
18
 
19
19
  - name: Install Node
20
- uses: actions/setup-node@v4
20
+ uses: actions/setup-node@v6.4.0
21
21
  with:
22
22
  node-version: 24.15.0
23
- cache: npm
23
+
24
+ - uses: pnpm/action-setup@v6.0.6
25
+ name: Install pnpm
26
+ with:
27
+ version: 10.33.4
28
+ cache: true
24
29
 
25
30
  - name: Install Node dependencies
26
- run: npm ci
31
+ run: pnpm install --frozen-lockfile
27
32
 
28
33
  - name: Run Node tests
29
- run: npm test
34
+ run: pnpm run test
package/.ncurc.cjs ADDED
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ cooldown: '3d',
3
+ removeRange: true,
4
+ target: 'minor',
5
+ upgrade: true
6
+ };
@@ -14,9 +14,11 @@ repos:
14
14
  language: system
15
15
  files: \.nix$
16
16
 
17
- - id: format-js
18
- name: Format JS
19
- language: system
20
- entry: npx prettier --parser babel --write
17
+ - repo: https://github.com/pre-commit/mirrors-prettier
18
+ rev: v3.1.0
19
+ hooks:
20
+ - id: prettier
21
+ alias: prettier-js
22
+ name: prettier (js)
23
+ args: [--parser, babel, --write]
21
24
  files: ^(lib)/.*\.(js|jsx|cjs|mjs)$
22
- pass_filenames: true
package/Makefile CHANGED
@@ -25,10 +25,10 @@ bump-version:
25
25
  echo "Must be one of: $(CYAN)$$VALID_BUMP$(RESET)"; \
26
26
  exit 1; \
27
27
  fi; \
28
- npm version $$BUMP;
28
+ pnpm version $$BUMP;
29
29
 
30
30
  create-release:
31
- @VERSION=$$(npm pkg get version --browser=false | tr -d '"'); \
31
+ @VERSION=$$(pnpm pkg get version --browser=false | tr -d '"'); \
32
32
  gh release create $$VERSION;
33
33
 
34
34
  # Prevent make from treating arguments to bump-version as targets
package/devenv.nix CHANGED
@@ -19,7 +19,7 @@
19
19
  javascript = {
20
20
  enable = true;
21
21
  package = pkgs.nodejs_24;
22
- npm = {
22
+ pnpm = {
23
23
  enable = true;
24
24
  install = {
25
25
  enable = true;
@@ -1,7 +1,7 @@
1
1
  import _ from 'lodash';
2
2
  import Promise from 'bluebird';
3
3
  import fs from 'fs-extra';
4
- import globPromise from 'glob-promise';
4
+ import {glob} from 'glob';
5
5
  import path from 'path';
6
6
  import {describe, expect, test} from 'vitest';
7
7
  import {Penrose} from '../penrose';
@@ -30,24 +30,6 @@ describe('Penrose', () => {
30
30
 
31
31
  const penrose = new Penrose(config);
32
32
 
33
- /**
34
- *
35
- * @param {Array} patterns
36
- * @param {Object} options
37
- * @returns {Promise}
38
- */
39
- function multiGlob(patterns, options) {
40
- let matches = [];
41
-
42
- return Promise.mapSeries(patterns, function (pattern) {
43
- return globPromise(pattern, options).then(function (files) {
44
- matches = matches.concat(files);
45
- });
46
- }).then(() => {
47
- return Promise.resolve(matches);
48
- });
49
- }
50
-
51
33
  describe('resolvePath', () => {
52
34
  test('Should return expected path if URI has scheme', () => {
53
35
  const actual = penrose.resolvePath('public://dir/file.jpg');
@@ -169,7 +151,7 @@ describe('Penrose', () => {
169
151
  test('Should create derivative images', async () => {
170
152
  await fs.remove(path.join(dir, 'data/files/styles'));
171
153
 
172
- const files = await multiGlob(
154
+ const files = await glob(
173
155
  _.map(config.schemes, function (scheme) {
174
156
  return scheme.path + '**/*';
175
157
  }),
@@ -194,7 +176,7 @@ describe('Penrose', () => {
194
176
  return penrose.createDerivative(task.style, task.src, task.dist);
195
177
  });
196
178
 
197
- const actual = await multiGlob(
179
+ const actual = await glob(
198
180
  _.map(config.schemes, function (scheme) {
199
181
  return scheme.path + 'styles/**/*';
200
182
  }),
package/package.json CHANGED
@@ -1,15 +1,12 @@
1
1
  {
2
2
  "name": "penrose",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "description": "Build derivative images",
5
5
  "main": "lib/penrose.js",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git://github.com/netbek/penrose.git"
9
9
  },
10
- "scripts": {
11
- "test": "vitest run"
12
- },
13
10
  "author": {
14
11
  "name": "Hein Bekker",
15
12
  "email": "hein@netbek.co.za",
@@ -23,7 +20,6 @@
23
20
  "bluebird": "3.7.2",
24
21
  "chalk": "4.1.2",
25
22
  "fs-extra": "11.3.5",
26
- "glob-promise": "6.0.7",
27
23
  "lodash": "4.18.1",
28
24
  "prettier": "3.8.3",
29
25
  "replace-ext": "2.0.0",
@@ -35,8 +31,12 @@
35
31
  "eslint": "8.57.1",
36
32
  "eslint-config-prettier": "9.1.2",
37
33
  "eslint-plugin-prettier": "5.5.5",
34
+ "glob": "13.0.6",
38
35
  "npm-check-updates": "22.1.1",
39
36
  "typescript": "6.0.3",
40
37
  "vitest": "3.2.4"
38
+ },
39
+ "scripts": {
40
+ "test": "vitest run"
41
41
  }
42
- }
42
+ }
@@ -0,0 +1,7 @@
1
+ allowBuilds:
2
+ "esbuild@0.27.7": true
3
+ "sharp@0.34.5": true
4
+
5
+ blockExoticSubdeps: true
6
+
7
+ minimumReleaseAge: 4320
package/.ncurc.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "removeRange": true,
3
- "target": "minor",
4
- "upgrade": true
5
- }