alp-rollup-plugin-config 2.2.1 → 4.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.0.0](https://github.com/christophehurpeau/alp/compare/alp-rollup-plugin-config@3.0.0...alp-rollup-plugin-config@4.0.0) (2025-10-27)
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * drop node 20 and build using esbuild
11
+
12
+ ### Features
13
+
14
+ * drop node 20 and build using esbuild ([812c4c1](https://github.com/christophehurpeau/alp/commit/812c4c1b0ad19984e389af4382a8d1e60643e4f1))
15
+
16
+ ## [3.0.0](https://github.com/christophehurpeau/alp/compare/alp-rollup-plugin-config@2.2.1...alp-rollup-plugin-config@3.0.0) (2025-08-02)
17
+
18
+ ### ⚠ BREAKING CHANGES
19
+
20
+ * update dependencies and drop node 20
21
+ * update dev dependencies, replace parse-json-object-as-map with native JSON.parse, update koa
22
+
23
+ ### Features
24
+
25
+ * update dependencies and drop node 20 ([fc5b322](https://github.com/christophehurpeau/alp/commit/fc5b322e076e9a3c7c4a235d16734b89fd85e211))
26
+ * update dev dependencies, replace parse-json-object-as-map with native JSON.parse, update koa ([5ae7723](https://github.com/christophehurpeau/alp/commit/5ae77238cafc573fe72c5eb63b103802b8b2e537))
27
+
6
28
  ## [2.2.1](https://github.com/christophehurpeau/alp/compare/alp-rollup-plugin-config@2.2.0...alp-rollup-plugin-config@2.2.1) (2024-01-06)
7
29
 
8
30
  Note: no notable changes
package/README.md CHANGED
@@ -1,16 +1,16 @@
1
- <h3 align="center">
1
+ <h1 align="center">
2
2
  alp-rollup-plugin-config
3
- </h3>
3
+ </h1>
4
4
 
5
5
  <p align="center">
6
6
  transform yaml config using rollup copy plugin and yaml transform
7
7
  </p>
8
8
 
9
9
  <p align="center">
10
- <a href="https://npmjs.org/package/alp-rollup-plugin-config"><img src="https://img.shields.io/npm/v/alp-rollup-plugin-config.svg?style=flat-square"></a>
11
- <a href="https://npmjs.org/package/alp-rollup-plugin-config"><img src="https://img.shields.io/npm/dw/alp-rollup-plugin-config.svg?style=flat-square"></a>
12
- <a href="https://npmjs.org/package/alp-rollup-plugin-config"><img src="https://img.shields.io/node/v/alp-rollup-plugin-config.svg?style=flat-square"></a>
13
- <a href="https://npmjs.org/package/alp-rollup-plugin-config"><img src="https://img.shields.io/npm/types/alp-rollup-plugin-config.svg?style=flat-square"></a>
10
+ <a href="https://npmjs.org/package/alp-rollup-plugin-config"><img src="https://img.shields.io/npm/v/alp-rollup-plugin-config.svg?style=flat-square" alt="npm version"></a>
11
+ <a href="https://npmjs.org/package/alp-rollup-plugin-config"><img src="https://img.shields.io/npm/dw/alp-rollup-plugin-config.svg?style=flat-square" alt="npm downloads"></a>
12
+ <a href="https://npmjs.org/package/alp-rollup-plugin-config"><img src="https://img.shields.io/node/v/alp-rollup-plugin-config.svg?style=flat-square" alt="node version"></a>
13
+ <a href="https://npmjs.org/package/alp-rollup-plugin-config"><img src="https://img.shields.io/npm/types/alp-rollup-plugin-config.svg?style=flat-square" alt="types"></a>
14
14
  </p>
15
15
 
16
16
  ## Install
@@ -24,12 +24,12 @@ npm install --save alp-rollup-plugin-config
24
24
  > rollup.config.js
25
25
 
26
26
  ```js
27
- import config from 'alp-rollup-plugin-config';
27
+ import config from "alp-rollup-plugin-config";
28
28
 
29
29
  export default {
30
30
  plugins: [
31
31
  config({
32
- targets: [{ src: 'config/*', dest: 'dist/config' }],
32
+ targets: [{ src: "config/*", dest: "dist/config" }],
33
33
  }),
34
34
  ],
35
35
  };
package/lib/index.cjs CHANGED
@@ -1,13 +1,13 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- const { copy } = require('@guanghechen/rollup-plugin-copy');
4
- const { load } = require('js-yaml');
3
+ const { copy } = require("@guanghechen/rollup-plugin-copy");
4
+ const { load } = require("js-yaml");
5
5
 
6
6
  module.exports = (options) =>
7
7
  copy({
8
8
  ...options,
9
9
  targets: options.targets.map((targetOptions) => ({
10
- dest: 'build',
10
+ dest: "build",
11
11
  rename: (name, extension) => `${name}.json`,
12
12
  transform: (contents, srcPath, destPath) =>
13
13
  JSON.stringify(load(contents)).toString(),
package/lib/index.d.ts ADDED
@@ -0,0 +1,17 @@
1
+ import { Plugin } from "rollup";
2
+
3
+ interface TargetOptions {
4
+ src: string;
5
+ dest?: string;
6
+ rename?: (name: string, extension: string) => string;
7
+ transform?: (contents: string, srcPath: string, destPath: string) => string;
8
+ }
9
+
10
+ interface PluginOptions {
11
+ targets: TargetOptions[];
12
+ [key: string]: any;
13
+ }
14
+
15
+ declare function alpRollupPluginConfig(options: PluginOptions): Plugin;
16
+
17
+ export = alpRollupPluginConfig;
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- export { default } from './index.cjs';
1
+ export { default } from "./index.cjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alp-rollup-plugin-config",
3
- "version": "2.2.1",
3
+ "version": "4.0.0",
4
4
  "description": "transform yaml config using rollup copy plugin and yaml transform",
5
5
  "keywords": [],
6
6
  "author": "Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)",
@@ -13,13 +13,19 @@
13
13
  "homepage": "https://github.com/christophehurpeau/alp",
14
14
  "type": "module",
15
15
  "engines": {
16
- "node": ">=18.12.0"
16
+ "node": ">=22.18.0"
17
17
  },
18
18
  "sideEffects": false,
19
19
  "main": "./lib/index.cjs",
20
+ "types": "./lib/index.d.ts",
20
21
  "exports": {
21
- ".": "./lib/index.js",
22
- "./package.json": "./package.json"
22
+ "./package.json": "./package.json",
23
+ ".": {
24
+ "types": "./lib/index.d.ts",
25
+ "node": {
26
+ "import": "./lib/index.cjs"
27
+ }
28
+ }
23
29
  },
24
30
  "publishConfig": {
25
31
  "access": "public"
@@ -28,10 +34,14 @@
28
34
  "lib"
29
35
  ],
30
36
  "scripts": {
37
+ "build": "yarn run build:definitions",
38
+ "build:definitions": "tsc --lib esnext --noEmit --skipLibCheck ./lib/index.d.ts",
31
39
  "lint": "yarn run lint:eslint",
32
- "lint:eslint": "yarn ../.. run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet packages/alp-rollup-plugin-config"
40
+ "lint:eslint": "yarn ../.. run eslint --quiet packages/alp-rollup-plugin-config"
41
+ },
42
+ "pob": {
43
+ "bundler": false
33
44
  },
34
- "pob": {},
35
45
  "prettier": "@pob/root/prettier-config",
36
46
  "peerDependencies": {
37
47
  "rollup": "^2.64.0 || ^3.0.0 || ^4.0.0"
@@ -39,5 +49,8 @@
39
49
  "dependencies": {
40
50
  "@guanghechen/rollup-plugin-copy": "1.8.6",
41
51
  "js-yaml": "4.1.0"
52
+ },
53
+ "devDependencies": {
54
+ "typescript": "5.9.2"
42
55
  }
43
56
  }
@@ -1,20 +0,0 @@
1
- {
2
- "root": true,
3
- "extends": ["@pob/eslint-config/node-module"],
4
- "overrides": [
5
- {
6
- "files": ["**/*.test.{cjs,js}", "__tests__/**/*.{cjs,js}"],
7
- "env": {
8
- "jest": true
9
- },
10
- "rules": {
11
- "import/no-extraneous-dependencies": [
12
- "error",
13
- {
14
- "devDependencies": true
15
- }
16
- ]
17
- }
18
- }
19
- ]
20
- }