Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1906 from Shopify/node-and-skn
Browse files Browse the repository at this point in the history
Bump required node version to >=12.14.0  and build using rollup
  • Loading branch information
BPScott authored May 21, 2021
2 parents 191c3c8 + a8e3a4f commit d31f856
Show file tree
Hide file tree
Showing 177 changed files with 1,315 additions and 681 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
node-version: ['12.14', '14.x']
timeout-minutes: 15

steps:
Expand Down Expand Up @@ -42,10 +42,6 @@ jobs:
with:
path: |
.sewing-kit/
./packages/*/build/
./packages/*/*.esnext
./packages/*/*.mjs
./packages/*/*.js
key: ${{ runner.os }}-node${{ matrix.node-version }}-sewing-kit-${{ github.sha }}
restore-keys: |
${{ runner.os }}-node${{ matrix.node-version }}-sewing-kit-
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v10.18.1
v12.14.0
7 changes: 0 additions & 7 deletions babel.config.js

This file was deleted.

7 changes: 5 additions & 2 deletions config/sewing-kit/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import {react} from '@sewing-kit/plugin-react';
import {javascript, updateBabelPreset} from '@sewing-kit/plugin-javascript';
import {typescript} from '@sewing-kit/plugin-typescript';
import {buildFlexibleOutputs} from '@sewing-kit/plugin-package-flexible-outputs';
import {packageBuild} from '@sewing-kit/plugin-package-build';
import {} from '@sewing-kit/plugin-jest';

