-
Notifications
You must be signed in to change notification settings - Fork 225
Update loom to v1 #2150
Update loom to v1 #2150
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
import {createWorkspace, createWorkspaceTestPlugin} from '@shopify/loom'; | ||
import { | ||
buildLibrary, | ||
buildLibraryWorkspace, | ||
} from '@shopify/loom-plugin-build-library'; | ||
import {eslint} from '@shopify/loom-plugin-eslint'; | ||
import {jest} from '@shopify/loom-plugin-jest'; | ||
import {prettier} from '@shopify/loom-plugin-prettier'; | ||
import {workspaceTypeScript} from '@shopify/loom-plugin-typescript'; | ||
|
||
// Needed so TS realises what configuration hooks are provided by Jest | ||
import type {} from '@shopify/loom-plugin-jest'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curious about why it's importing an empty object? Is this intentional? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is intentional, but it is not obvious why. Loom does some kinda funky things with augmenting objects, that don't quite always work super cleanly. I'll add a comment explaining this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for elaborating and for adding the comment 🎉 |
||
|
||
export default createWorkspace((workspace) => { | ||
workspace.use( | ||
buildLibraryWorkspace(), | ||
eslint(), | ||
prettier({files: '**/*.{md,json,yaml,yml}'}), | ||
jest(), | ||
workspaceTypeScript(), | ||
runWorkspaceTests(), | ||
); | ||
}); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import {createPackage, Runtime} from '@shopify/loom'; | ||
import {createPackage} from '@shopify/loom'; | ||
|
||
import {quiltPackage} from '../../config/loom'; | ||
|
||
export default createPackage((pkg) => { | ||
pkg.runtimes(Runtime.Browser, Runtime.Node); | ||
pkg.entry({root: './src/index'}); | ||
pkg.entry({root: './src/index.ts'}); | ||
pkg.use(quiltPackage()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import {createPackage, Runtime} from '@shopify/loom'; | ||
import {createPackage} from '@shopify/loom'; | ||
|
||
import {quiltPackage} from '../../config/loom'; | ||
|
||
export default createPackage((pkg) => { | ||
pkg.runtimes(Runtime.Browser, Runtime.Node); | ||
pkg.entry({root: './src/index'}); | ||
pkg.entry({root: './src/index.ts'}); | ||
pkg.use(quiltPackage()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import {createPackage, Runtime} from '@shopify/loom'; | ||
import {createPackage} from '@shopify/loom'; | ||
|
||
import {quiltPackage} from '../../config/loom'; | ||
|
||
export default createPackage((pkg) => { | ||
pkg.runtimes(Runtime.Browser, Runtime.Node); | ||
pkg.entry({root: './src/index'}); | ||
pkg.entry({root: './src/index.ts'}); | ||
pkg.use(quiltPackage()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import {createPackage, Runtime} from '@shopify/loom'; | ||
import {createPackage} from '@shopify/loom'; | ||
|
||
import {quiltPackage} from '../../config/loom'; | ||
|
||
export default createPackage((pkg) => { | ||
pkg.runtimes(Runtime.Browser, Runtime.Node); | ||
pkg.entry({root: './src/index'}); | ||
pkg.entry({root: './src/index.ts'}); | ||
pkg.use(quiltPackage()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
import {createPackage, Runtime} from '@shopify/loom'; | ||
import {createPackage} from '@shopify/loom'; | ||
|
||
import {quiltPackage} from '../../config/loom'; | ||
|
||
export default createPackage((pkg) => { | ||
pkg.runtimes(Runtime.Browser, Runtime.Node); | ||
pkg.entry({root: './src/index'}); | ||
pkg.entry({name: 'javascript', root: './src/javascript'}); | ||
pkg.entry({name: 'markdown', root: './src/markdown'}); | ||
pkg.entry({root: './src/index.ts'}); | ||
pkg.entry({name: 'javascript', root: './src/javascript/index.ts'}); | ||
pkg.entry({name: 'markdown', root: './src/markdown/index.ts'}); | ||
pkg.use(quiltPackage()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import {createPackage, Runtime} from '@shopify/loom'; | ||
import {createPackage} from '@shopify/loom'; | ||
|
||
import {quiltPackage} from '../../config/loom'; | ||
|
||
export default createPackage((pkg) => { | ||
pkg.runtimes(Runtime.Browser, Runtime.Node); | ||
pkg.entry({root: './src/index'}); | ||
pkg.entry({name: 'babel', root: './src/babel-plugin'}); | ||
pkg.entry({root: './src/index.ts'}); | ||
pkg.entry({name: 'babel', root: './src/babel-plugin.ts'}); | ||
pkg.use(quiltPackage()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import {createPackage, Runtime} from '@shopify/loom'; | ||
import {createPackage} from '@shopify/loom'; | ||
|
||
import {quiltPackage} from '../../config/loom'; | ||
|
||
export default createPackage((pkg) => { | ||
pkg.runtimes(Runtime.Browser, Runtime.Node); | ||
pkg.entry({root: './src/index'}); | ||
pkg.entry({root: './src/index.ts'}); | ||
pkg.use(quiltPackage()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import {createPackage, Runtime} from '@shopify/loom'; | ||
import {createPackage} from '@shopify/loom'; | ||
|
||
import {quiltPackage} from '../../config/loom'; | ||
|
||
export default createPackage((pkg) => { | ||
pkg.runtimes(Runtime.Browser, Runtime.Node); | ||
pkg.entry({root: './src/index'}); | ||
pkg.entry({root: './src/index.ts'}); | ||
pkg.use(quiltPackage()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import {createPackage, Runtime} from '@shopify/loom'; | ||
import {createPackage} from '@shopify/loom'; | ||
|
||
import {quiltPackage} from '../../config/loom'; | ||
|
||
export default createPackage((pkg) => { | ||
pkg.runtimes(Runtime.Browser, Runtime.Node); | ||
pkg.entry({root: './src/index'}); | ||
pkg.entry({root: './src/index.ts'}); | ||
pkg.use(quiltPackage()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import {createPackage, Runtime} from '@shopify/loom'; | ||
import {createPackage} from '@shopify/loom'; | ||
|
||
import {quiltPackage} from '../../config/loom'; | ||
|
||
export default createPackage((pkg) => { | ||
pkg.runtimes(Runtime.Browser, Runtime.Node); | ||
pkg.entry({root: './src/index'}); | ||
pkg.entry({root: './src/index.ts'}); | ||
pkg.use(quiltPackage()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import {createPackage, Runtime} from '@shopify/loom'; | ||
import {createPackage} from '@shopify/loom'; | ||
|
||
import {quiltPackage} from '../../config/loom'; | ||
|
||
export default createPackage((pkg) => { | ||
pkg.runtimes(Runtime.Browser, Runtime.Node); | ||
pkg.entry({root: './src/index'}); | ||
pkg.entry({root: './src/index.ts'}); | ||
pkg.use(quiltPackage()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import {createPackage, Runtime} from '@shopify/loom'; | ||
import {createPackage} from '@shopify/loom'; | ||
|
||
import {quiltPackage} from '../../config/loom'; | ||
|
||
export default createPackage((pkg) => { | ||
pkg.runtimes(Runtime.Browser, Runtime.Node); | ||
pkg.entry({root: './src/index'}); | ||
pkg.entry({root: './src/index.ts'}); | ||
pkg.use(quiltPackage()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import {createPackage, Runtime} from '@shopify/loom'; | ||
import {createPackage} from '@shopify/loom'; | ||
|
||
import {quiltPackage} from '../../config/loom'; | ||
|
||
export default createPackage((pkg) => { | ||
pkg.runtimes(Runtime.Browser, Runtime.Node); | ||
pkg.entry({root: './src/index'}); | ||
pkg.entry({root: './src/index.ts'}); | ||
pkg.use(quiltPackage()); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Node target should be
12.22.9
I wonder if there's a way of having the node version live somewhere, so that both loom config and
node-ci.yml
always have the same version? 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're retaining 12.14.0 as our minimum supported version, and thus the version we transpile to. (This matches the minimum version for the that we specify we support in the
engines
field in the variouspackage.json
s).Increasing this means would mean we are dropping support for some versions of node, which is a breaking change. We want to do that at some point but not right now.
The change in the ci config means say we support 12.14, but only run tests against 12.22, which isn't ideal, but I think that is a better state of affairs than being trapped on an old loom version until we make the breaking change to drop support for node 12, considering we want to make that change kinda soonish.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I agree that dropping support is out of scope for this PR.
Thanks for clarifying/reiterating the node 12.14 and 12.22 use cases 👍