@npmcli/template-oss 2.4.3 → 2.5.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,48 @@
1
+ # This file is automatically added by @npmcli/template-oss. Do not edit.
2
+
3
+ name: CI
4
+
5
+ on:
6
+ pull_request:
7
+ push:
8
+ branches:
9
+ - main
10
+ - latest
11
+ schedule:
12
+ # "At 02:00 on Monday" https://crontab.guru/#0_1_*_*_1
13
+ - cron: "0 2 * * 1"
14
+
15
+ jobs:
16
+ lint:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v2
20
+ - uses: actions/setup-node@v2
21
+ with:
22
+ node-version: '16'
23
+ - run: npm i --prefer-online -g npm@latest
24
+ - run: npm i
25
+ - run: npm run lint
26
+
27
+ test:
28
+ strategy:
29
+ fail-fast: false
30
+ matrix:
31
+ node-version: [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0, 16.x]
32
+ platform:
33
+ - os: ubuntu-latest
34
+ shell: bash
35
+ - os: macos-latest
36
+ shell: bash
37
+ runs-on: ${{ matrix.platform.os }}
38
+ defaults:
39
+ run:
40
+ shell: ${{ matrix.platform.shell }}
41
+ steps:
42
+ - uses: actions/checkout@v2
43
+ - uses: actions/setup-node@v2
44
+ with:
45
+ node-version: ${{ matrix.node-version }}
46
+ - run: npm i --prefer-online -g npm@latest
47
+ - run: npm i
48
+ - run: npm test --ignore-scripts
@@ -38,6 +38,7 @@ const defaultConfig = {
38
38
  applyRootRepoFiles: true,
39
39
  applyWorkspaceRepoFiles: true,
40
40
  applyRootModuleFiles: true,
41
+ windowsCI: true,
41
42
  }
42
43
 
43
44
  const copyFiles = async (targetDir, files) => {
@@ -78,9 +79,15 @@ const copyContent = async (path, rootPath, config) => {
78
79
  if (!isWorkspace) {
79
80
  if (config.applyRootRepoFiles) {
80
81
  await copyFiles(rootPath, repoFiles)
82
+ if (!config.windowsCI) {
83
+ // copyFiles already did the mkdir so we can just fs.copyFile now
84
+ await fs.copyFile(join(contentDir, 'ci-no-windows.yml'), join(rootPath, 'ci.yml'))
85
+ }
81
86
  }
82
87
  return
83
- } // only workspace now
88
+ }
89
+
90
+ // only workspace now
84
91
 
85
92
  // TODO: await copyFiles(path, workspaceFiles)
86
93
  // if we ever have workspace specific files
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/template-oss",
3
- "version": "2.4.3",
3
+ "version": "2.5.0",
4
4
  "description": "templated files used in npm CLI team oss projects",
5
5
  "main": "lib/index.js",
6
6
  "bin": {