Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
"node": true
},
"extends": ["plugin:prettier/recommended"],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"requireConfigFile": false
},
"rules": {
"camelcase": [2, { "properties": "always" }],
"semi": [2, "always"],
Expand All @@ -14,7 +20,7 @@
"quotes": [1, "single", "avoid-escape"],
"max-len": [
2,
100,
120,
4,
{
"ignoreUrls": true,
Expand Down Expand Up @@ -44,8 +50,14 @@
},
"settings": {
"import/resolver": {
"webpack": {
"config": "webpack.config.js"
"alias": {
"map": [
["@test-helpers", "./src/view/__tests__/helpers"]
],
"extensions": [".js", ".jsx", ".mjs"]
},
"node": {
"extensions": [".js", ".jsx", ".mjs"]
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
id: npm-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Setup kernel for react native, increase watchers
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Install dependencies
if: steps.npm-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
run: npm ci
- name: Linting files
run: npm run lint
- uses: saucelabs/sauce-connect-action@v1
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ This is the Core extension for [Adobe Experience Platform Tags](https://experien
Contributions are welcomed! Read the [Contributing Guide](.github/CONTRIBUTING.md) for more information about how our community works.

1. [Install node.js](https://nodejs.org/).
1. [Install Yarn](https://yarnpkg.com/en/docs/install).
1. Clone this repository.
1. After navigating into the project directory, install project dependencies by running `yarn install`.
1. After navigating into the project directory, install project dependencies by running `npm ci`.

Several npm scripts have been provided for assisting in development. Each script can be run by navigating to the cloned repository directory in a terminal and executing `npm run scriptname` where `scriptname` is the name of the script you would like to run. The most useful scripts are as follows:

Expand All @@ -34,5 +33,3 @@ This project depends on the @react/react-spectrum package which depends on the @
* to this repo does not apply.
*/
```

While changing `package.json` to point to the tar file for @react/react-spectrum is simple and natively supported by npm, this is not the case with @react/collection-view, since it is a dependency of @react/react-spectrum. To solve this problem, this project uses Yarn for installing dependencies since it natively supports [selective dependency resolutions](https://yarnpkg.com/lang/en/docs/selective-version-resolutions/).
15 changes: 10 additions & 5 deletions createEntryFile.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
const fs = require('fs-extra');
import fs from 'fs-extra';

module.exports = function(outputPath, componentName, viewFileName) {
fs.outputFileSync(outputPath,
`import renderView from '../../src/view/renderView';
export default function createEntryFile(
outputPath,
componentName,
viewFileName
) {
fs.outputFileSync(
outputPath,
`import renderView from '../../src/view/renderView';
import ${componentName}, { formConfig } from '../../src/view/${viewFileName}';

export default renderView(${componentName}, formConfig);`
);
};
}
2 changes: 1 addition & 1 deletion extension.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "core",
"platform": "web",
"version": "3.4.4",
"version": "3.4.5",
"displayName": "Core",
"description": "Provides default event, condition, and data element types available to all Launch properties.",
"exchangeUrl": "https://www.adobeexchange.com/experiencecloud.details.100223.adobe-launch-core-extension.html",
Expand Down
Loading
Loading