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 +22 -0
- package/README.md +8 -8
- package/lib/index.cjs +4 -4
- package/lib/index.d.ts +17 -0
- package/lib/index.js +1 -1
- package/package.json +19 -6
- package/lib/.eslintrc.json +0 -20
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
|
-
<
|
|
1
|
+
<h1 align="center">
|
|
2
2
|
alp-rollup-plugin-config
|
|
3
|
-
</
|
|
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
|
|
27
|
+
import config from "alp-rollup-plugin-config";
|
|
28
28
|
|
|
29
29
|
export default {
|
|
30
30
|
plugins: [
|
|
31
31
|
config({
|
|
32
|
-
targets: [{ src:
|
|
32
|
+
targets: [{ src: "config/*", dest: "dist/config" }],
|
|
33
33
|
}),
|
|
34
34
|
],
|
|
35
35
|
};
|
package/lib/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
const { copy } = require(
|
|
4
|
-
const { load } = require(
|
|
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:
|
|
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
|
|
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": "
|
|
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.
|
|
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
|
-
".": "./
|
|
22
|
-
"
|
|
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 --
|
|
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
|
}
|
package/lib/.eslintrc.json
DELETED
|
@@ -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
|
-
}
|