@m2c2kit/build-helpers 0.3.24 → 0.3.25

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/LICENSE CHANGED
@@ -1,21 +1,13 @@
1
- MIT License
1
+ Copyright 2023 Scott T. Yabiku
2
2
 
3
- Copyright (c) 2023 Scott T. Yabiku
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
4
6
 
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:
7
+ http://www.apache.org/licenses/LICENSE-2.0
11
8
 
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.
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @m2c2kit/build-helpers
2
2
 
3
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
3
+ [![License: Apache-2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/license/apache-2-0)
4
4
  [![CI/CD](https://github.com/m2c2-project/m2c2kit/actions/workflows/ci.yml/badge.svg)](https://github.com/m2c2-project/m2c2kit/actions/workflows/ci.yml)
5
5
  [![npm version](https://img.shields.io/npm/v/@m2c2kit/build-helpers.svg)](https://www.npmjs.com/package/@m2c2kit/build-helpers)
6
6
 
package/dist/index.d.ts CHANGED
@@ -226,4 +226,5 @@ interface ResolveAsyncResult {
226
226
  */
227
227
  declare function resolveAsync(id: string, options: AsyncOpts): Promise<ResolveAsyncResult>;
228
228
 
229
- export { type CopyAssetsOptions, type ResolveAsyncResult, addModuleMetadata, copyAssets, hashM2c2kitAssets, insertVersionString, makeM2c2kitServiceWorker, resolveAsync, restoreImportMeta };
229
+ export { addModuleMetadata, copyAssets, hashM2c2kitAssets, insertVersionString, makeM2c2kitServiceWorker, resolveAsync, restoreImportMeta };
230
+ export type { CopyAssetsOptions, ResolveAsyncResult };
package/dist/index.js CHANGED
@@ -18251,17 +18251,26 @@ function requireIgnore () {
18251
18251
  [
18252
18252
  // (a\ ) -> (a )
18253
18253
  // (a ) -> (a)
18254
+ // (a ) -> (a)
18254
18255
  // (a \ ) -> (a )
18255
- /\\?\s+$/,
18256
- match => match.indexOf('\\') === 0
18257
- ? SPACE
18258
- : EMPTY
18256
+ /((?:\\\\)*?)(\\?\s+)$/,
18257
+ (_, m1, m2) => m1 + (
18258
+ m2.indexOf('\\') === 0
18259
+ ? SPACE
18260
+ : EMPTY
18261
+ )
18259
18262
  ],
18260
18263
 
18261
18264
  // replace (\ ) with ' '
18265
+ // (\ ) -> ' '
18266
+ // (\\ ) -> '\\ '
18267
+ // (\\\ ) -> '\\ '
18262
18268
  [
18263
- /\\\s/g,
18264
- () => SPACE
18269
+ /(\\+?)\s/g,
18270
+ (_, m1) => {
18271
+ const {length} = m1;
18272
+ return m1.slice(0, length - length % 2) + SPACE
18273
+ }
18265
18274
  ],
18266
18275
 
18267
18276
  // Escape metacharacters
@@ -18489,7 +18498,8 @@ function requireIgnore () {
18489
18498
 
18490
18499
  if (!source) {
18491
18500
  source = REPLACERS.reduce(
18492
- (prev, current) => prev.replace(current[0], current[1].bind(pattern)),
18501
+ (prev, [matcher, replacer]) =>
18502
+ prev.replace(matcher, replacer.bind(pattern)),
18493
18503
  pattern
18494
18504
  );
18495
18505
  regexCache[pattern] = source;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m2c2kit/build-helpers",
3
- "version": "0.3.24",
3
+ "version": "0.3.25",
4
4
  "description": "Utility functions for building m2c2kit apps",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -15,29 +15,29 @@
15
15
  "dist/index.d.ts"
16
16
  ],
17
17
  "devDependencies": {
18
- "@rollup/plugin-commonjs": "28.0.2",
18
+ "@rollup/plugin-commonjs": "28.0.3",
19
19
  "@rollup/plugin-json": "6.1.0",
20
- "@rollup/plugin-node-resolve": "16.0.0",
20
+ "@rollup/plugin-node-resolve": "16.0.1",
21
21
  "@rollup/plugin-replace": "6.0.2",
22
22
  "@types/findup-sync": "4.0.5",
23
- "@types/semver": "7.5.8",
23
+ "@types/semver": "7.7.0",
24
24
  "cpy": "10.1.0",
25
25
  "findup-sync": "5.0.0",
26
26
  "magic-string": "0.30.17",
27
27
  "rimraf": "6.0.1",
28
- "rollup": "4.34.6",
28
+ "rollup": "4.37.0",
29
29
  "rollup-plugin-copy": "3.5.0",
30
- "rollup-plugin-dts": "6.1.1",
31
- "rollup-plugin-esbuild": "6.2.0",
30
+ "rollup-plugin-dts": "6.2.1",
31
+ "rollup-plugin-esbuild": "6.2.1",
32
32
  "semver": "7.7.1",
33
- "typescript": "5.7.3"
33
+ "typescript": "5.8.2"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "npm run clean && tsc && rollup -c",
37
37
  "clean": "rimraf build dist .rollup.cache tsconfig.tsbuildinfo",
38
38
  "test": "cd ../.. && npx env-cmd -f .env.jest jest --selectProjects @m2c2kit/build-helpers"
39
39
  },
40
- "license": "MIT",
40
+ "license": "Apache-2.0",
41
41
  "author": {
42
42
  "name": "Scott T. Yabiku",
43
43
  "email": "syabiku@gmail.com"