@adobe/aio-lib-web 5.1.0 → 6.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.
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: publish-prerelease
|
|
2
|
+
on:
|
|
3
|
+
workflow_dispatch:
|
|
4
|
+
inputs:
|
|
5
|
+
pre-release-tag:
|
|
6
|
+
description: 'The pre-release tag use in the version'
|
|
7
|
+
required: false
|
|
8
|
+
default: 'pre'
|
|
9
|
+
dist-tag:
|
|
10
|
+
description: 'The dist-tag use'
|
|
11
|
+
required: false
|
|
12
|
+
default: 'next'
|
|
13
|
+
dependencies-to-update:
|
|
14
|
+
description: 'csv of dependencies to update with the dist-tag'
|
|
15
|
+
required: false
|
|
16
|
+
default: '@adobe/aio-lib-core-config,@adobe/aio-lib-core-logging,@adobe/aio-lib-core-tvm'
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
checkout:
|
|
20
|
+
name: checkout
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v2
|
|
24
|
+
- run: |
|
|
25
|
+
git config user.name github-actions
|
|
26
|
+
git config user.email github-actions@github.com
|
|
27
|
+
- uses: actions/setup-node@v1
|
|
28
|
+
with:
|
|
29
|
+
node-version: 16
|
|
30
|
+
- run: |
|
|
31
|
+
npm install
|
|
32
|
+
npm test
|
|
33
|
+
- name: Update your package.json with an npm pre-release version
|
|
34
|
+
id: pre-release-version
|
|
35
|
+
uses: adobe/update-prerelease-npm-version@v1.0.0
|
|
36
|
+
with:
|
|
37
|
+
pre-release-tag: ${{ github.event.inputs.pre-release-tag }}
|
|
38
|
+
dependencies-to-update: ${{ github.event.inputs.dependencies-to-update }}
|
|
39
|
+
dependencies-to-update-version-tag: ${{ github.event.inputs.dist-tag }}
|
|
40
|
+
- run: echo pre-release-version - ${{ steps.pre-release-version.outputs.pre-release-version }}
|
|
41
|
+
- uses: JS-DevTools/npm-publish@v1
|
|
42
|
+
with:
|
|
43
|
+
token: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
|
|
44
|
+
tag: ${{ github.event.inputs.dist-tag }}
|
|
45
|
+
access: 'public'
|
package/e2e/e2e.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/aio-lib-web",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Utility tooling library to build and deploy Adobe I/O Project Firefly app static sites to CDN",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "Adobe Inc.",
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"engines": {
|
|
13
|
-
"node": "
|
|
13
|
+
"node": "^14.18 || ^16.13 || >=18"
|
|
14
14
|
},
|
|
15
15
|
"repository": "adobe/aio-lib-web",
|
|
16
16
|
"homepage": "https://github.com/adobe/aio-lib-web",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"e2e": "jest --config='./e2e/jest.config.js' --testRegex './e2e/e2e.js'"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@adobe/aio-lib-core-config": "^
|
|
33
|
-
"@adobe/aio-lib-core-logging": "^
|
|
34
|
-
"@adobe/aio-lib-core-tvm": "^
|
|
32
|
+
"@adobe/aio-lib-core-config": "^3.0.0",
|
|
33
|
+
"@adobe/aio-lib-core-logging": "^2.0.0",
|
|
34
|
+
"@adobe/aio-lib-core-tvm": "^3.0.0",
|
|
35
35
|
"aws-sdk": "^2.600.0",
|
|
36
36
|
"fs-extra": "^9.0.0",
|
|
37
37
|
"joi": "^17.2.1",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"klaw": "^3.0.0",
|
|
40
40
|
"lodash.clonedeep": "^4.5.0",
|
|
41
41
|
"mime-types": "^2.1.24",
|
|
42
|
-
"parcel": "2.
|
|
42
|
+
"parcel": "2.5.0",
|
|
43
43
|
"regenerator-runtime": "^0.13.7"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
package/src/bundle.js
CHANGED
|
@@ -12,7 +12,7 @@ governing permissions and limitations under the License.
|
|
|
12
12
|
|
|
13
13
|
const Bundler = require('@parcel/core').default
|
|
14
14
|
const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-lib-web:bundle', { provider: 'debug' })
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
/**
|
|
17
17
|
* @typedef {object} BundleWebObject
|
|
18
18
|
* @property {object} the Parcel bundler object
|
|
@@ -31,17 +31,17 @@ const fs = require('fs-extra')
|
|
|
31
31
|
/**
|
|
32
32
|
* Bundles the web source via Parcel.
|
|
33
33
|
*
|
|
34
|
-
* @param {string} [
|
|
34
|
+
* @param {Array of string} [entries] one or more file paths or globs
|
|
35
35
|
* @param {string} [dest] directory to build to
|
|
36
36
|
* @param {BundleOptions} [options] the Parcel bundler options
|
|
37
37
|
* @param {Function} [log] the app logger
|
|
38
38
|
* @returns {BundleWebObject} the BundleWebObject
|
|
39
39
|
*/
|
|
40
|
-
module.exports = async (
|
|
40
|
+
module.exports = async (entries, dest, options = { shouldOptimize: false }, log = () => {}) => {
|
|
41
41
|
aioLogger.debug(`bundle options: ${JSON.stringify(options, null, 2)}`)
|
|
42
42
|
|
|
43
|
-
if (!
|
|
44
|
-
throw new Error('cannot build web,
|
|
43
|
+
if (!entries) {
|
|
44
|
+
throw new Error('cannot build web, entries not specified')
|
|
45
45
|
}
|
|
46
46
|
if (!dest) {
|
|
47
47
|
throw new Error('cannot build web, missing destination')
|
|
@@ -49,7 +49,7 @@ module.exports = async (entryFile, dest, options = { shouldOptimize: false }, lo
|
|
|
49
49
|
|
|
50
50
|
// set defaults, but allow override by passed in values
|
|
51
51
|
const parcelBundleOptions = {
|
|
52
|
-
entries:
|
|
52
|
+
entries: entries,
|
|
53
53
|
defaultConfig: require.resolve('@parcel/config-default'),
|
|
54
54
|
shouldDisableCache: false,
|
|
55
55
|
targets: {
|
|
@@ -69,7 +69,7 @@ module.exports = async (entryFile, dest, options = { shouldOptimize: false }, lo
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
aioLogger.debug(`bundle bundleOptions: ${JSON.stringify(parcelBundleOptions, null, 2)}`)
|
|
72
|
-
log(`bundling ${
|
|
72
|
+
log(`bundling ${entries}`)
|
|
73
73
|
const bundler = new Bundler(parcelBundleOptions)
|
|
74
74
|
|
|
75
75
|
return bundler
|