Skip to content
This repository has been archived by the owner. It is now read-only.

Bump Babel to 7.10, and Prettier to 2.0 #8

Merged
merged 1 commit into from
Jul 25, 2020
Merged
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
36 changes: 18 additions & 18 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name: Node CI

on: [push]

on:
push:
branches:
- master
pull_request:
jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: yarn install, build, and test
run: |
yarn
yarn ci:test
env:
CI: true
- name: Checkout
uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: yarn install, build, and test
env:
CI: true
run: |
yarn
yarn ci:test
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const BatchedBridge = require("react-native/Libraries/BatchedBridge/BatchedBridge");
BatchedBridge.registerCallableModule("ReactExperienceLoader", {
load: (...names) => names.forEach(codegen.require("inlineRequireModules"))
load: (...names) => names.forEach(codegen.require("inlineRequireModules")),
});
4 changes: 2 additions & 2 deletions inlineRequireModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const fs = require("fs");
const { experiences } = JSON.parse(
fs.readFileSync(
require.resolve("./package.json", {
paths: [".", ...(module.parent ? module.parent.paths : [])]
paths: [".", ...(module.parent ? module.parent.paths : [])],
}),
"utf8"
)
Expand All @@ -17,7 +17,7 @@ if (!experiences) {
module.exports = `name => {
switch (name) {
${Object.keys(experiences)
.map(name => `case "${name}": return require("${experiences[name]}");`)
.map((name) => `case "${name}": return require("${experiences[name]}");`)
.join("")}
}
}`;
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"scripts": {
"ci:test": "yarn format && yarn codegen && git diff && test $(git diff | grep -c '$') -eq 0",
"codegen": "babel --plugins codegen index.js > index.js.out",
"format": "prettier --write *.js *.json"
"format": "prettier --write $(git ls-files '*.js' '*.json')"
},
"dependencies": {
"@babel/core": "^7.0.0-0",
Expand All @@ -39,7 +39,7 @@
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"prettier": "^1.18.0"
"prettier": "2.0.5"
},
"experiences": {
"FeatureA": "@contoso/feature-a",
Expand Down
Loading