import {addLegacyDecoratorSupport} from './plugin';
Expand All @@ -17,7 +17,10 @@ export function quiltPackage({jestEnv = 'jsdom', useReact = false} = {}) {
javascript(),
typescript(),
useReact && react(),
buildFlexibleOutputs(),
packageBuild({
nodeTargets: 'node 12.14.0',
browserTargets: 'extends @shopify/browserslist-config',
}),
createProjectBuildPlugin('Quilt.PackageBuild', ({hooks}) => {
hooks.target.hook(({hooks}) => {
hooks.configure.hook(hooks => {
Expand Down
41 changes: 25 additions & 16 deletions config/sewing-kit/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
import {BabelConfig, updateBabelPlugin} from '@sewing-kit/plugin-javascript';

export function addLegacyDecoratorSupport(config: BabelConfig) {
return updateBabelPlugin(
export async function addLegacyDecoratorSupport(config: BabelConfig) {
let newConfig = config;

newConfig = await updateBabelPlugin(
[
'@babel/plugin-proposal-class-properties',
require.resolve('@babel/plugin-proposal-class-properties'),
],
{
loose: true,
},
)(config).then(babelConfig => {
return updateBabelPlugin(
[
'@babel/plugin-proposal-decorators',
require.resolve('@babel/plugin-proposal-decorators'),
],
() => ({
legacy: true,
}),
)(babelConfig);
});
{loose: true},
)(newConfig);

// The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods
newConfig = await updateBabelPlugin(
[
'@babel/plugin-proposal-private-methods',
require.resolve('@babel/plugin-proposal-private-methods'),
],
{loose: true},
)(newConfig);

newConfig = await updateBabelPlugin(
[
'@babel/plugin-proposal-decorators',
require.resolve('@babel/plugin-proposal-decorators'),
],
() => ({legacy: true}),
)(newConfig);

return newConfig;
}
4 changes: 2 additions & 2 deletions dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: quilt
type: node
up:
- node:
version: v10.18.1
yarn: 1.22.5
version: v12.14.0
yarn: v1.22.5
commands:
__default__: start
build: yarnpkg build
Expand Down
4 changes: 2 additions & 2 deletions gems/quilt_rails/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ up:
- ruby: 2.6.3
- bundler
- node:
yarn: v1.19.1
version: v10.18.1
version: v12.14.0
yarn: v1.22.5

commands:
test: bundle exec rake test
Expand Down
26 changes: 11 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,22 @@
"workspaces": [
"packages/*"
],
"babel": {
"presets": [
"@shopify/babel-preset/web"
]
},
"devDependencies": {
"@apollo/react-common": "^3.1.3",
"@apollo/react-hooks": "^3.1.3",
"@babel/core": "^7.11.6",
"@sewing-kit/cli": "^0.3.4",
"@sewing-kit/config": "^0.1.12",
"@sewing-kit/plugin-eslint": "^0.1.11",
"@sewing-kit/plugin-javascript": "^0.3.4",
"@sewing-kit/plugin-jest": "^0.1.27",
"@sewing-kit/plugin-package-flexible-outputs": "^0.1.28",
"@sewing-kit/plugin-react": "^0.1.27",
"@sewing-kit/plugin-typescript": "^0.1.28",
"@sewing-kit/plugins": "^0.1.10",
"@sewing-kit/cli": "^0.4.0",
"@sewing-kit/config": "^0.2.0",
"@sewing-kit/plugin-eslint": "^0.2.0",
"@sewing-kit/plugin-javascript": "^0.4.0",
"@sewing-kit/plugin-jest": "^0.2.0",
"@sewing-kit/plugin-package-build": "^0.2.0",
"@sewing-kit/plugin-react": "^0.2.0",
"@sewing-kit/plugin-typescript": "^0.2.0",
"@sewing-kit/plugins": "^0.2.0",
"@shopify/app-bridge": "^0.7.3",
"@shopify/babel-preset": "^23.1.1",
"@shopify/babel-preset": "^23.6.1",
"@shopify/browserslist-config": "^2.2.4",
"@shopify/eslint-plugin": "^39.0.0",
"@shopify/typescript-configs": "^4.0.0",
"@types/enzyme": "^3.10.5",
Expand Down
6 changes: 5 additions & 1 deletion packages/address-consts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- ## Unreleased -->
## Unreleased

### Breaking Change

- Update minimum supported node version to 12.14.0. Add engines field to help enforce usage of this version. [#1906](https://github.com/Shopify/quilt/pull/1906)

## 2.2.4 - 2021-04-13

Expand Down
3 changes: 3 additions & 0 deletions packages/address-consts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"url": "https://github.com/Shopify/quilt/issues"
},
"homepage": "https://github.com/Shopify/quilt/blob/main/packages/address-consts/README.md",
"engines": {
"node": ">=12.14.0"
},
"files": [
"build/*",
"!*.tsbuildinfo",
Expand Down
6 changes: 5 additions & 1 deletion packages/address-mocks/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- ## Unreleased -->
## Unreleased

### Breaking Change

- Update minimum supported node version to 12.14.0. Add engines field to help enforce usage of this version. [#1906](https://github.com/Shopify/quilt/pull/1906)

## 1.5.6 - 2021-04-13

Expand Down
3 changes: 3 additions & 0 deletions packages/address-mocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
"url": "https://github.com/Shopify/quilt/issues"
},
"homepage": "https://github.com/Shopify/quilt/blob/main/packages/address-mocks/README.md",
"engines": {
"node": ">=12.14.0"
},
"devDependencies": {
"@shopify/jest-dom-mocks": "^2.11.5"
},
Expand Down
60 changes: 29 additions & 31 deletions packages/address-mocks/src/fixtures/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ import {
LoadCountryResponse,
} from '@shopify/address-consts';

/* eslint-disable @typescript-eslint/no-var-requires */
const countryCAFr: LoadCountryResponse = require('./country_ca_fr').default;
const countryCAEn: LoadCountryResponse = require('./country_ca_en').default;
const countryCAJa: LoadCountryResponse = require('./country_ca_ja').default;
const countryCAAf: LoadCountryResponse = require('./country_ca_af').default;
const countriesEn: LoadCountriesResponse = require('./countries_en').default;
const countriesJa: LoadCountriesResponse = require('./countries_ja').default;
const countriesAF: LoadCountriesResponse = require('./countries_af').default;
/* eslint-enable @typescript-eslint/no-var-requires */
import countryCAFr from './country_ca_fr';
import countryCAEn from './country_ca_en';
import countryCAJa from './country_ca_ja';
import countryCAAf from './country_ca_af';
import countriesEn from './countries_en';
import countriesJa from './countries_ja';
import countriesAF from './countries_af';

interface Fixtures {
countries: {
Expand All @@ -24,29 +22,29 @@ interface Fixtures {

export const fixtures: Fixtures = {
countries: {
AF: countriesAF,
DA: countriesEn,
DE: countriesEn,
EN: countriesEn,
ES: countriesEn,
FR: countriesEn,
IT: countriesEn,
JA: countriesJa,
NL: countriesEn,
PT: countriesEn,
PT_BR: countriesEn,
AF: countriesAF as LoadCountriesResponse,
DA: countriesEn as LoadCountriesResponse,
DE: countriesEn as LoadCountriesResponse,
EN: countriesEn as LoadCountriesResponse,
ES: countriesEn as LoadCountriesResponse,
FR: countriesEn as LoadCountriesResponse,
IT: countriesEn as LoadCountriesResponse,
JA: countriesJa as LoadCountriesResponse,
NL: countriesEn as LoadCountriesResponse,
PT: countriesEn as LoadCountriesResponse,
PT_BR: countriesEn as LoadCountriesResponse,
},
country: {
AF: countryCAAf,
DA: countryCAEn,
DE: countryCAEn,
EN: countryCAEn,
ES: countryCAEn,
FR: countryCAFr,
IT: countryCAEn,
JA: countryCAJa,
NL: countryCAEn,
PT: countryCAEn,
PT_BR: countryCAEn,
AF: countryCAAf as LoadCountryResponse,
DA: countryCAEn as LoadCountryResponse,
DE: countryCAEn as LoadCountryResponse,
EN: countryCAEn as LoadCountryResponse,
ES: countryCAEn as LoadCountryResponse,
FR: countryCAFr as LoadCountryResponse,
IT: countryCAEn as LoadCountryResponse,
JA: countryCAJa as LoadCountryResponse,
NL: countryCAEn as LoadCountryResponse,
PT: countryCAEn as LoadCountryResponse,
PT_BR: countryCAEn as LoadCountryResponse,
},
};
6 changes: 5 additions & 1 deletion packages/address/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- ## Unreleased -->
## Unreleased

### Breaking Change

- Update minimum supported node version to 12.14.0. Add engines field to help enforce usage of this version. [#1906](https://github.com/Shopify/quilt/pull/1906)

## 2.10.6 - 2021-04-13

Expand Down
3 changes: 3 additions & 0 deletions packages/address/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
"url": "https://github.com/Shopify/quilt/issues"
},
"homepage": "https://github.com/Shopify/quilt/blob/main/packages/address/README.md",
"engines": {
"node": ">=12.14.0"
},
"devDependencies": {
"@shopify/address-mocks": "^1.5.8",
"@shopify/jest-dom-mocks": "^2.11.7"
Expand Down
6 changes: 5 additions & 1 deletion packages/admin-graphql-api-utilities/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- ## Unreleased -->
## Unreleased

### Breaking Change

- Update minimum supported node version to 12.14.0. Add engines field to help enforce usage of this version. [#1906](https://github.com/Shopify/quilt/pull/1906)

## 0.2.4 - 2021-04-13

Expand Down
3 changes: 3 additions & 0 deletions packages/admin-graphql-api-utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
"url": "https://github.com/Shopify/quilt/issues"
},
"homepage": "https://github.com/Shopify/quilt/blob/main/packages/admin-graphql-api-utilities/README.md",
"engines": {
"node": ">=12.14.0"
},
"sideEffects": false,
"files": [
"build/*",
Expand Down
6 changes: 5 additions & 1 deletion packages/ast-utilities/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- ## Unreleased -->
## Unreleased

### Breaking Change

- Update minimum supported node version to 12.14.0. Add engines field to help enforce usage of this version. [#1906](https://github.com/Shopify/quilt/pull/1906)

## 0.2.4 - 2021-04-13

Expand Down
3 changes: 3 additions & 0 deletions packages/ast-utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"url": "https://github.com/Shopify/quilt/issues"
},
"homepage": "https://github.com/Shopify/quilt/blob/main/packages/ast-utilities/README.md",
"engines": {
"node": ">=12.14.0"
},
"devDependencies": {
"@babel/core": ">=7.0.0",
"@babel/plugin-transform-react-jsx": ">=7.0.0",
Expand Down
6 changes: 5 additions & 1 deletion packages/async/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- ## Unreleased -->
## Unreleased

### Breaking Change

- Update minimum supported node version to 12.14.0. Add engines field to help enforce usage of this version. [#1906](https://github.com/Shopify/quilt/pull/1906)

## 2.2.4 - 2021-04-13

Expand Down
3 changes: 3 additions & 0 deletions packages/async/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"url": "https://github.com/Shopify/quilt/issues"
},
"homepage": "https://github.com/Shopify/quilt/blob/main/packages/async/README.md",
"engines": {
"node": ">=12.14.0"
},
"devDependencies": {
"@babel/core": ">=7.0.0",
"@babel/plugin-syntax-dynamic-import": ">=7.0.0",
Expand Down
6 changes: 5 additions & 1 deletion packages/browser/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- ## Unreleased -->
## Unreleased

### Breaking Change

- Update minimum supported node version to 12.14.0. Add engines field to help enforce usage of this version. [#1906](https://github.com/Shopify/quilt/pull/1906)

## 1.1.4 - 2021-04-13

Expand Down
3 changes: 3 additions & 0 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"url": "https://github.com/Shopify/quilt/issues"
},
"homepage": "https://github.com/Shopify/quilt/blob/main/packages/browser/README.md",
"engines": {
"node": ">=12.14.0"
},
"files": [
"build/*",
"!*.tsbuildinfo",
Expand Down
Loading

0 comments on commit d31f856

Please sign in to comment.